diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-03-15 19:40:51 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-03-15 19:40:51 -0700 |
commit | 510caa23aa66e783e967e991623a7327fd2e58c4 (patch) | |
tree | 6bb0b870144c1f0454e5a68145943bf755549e7e | |
parent | e4a571c3f71286d6a314052759c5a73d817b2baa (diff) | |
download | txr-510caa23aa66e783e967e991623a7327fd2e58c4.tar.gz txr-510caa23aa66e783e967e991623a7327fd2e58c4.tar.bz2 txr-510caa23aa66e783e967e991623a7327fd2e58c4.zip |
parser: support uref dot as top-level expr.
* parser.y (hash_semi_oor_n_expr, hash_semi_or_i_expr): add
grammar rules for leading dot.
-rw-r--r-- | parser.y | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -198,13 +198,21 @@ spec : clauses_opt { parser->syntax_tree = $1; } hash_semi_or_n_expr : HASH_SEMI { parser->circ_suppress = 1; } n_expr { parser->circ_suppress = 0; $$ = nao; } + | HASH_SEMI '.' { parser->circ_suppress = 1; } + n_expr { parser->circ_suppress = 0; + $$ = nao; } | n_expr { $$ = $1; } + | '.' n_expr { $$ = uref_helper(parser, $2); } ; hash_semi_or_i_expr : HASH_SEMI { parser->circ_suppress = 1; } i_expr { parser->circ_suppress = 0; $$ = nao; } + | HASH_SEMI '.' { parser->circ_suppress = 1; } + i_expr { parser->circ_suppress = 0; + $$ = nao; } | i_expr { $$ = $1; } + | '.' i_expr { $$ = uref_helper(parser, $2); } ; |