diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-11-17 22:06:10 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-11-17 22:06:10 -0800 |
commit | f55237951cd029bdfe40346c52060a8ed59bb49e (patch) | |
tree | b4ab13970cc6c317415f366740a75df86f8f4638 /parser.y | |
parent | df70e45dae4adccca01441e0911d2f5e114e8e7f (diff) | |
download | txr-f55237951cd029bdfe40346c52060a8ed59bb49e.tar.gz txr-f55237951cd029bdfe40346c52060a8ed59bb49e.tar.bz2 txr-f55237951cd029bdfe40346c52060a8ed59bb49e.zip |
Task #11598.
* match.c (resolve_k): New keyword symbol variable.
(h_parallel, v_parallel): Implement :resolve keyword in @(some)
directive.
(syms_init): New symbol variable initialized.
* parser.l: Allow (some) to have argument material.
* parser.y (some_clause, elem): SOME syntax adjusted.
* txr.1: Documented new :resolve keyword in @(some).
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -150,12 +150,16 @@ all_clause : ALL newl clause_parts { $$ = list(all_s, $3, nao); ; -some_clause : SOME newl clause_parts { $$ = list(some_s, $3, nao); +some_clause : SOME exprs_opt ')' + newl clause_parts { $$ = list(some_s, $5, $2, nao); rl($$, num($1)); } - | SOME newl error { $$ = nil; + | SOME exprs_opt ')' + newl error + { $$ = nil; yybadtoken(yychar, lit("some clause")); } - | SOME newl END newl { $$ = nil; + | SOME exprs_opt ')' + newl END newl { $$ = nil; yyerror("empty some clause"); } ; @@ -289,8 +293,9 @@ elem : TEXT { $$ = rl(string_own($1), num(lineno)); } yybadtoken(yychar, lit("coll clause")); } | ALL clause_parts_h { $$ = rl(list(all_s, t, $2, nao), num($1)); } | ALL END { yyerror("empty all clause"); } - | SOME clause_parts_h { $$ = rl(list(some_s, t, $2, nao), num($1)); } - | SOME END { yyerror("empty some clause"); } + | SOME exprs_opt ')' + clause_parts_h { $$ = rl(list(some_s, t, $4, $2, nao), num($1)); } + | SOME exprs_opt ')' END { yyerror("empty some clause"); } | NONE clause_parts_h { $$ = rl(list(none_s, t, $2, nao), num($1)); } | NONE END { yyerror("empty none clause"); } | MAYBE clause_parts_h { $$ = rl(list(maybe_s, t, $2, nao), num($1)); } |