[antlr-interest] "context sensitivity" of tree parsing
Benjamin Shropshire
shro8822 at vandals.uidaho.edu
Mon Mar 3 13:43:23 PST 2008
I known context sensitive has another manging but it is the most
descriptive term here:
I have a tree parser working over an AST and I have a particular rule
that gets used in 2 places. In one place I want it to do something and
in another I don't want it to do anything. Rather than copy the whole
rule (and potentially a pile of referenced rules) and edit out the
actions, my first though is to pass a bool in to test on (on true I'm in
the one cases, on false I'm in the other) but this seems a bit clunky.
Is there a better way? If so, what is it called and where can I read up
on it?
More information about the antlr-interest
mailing list