summaryrefslogtreecommitdiffstats
path: root/parser.y
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-03-15 12:50:30 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-03-15 12:50:30 -0700
commit122b39ad1a2404987157f78ff39a23a4ebb9bbad (patch)
treecd169fff6ee804115c907862e847890814e08335 /parser.y
parenta8b0e36b1760e51a8a3a25d4e22a325e407ef3d4 (diff)
downloadtxr-122b39ad1a2404987157f78ff39a23a4ebb9bbad.tar.gz
txr-122b39ad1a2404987157f78ff39a23a4ebb9bbad.tar.bz2
txr-122b39ad1a2404987157f78ff39a23a4ebb9bbad.zip
* parser.y (text): Allow the EMPTY token (the @(empty) syntax)
to be a text. * txr.1: Documented @(empty).
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser.y b/parser.y
index efbc485b..19332684 100644
--- a/parser.y
+++ b/parser.y
@@ -334,7 +334,6 @@ else_clause_opt : ELSE newl
| { $$ = nil; }
;
-
line : elems_opt '\n' { $$ = $1; }
;
@@ -363,6 +362,7 @@ text : TEXT { $$ = rl(string_own($1), num(lineno)); }
| regex { $$ = cons(regex_compile(rest($1), nil),
rest($1));
rl($$, num(lineno)); }
+ | EMPTY { $$ = null_string; }
;
texts : text %prec LOW { $$ = rlcp(cons($1, nil), $1); }