Brian Nelson wrote:
So I have been working on this for about a week, and I even bought the ANTLR book, but I can't seem to find how to get what seems like simple data out of the grammar.You probably do not need a tree if you are just extracting information and you don't need to refer to other parts of the css. From your example above, then you probably just want the text of your rone rule, which is trivial: prog : r1=rone { System.out.println($r1.text); } (COMMA r2=rone { System.out.println($r2.text); })* ; Obviously, though I use sout here, you can do anything with the String that $rn.text gives you. Jim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~--- |
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address