aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2013-01-27 01:18:00 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2013-01-27 01:18:00 +0100
commit7e4014c5936e59251044c595d20b6978e69f8568 (patch)
tree6be9a446c596857fdf3f44a4815743d90edb092e
parent922b99b474d352f6a00b327d83efc0a3cee823f3 (diff)
downloadsciteco-7e4014c5936e59251044c595d20b6978e69f8568.tar.gz
revised lexer configuration using SciTE property files and Textadept's terminal color definitions
* lexer config is now in separate file installed into the package data dir, so it can be excluded from the teco.ini template. * teco.ini is generated so it can load an installed lexer.tes as ED hook (can still be dropped into the user's home and will work immediately)
-rw-r--r--.gitignore9
-rw-r--r--Makefile.am11
-rw-r--r--lexer.tes78
-rw-r--r--teco.ini92
-rw-r--r--teco.ini.in18
5 files changed, 108 insertions, 100 deletions
diff --git a/.gitignore b/.gitignore
index b591a88..c82f607 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,13 +17,14 @@
Makefile
Makefile.in
stamp-*
-src/sciteco
-src/sciteco-minimal
+/src/sciteco
+/src/sciteco-minimal
# Generated code
/sciteco.1
-src/gtk-info-popup*.[ch]
-src/symbols-*.cpp
+/teco.ini
+/src/gtk-info-popup*.[ch]
+/src/symbols-*.cpp
# Backups
*~
diff --git a/Makefile.am b/Makefile.am
index 9d0fada..eb38c7d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,11 +15,14 @@ REPL_MACRO = eb$<\e \
<fs@DATE^Q@\e$(shell @DATE@ "+%d %b %Y")\e;>j \
ew$@\e
-dist_pkgdata_DATA = teco.ini
+pkgdata_DATA = teco.ini
+EXTRA_DIST = teco.ini.in
+CLEANFILES = teco.ini
+dist_pkgdata_DATA = lexer.tes
man_MANS = sciteco.1
-EXTRA_DIST = sciteco.1.in
-CLEANFILES = sciteco.1
+EXTRA_DIST += sciteco.1.in
+CLEANFILES += sciteco.1
noinst_HEADERS = compat/bsd/sys/cdefs.h \
compat/bsd/sys/queue.h \
@@ -29,5 +32,5 @@ EXTRA_DIST += patches/scintilla-teco-control-codes.patch
EXTRA_DIST += TODO
-sciteco.1 : sciteco.1.in
+% : %.in
$(BOOTSTRAP_SCITECO) -e $$'$(REPL_MACRO)'
diff --git a/lexer.tes b/lexer.tes
new file mode 100644
index 0000000..d333b8d
--- /dev/null
+++ b/lexer.tes
@@ -0,0 +1,78 @@
+! Lexer configuration and styles (ED hook) !
+
+U.0 Q.0Oadd,edit,close,quit
+
+!add!
+! black, red, green, yellow, blue, magenta, cyan, white !
+@.c{
+ U.c ((Q.c&1)*255) # ((Q.c/2 & 1)*255*256) # ((Q.c/4 & 1)*255*256*256)
+}
+
+! <bold,bg,fg,style>M.r !
+@.r{
+ U.sU.vU.bU.h
+ Q.v:M.c,Q.sESSTYLESETFORE
+ Q.b:M.c,Q.sESSTYLESETBACK
+ Q.h,Q.sESSTYLESETBOLD
+}
+
+! Bracelight ! 0,7,0,34:M.r
+! Bracebad ! 1,0,1,35:M.r
+
+EQ* HX.f EQ.f ZJ i J
+
+! C/C++ !
+:S.[c,cc,cpp,cxx,h,hh,hpp,hxx,ipp,m,mm,sma]"S
+ -D EBQ.f
+ ESSETLEXER,SCLEX_CPP
+ 0ESSETKEYWORDS
+ and and_eq asm auto bitand bitor bool break
+ case catch char class compl const const_cast continue
+ default delete do double dynamic_cast else enum explicit export extern false float for
+ friend goto if inline int long mutable namespace new not not_eq
+ operator or or_eq private protected public
+ register reinterpret_cast return short signed sizeof static static_cast struct switch
+ template this throw true try typedef typeid typename union unsigned using
+ virtual void volatile wchar_t while xor xor_eq
+ ! Doxygen keywords !
+ 2ESSETKEYWORDS
+ a addindex addtogroup anchor arg attention
+ author b brief bug c class code date def defgroup deprecated dontinclude
+ e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception
+ f$ f[ f] file fn hideinitializer htmlinclude htmlonly
+ if image include ingroup internal invariant interface latexonly li line link
+ mainpage name namespace nosubgrouping note overload
+ p page par param post pre ref relates remarks return retval
+ sa section see showinitializer since skip skipline struct subsection
+ test throw todo typedef union until
+ var verbatim verbinclude version warning weakgroup $ @ \ & < > # { }
+ ! Comments ! 1,0,0,1:M.r 1,0,0,2:M.r 1,0,0,3:M.r
+ ! Number ! 0,0,6,4:M.r
+ ! Keywords ! 1,0,7,5:M.r
+ ! Strings ! 0,0,2,6:M.r 0,0,2,7:M.r
+ ! Preprocessor ! 0,0,5,9:M.r
+ ! Operators ! 0,0,3,10:M.r
+Oedit'
+
+:S[makefile,.mak]"S
+ -D EBQ.f
+ ESSETLEXER,SCLEX_MAKEFILE
+ ! Comments ! 1,0,0,1:M.r
+ ! Preprocessor ! 0,0,5,2:M.r
+ ! Variables ! 1,0,4,3:M.r
+ ! Operators ! 0,0,3,4:M.r
+ ! Target ! 1,0,3,5:M.r
+ ! Error ! 1,0,1,6:M.r
+Oedit'
+
+Z-1,ZD EBQ.f
+! fall through !
+
+!edit!
+!close!
+!quit!
+! fall through !
+
+!end!
+! Dispatch to user-defined macro 1 !
+Q.0M1
diff --git a/teco.ini b/teco.ini
deleted file mode 100644
index 01de669..0000000
--- a/teco.ini
+++ /dev/null
@@ -1,92 +0,0 @@
-! TECO.INI !
-
-@0{
- Oadd,edit,close,quit
-
-!add!
- EQ* HX.f EQ.f
-
- @^U.c{
- U.c ((Q.c&1)*255) # ((Q.c/2 & 1)*255*256) # ((Q.c/4 & 1)*255*256*256)
- }
-
- ! <bold,bg,fg,style>M.r !
- @.r{
- U.sU.vU.bU.h
- Q.v:M.c,Q.sESSTYLESETFORE
- Q.b:M.c,Q.sESSTYLESETBACK
- Q.h,Q.sESSTYLESETBOLD
- }
-
- ZJ -:S.[cpp,c,h]"S Z-."=
- EBQ.f
- ESSETLEXER,SCLEX_CPP
- 0ESSETKEYWORDS
- and and_eq asm auto bitand bitor bool break
- case catch char class compl const const_cast continue
- default delete do double dynamic_cast else enum explicit export extern false float for
- friend goto if inline int long mutable namespace new not not_eq
- operator or or_eq private protected public
- register reinterpret_cast return short signed sizeof static static_cast struct switch
- template this throw true try typedef typeid typename union unsigned using
- virtual void volatile wchar_t while xor xor_eq
- 2ESSETKEYWORDS
- a addindex addtogroup anchor arg attention
- author b brief bug c class code date def defgroup deprecated dontinclude
- e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception
- f$ f[ f] file fn hideinitializer htmlinclude htmlonly
- if image include ingroup internal invariant interface latexonly li line link
- mainpage name namespace nosubgrouping note overload
- p page par param post pre ref relates remarks return retval
- sa section see showinitializer since skip skipline struct subsection
- test throw todo typedef union until
- var verbatim verbinclude version warning weakgroup $ @ \ & < > # { }
- ! Whitespace ! 0,0,2,0:M.r
- ! Comments ! 0,0,2,1:M.r 0,0,2,2:M.r 1,0,2,3:M.r
- ! Number ! 0,0,1,4:M.r
- ! Keywords ! 0,0,4,5:M.r
- ! Strings ! 0,0,5,6:M.r 1,0,5,7:M.r
- ! Preprocessor ! 0,0,3,9:M.r
- ! Operators ! 1,0,7,10:M.r
- ! Identifiers ! 0,0,6,11:M.r
- Oend
- ''
-
- ZJ -:Smakefile"S Z-."=
- EBQ.f
- ESSETLEXER,SCLEX_MAKEFILE
- 0ESSETKEYWORDSifeq else endif
- ! Default ! 0,0,7,0:M.r
- ! Comments ! 0,0,2,1:M.r
- ! Preprocessor ! 0,0,4,2:M.r
- ! Variables ! 0,0,1,3:M.r
- ! Operators ! 1,0,7,4:M.r
- ! Target ! 1,0,2,5:M.r
- Oend
- ''
-
- EBQ.f
- Oend
-
-!edit!
- Oend
-
-!close!
- Oend
-
-!quit!
- ! fall through !
-
-!end!}
-ED#32ED
-
-! margins !
-5,0ESSETMARGINWIDTHN
-0,1ESSETMARGINWIDTHN
-1,2ESSETMARGINWIDTHN
-
-! open all files specified on the commandline !
-[.f
- <:L;R 0X.f EBQ.f EB L>
-].f
--EF
diff --git a/teco.ini.in b/teco.ini.in
new file mode 100644
index 0000000..fcf344a
--- /dev/null
+++ b/teco.ini.in
@@ -0,0 +1,18 @@
+! TECO.INI !
+
+EQ0@pkgdatadir@/lexer.tes
+@1{
+ ! lexer.tes calls this !
+}
+ED#32ED
+
+! margins !
+5,0ESSETMARGINWIDTHN
+0,1ESSETMARGINWIDTHN
+1,2ESSETMARGINWIDTHN
+
+! open all files specified on the commandline !
+[.f
+ <:L;R 0X.f EBQ.f EB L>
+].f
+-EF