Thanks to all who wrote with suggestions, etc.
I finally twigged to a solution that allowed me to get the approach I
had started to work---probably should have spotted this quicker. In
case anybody's interested, the key line of code is flagged below:
Matthew M. Burke wrote:
>
> Now in the tree parser, I have
>
> statement
> : ...
> | ^(SAME_CMD a=val b=val .) {
> int aval = $a.value;
> int bval = $b.value;
> if (a == b) {
> // HERE'S THE KEY
>
CommonTree
blockRoot = (CommonTree)($statement.start.getChild(2));
......
> }
> }
> | ...
> ;
>
>
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---