summaryrefslogtreecommitdiffstats
path: root/sysif.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-04-07 22:19:14 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-04-07 22:19:14 -0700
commitc4eb7f17cf2912575d483b21a0021375f23553cb (patch)
tree6d8c3f610122c8485fb00ef3b8fd18a074239e0e /sysif.h
parent3f0fd8d5fb35b9d1ad6a348a6767d5ca562e08ec (diff)
downloadtxr-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