From 427c9d16ce7e62cbe2671748cd8434132ce60482 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 22 Nov 2014 05:31:31 +0100 Subject: added globbing command EN * implements the same globbing as the EB command already did * uses Globber helper class that behaves more like UNIX glob(). glib only has a glob-style pattern matcher. * The Globber class may be extended later to provide more UNIX-like globbing. * lexer.tes has been updated to make use of globbing. Now, lexers can be automatically loaded and registered at startup. To install a new lexer, it's sufficient to copy a file to the lexers/ directory. --- lib/lexer.tes | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'lib/lexer.tes') diff --git a/lib/lexer.tes b/lib/lexer.tes index 01c3bf1..0a4622c 100644 --- a/lib/lexer.tes +++ b/lib/lexer.tes @@ -19,14 +19,19 @@ :M[color.error],35M[color.set] } -! individual tests are appended by the lexers/*.tes files ! -EMQ[$SCITECOPATH]/lexers/batch.tes -EMQ[$SCITECOPATH]/lexers/cmake.tes -EMQ[$SCITECOPATH]/lexers/cpp.tes -EMQ[$SCITECOPATH]/lexers/make.tes -EMQ[$SCITECOPATH]/lexers/patch.tes -EMQ[$SCITECOPATH]/lexers/sh.tes -EMQ[$SCITECOPATH]/lexers/xml.tes +! Automatically mung all the lexers and them to "lexer.auto" ! +Q*U.#cd EQ.[lexers] +ENQ[$SCITECOPATH]/lexers/*.tes J +<:L;R + 0X.[filename] .-4U.p -S/ .,Q.pX.[name] + EMQ.[filename] + EQ[lexer.auto] ZJ + @I{ + :M[lexer.test.Q.[name]]"S :M[lexer.set.Q.[name]] Oend ' + } + EQ.[lexers] +L> +Q.#cdEB ! append an "end" label ! :[lexer.auto]!end! -- cgit v1.2.3