I haven't solved the core problem, but there is a workaround: In my case I was 
able to alter my lexer rules so that the rule text matched a single token. But 
in trying to do so, I ran into a different problem.


This is what didn't work: I tried to use a rule in the AST-emitting parser to 
combine all the text into one imaginary token:

______________________
text
        :       QSTRING|(CHAR+)
        ->      TEXTVAL[$text.text]
        ;
______________________

This created a valid-looking stream of tree nodes going to the tree parser, 
however... the tree parser would always error out, claiming it found "test text 
here" instead of TEXTVAL. The TEXTVAL token would have the correct token 
number, but it's token *name* would somehow match the text payload...?

Anyway, my gut feeling is that there should still be *some* way to specify "all 
text within this subtree" in an tree-parser, and I'm still interested if 
someone knows what it is.

--Darien A. Hager


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
-~----------~----~----~----~------~----~------~--~---

Reply via email to