diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-09-29 12:12:32 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-09-29 12:12:32 -0700 |
commit | b177dea74e5280ccaeeba4bd90fdf6d7967035f1 (patch) | |
tree | 5508c4bc6ee4457d6de5e3a3024c6e23600c1711 /parser.y | |
parent | 4e33de0b5b4a32e9b9b44c2ac23f4d757eb6e92e (diff) | |
download | txr-b177dea74e5280ccaeeba4bd90fdf6d7967035f1.tar.gz txr-b177dea74e5280ccaeeba4bd90fdf6d7967035f1.tar.bz2 txr-b177dea74e5280ccaeeba4bd90fdf6d7967035f1.zip |
* match.c (chars_k): New variable.
(match_line): Keyword arguments in coll implemented.
(match_init): chars_k variable initialized.
* parser.l (COLL): Lexical syntax changed to allow for
argument material.
* parser.y (elem): Coll syntax rewritten for arguments.
* txr.1: Updated.
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -201,9 +201,9 @@ elem : TEXT { $$ = string_own($1); } | list { $$ = $1; } | regex { $$ = cons(regex_compile(rest($1)), rest($1)); } - | COLL elems END { $$ = list(coll_s, $2, nao); } - | COLL elems - UNTIL elems END { $$ = list(coll_s, $2, $4, nao); } + | COLL exprs_opt ')' elems END { $$ = list(coll_s, $4, nil, $2, nao); } + | COLL exprs_opt ')' elems + UNTIL elems END { $$ = list(coll_s, $4, $6, $2, nao); } | COLL error { $$ = nil; yybadtoken(yychar, lit("coll clause")); } ; |