Bison: Optional tokens in a single rule.
- by Simone Margaritelli
Hi there .. i'm using GNU Bison 2.4.2 to write a grammar for a new language i'm working on and i have a question.
When i specify a rule, let's say :
statement : T_CLASS T_IDENT '{' T_CLASS_MEMBERS '}' {
// create a node for the statement ...
}
If i have a variation on the rule, for instance
statement : T_CLASS T_IDENT T_EXTENDS…