diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-12-30 12:26:41 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-12-30 12:26:41 -0800 |
commit | ac08d22c2b916fbd88c938569e0cd6af488b7a67 (patch) | |
tree | 845a929d332f67cc7ec6bd5196b3acf3d52f69b7 /parser.l | |
parent | 0b81b8b4c39b6c60cbbe8de5a6a785beb43c3dbb (diff) | |
download | txr-ac08d22c2b916fbd88c938569e0cd6af488b7a67.tar.gz txr-ac08d22c2b916fbd88c938569e0cd6af488b7a67.tar.bz2 txr-ac08d22c2b916fbd88c938569e0cd6af488b7a67.zip |
* match.c (counter_k): New keyword symbol variable.
(do_output_line): Process new :counter argument of rep.
(do_output): Ditto, for repeat.
(syms_init): Intern new keyword symbol.
* match.h (counter_k): Declared.
* parser.l (REPEAT, REP): Lexical syntax changed to
allow arguments.
* parser.y (repeat_rep_helper): Takes extra argument, representing
the repeat/rep args. This is inserted into the second position
of the output list.
(repeat_clause, rep_elem): Extract repeat/rep arguments and
pass to repeat_rep_helper.
(yybadtoken): Do not put quotes around the word "number".
* txr.1: Updated.
Diffstat (limited to 'parser.l')
-rw-r--r-- | parser.l | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -285,15 +285,15 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} return OUTPUT; } -<SPECIAL>\({WS}repeat{WS}\) { - yy_pop_state(); +<SPECIAL>\({WS}repeat/{ID_END} { + yy_push_state(NESTED); yylval.lineno = lineno; return REPEAT; } -<SPECIAL>\({WS}rep{WS}\) { - yy_pop_state(); +<SPECIAL>\({WS}rep/{ID_END} { + yy_push_state(NESTED); yylval.lineno = lineno; return REP; } |