diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2010-01-16 19:42:49 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2010-01-16 19:42:49 -0800 |
commit | a6b27700fd31e51c24547e3e678feb79a03ae88e (patch) | |
tree | 5c3208331767b2ae329247c50652a60c9d9e61f4 /parser.y | |
parent | 4ff22034ebeeae2b245a1daa5413097d72dffbfb (diff) | |
download | txr-a6b27700fd31e51c24547e3e678feb79a03ae88e.tar.gz txr-a6b27700fd31e51c24547e3e678feb79a03ae88e.tar.bz2 txr-a6b27700fd31e51c24547e3e678feb79a03ae88e.zip |
Regex syntactic tweaks: support the [] syntax
to match no character and [^] as its complement,
being synonymous with the wildcard dot.
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -469,7 +469,9 @@ regbranch : regterm { $$ = cons($1, nil); } ; regterm : '[' regclass ']' { $$ = cons(set_s, $2); } + | '[' ']' { $$ = cons(set_s, nil); } | '[' '^' regclass ']' { $$ = cons(cset_s, $3); } + | '[' '^' ']' { $$ = wild_s; } | '.' { $$ = wild_s; } | '^' { $$ = chr('^'); } | ']' { $$ = chr(']'); } |