diff options
-rw-r--r-- | .gitmodules | 2 | ||||
-rw-r--r-- | TODO | 1 | ||||
m--------- | contrib/lexilla | 0 | ||||
-rw-r--r-- | freebsd/pkg-plist | 1 | ||||
-rw-r--r-- | lib/Makefile.am | 3 | ||||
-rw-r--r-- | lib/lexers/cpp.tes | 2 | ||||
-rw-r--r-- | lib/lexers/troff.tes | 85 |
7 files changed, 90 insertions, 4 deletions
diff --git a/.gitmodules b/.gitmodules index ed91108..3636830 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,4 +7,4 @@ url = https://github.com/orbitalquark/scinterm.git [submodule "lexilla"] path = contrib/lexilla - url = https://github.com/ScintillaOrg/lexilla.git + url = https://github.com/rhaberkorn/lexilla.git @@ -417,7 +417,6 @@ Features: native Scintilla packages. Perhaps it makes sense to be able to build against them using --with-scintilla. - * Write a Scintilla/Lexilla lexer for Roff * There is an Urxvt extension 52-osc for implementing the xterm-like clipboard control sequences. Other emulators also support it. It is not always detectable diff --git a/contrib/lexilla b/contrib/lexilla -Subproject 43ea736569d52ba6cf7e7325cf39009409e7282 +Subproject ea72eee0686784f5314e5c898252889060b5e47 diff --git a/freebsd/pkg-plist b/freebsd/pkg-plist index 106bf73..d65cbf6 100644 --- a/freebsd/pkg-plist +++ b/freebsd/pkg-plist @@ -80,6 +80,7 @@ man/man7/%%PROGRAM_PREFIX%%sciteco.7.gz %%LEXILLA%%%%DATADIR%%/lib/lexers/tal.tes %%LEXILLA%%%%DATADIR%%/lib/lexers/tcl.tes %%LEXILLA%%%%DATADIR%%/lib/lexers/test.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/troff.tes %%LEXILLA%%%%DATADIR%%/lib/lexers/vala.tes %%LEXILLA%%%%DATADIR%%/lib/lexers/vb.tes %%LEXILLA%%%%DATADIR%%/lib/lexers/verilog.tes diff --git a/lib/Makefile.am b/lib/Makefile.am index a458692..5ea3029 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -99,6 +99,7 @@ dist_lexer_DATA += lexers/verilog.tes \ lexers/python.tes \ lexers/yaml.tes \ lexers/markdown.tes \ - lexers/asciidoc.tes + lexers/asciidoc.tes \ + lexers/troff.tes endif diff --git a/lib/lexers/cpp.tes b/lib/lexers/cpp.tes index d1acce4..5c3ce4a 100644 --- a/lib/lexers/cpp.tes +++ b/lib/lexers/cpp.tes @@ -12,7 +12,7 @@ :EN*.hppQ*"S -1 ' :EN*.hxxQ*"S -1 ' :EN*.ippQ*"S -1 ' - :EN*.mmQ*"S -1 ' + !*:EN*.mmQ*"S -1 '*! :EN*.smaQ*"S -1 ' :EN*.inoQ* } diff --git a/lib/lexers/troff.tes b/lib/lexers/troff.tes new file mode 100644 index 0000000..a10d3e9 --- /dev/null +++ b/lib/lexers/troff.tes @@ -0,0 +1,85 @@ +!* troff/nroff *! + +@[lexer.test.troff]{ + :EN*.groffQ*"S -1 ' + :EN*.roffQ*"S -1 ' + :EN*.meQ*"S -1 ' + :EN*.mmQ*"S -1 ' + :EN*.msQ*"S -1 ' + :EN*.momQ*"S -1 ' + :EN*.manQ*"S -1 ' + :EN*.mdocQ*"S -1 ' + :EN*.tmacQ*"S -1 ' + :EN*.[12345678]Q* +} + +!* Heirloom Troff specific requests *! +[lexer.troff.heirloom] + bleedat breakchar brnl brpnl + cropat dch dwh + errprint + fallback fdeferlig feature fkern flig fp fps fspacewidth + hidechar hylang hylen hypp + index + kernafter kernbefore kernpair + lc_ctype lds letadj lhang lnr lnrf lpfx + mediasize minss + nhychar nrf + padj papersize psbb pshape + recursionlimit rhang + sentchar spacewidth + track transchar trimat + unwatch unwatchn + watch watchlength watchn + xflag +!* Neatroff-specific requests *! +[lexer.troff.neatroff] + << >> cl co co+ co< co> eos ff ffsc fmap + hycost hydash hystop in2 kn ochar pmll ssh ti2 + +@[lexer.set.troff]{ + ESSETILEXERtroff + !* Predefined requests (derived from Groff) *! + 0ESSETKEYWORDS + ab ad af aln als am am1 ami ami1 as as1 asciify + backtrace bd blm box boxa bp br brp break + c2 cc ce cf cflags ch char chop class close color composite continue cp cs cu + da de de1 defcolor dei dei1 device devicem di do ds ds1 dt + ec ecr ecs el em eo ev evc ex + fam fc fchar fcolor fi fl fp fschar fspecial ft ftr fzoom + gcolor + hc hcode hla hlm hpf hpfa hpfcode hw hy hym hys + ie if ig . in it itc + kern + lc length linetabs linetabs lf lg ll lsm ls lt + mc mk mso + na ne nf nh nm nn nop nr nroff ns nx + open opena os output + pc pev pi pl pm pn pnr po ps psbb pso ptr pvs pvs + rchar rd return rfschar rj rm rn rnn rr rs rt + schar shc shift sizes so sp special spreadwarn ss sty substring sv sy + ta tc ti tkf tl tm tm1 tmc tr trf trin trnt troff + uf ul unformat + vpt vs + warn warnscale wh while write writec writem + Q[lexer.troff.heirloom] Q[lexer.troff.neatroff] + !* Flow control requests/commands with conditionals *! + 1ESSETKEYWORDSif ie while + !* Flow control requests/commands without conditionals *! + 2ESSETKEYWORDSel nop + !* Requests and commands, initiating ignore blocks *! + 3ESSETKEYWORDSig + !* Requests and commands with end-macros. + Mom macros alias MAC to de. *! + 4ESSETKEYWORDSam am1 de de1 MAC + + :M[color.keyword],1M[color.set] + :M[color.preproc],2M[color.set] + :M[color.number],3M[color.set] + :M[color.operator],4M[color.set] + :M[color.string],5M[color.set] + :M[color.comment],6M[color.set] + !*:M[color.comment],7M[color.set]*! + 7U.i 20<:M[color.variable],%.iM[color.set]> + :M[color.preproc2],17M[color.set] +} |