I am still fairly new to antlr and when looking at the 1.6 Java grammar I noticed the following statement rule:
statement : block | ('assert' ) expression (':' expression)? ';' | 'assert' expression (':' expression)? ';' | 'if' parExpression statement ('else' statement)? | forstatement | 'while' parExpression statement | 'do' statement 'while' parExpression ';' | trystatement | 'switch' parExpression '{' switchBlockStatementGroups '}' | 'synchronized' parExpression block | 'return' (expression )? ';' | 'throw' expression ';' | 'break' (IDENTIFIER )? ';' | 'continue' (IDENTIFIER )? ';' | expression ';' | IDENTIFIER ':' statement | ';' ; My question is about the two lines for assert: | ('assert' ) expression (':' expression)? ';' | 'assert' expression (':' expression)? ';' To me those look identicle - am I missing something? Is there some nuance to the parens that I don't understand? Thanks, jeremy 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 il-antlr-inter...@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.