Hi All,

If I have a option rule in my grammar, how can I check whether that rule
matched or not.
e.g. if I have a rule in my grammar

first: (second)? third
{
    if(/* second rule matched */)
      cout<<" Second rule matched"<<endl;
}

How do I write the if condition (in C/C++) ? (I am using version 3.1.3 of
the antlr)

Thanks!

Regards,
Achint

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

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to