diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-07 22:19:14 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-07 22:19:14 -0700 |
commit | c4eb7f17cf2912575d483b21a0021375f23553cb (patch) | |
tree | 6d8c3f610122c8485fb00ef3b8fd18a074239e0e /sysif.h | |
parent | 3f0fd8d5fb35b9d1ad6a348a6767d5ca562e08ec (diff) | |
download | txr-c4eb7f17cf2912575d483b21a0021375f23553cb.tar.gz txr-c4eb7f17cf2912575d483b21a0021375f23553cb.tar.bz2 txr-c4eb7f17cf2912575d483b21a0021375f23553cb.zip |
parser: refactor grammar to banish #[] etc.
Turns out we have an over-eager parser whcih recognizes
invalid notion such as #[...], #S[...] and others.
This is because the grammar nonterminal list is overloaded
with phrase structures. The syntax of a vector literal,
for instance, is '#' list, but a list can be '[' ...
and other expressions.
* parser.y (dwim, meta, compound): New non-terminal symbols.
Dwim derives the square bracketed "dwim" expressons that were
previously overloaded into list. Meta derives the @ exprs.
compound is what list used to be.
(list): Handle only (...) list expressions.
(o_elem, modifiers): Derives compound rather than list, thus
preserving existing behavior.
(i_expr, n_expr): Likewise.
All other uses references to the list nonterminal
stay, thereby trimming the grammar of dubious expressions.
Diffstat (limited to 'sysif.h')
0 files changed, 0 insertions, 0 deletions