Corrections to Java grammars used by TestPerformance

This commit is contained in:
Sam Harwell 2012-10-30 16:39:12 -05:00
parent efa9ea7811
commit 5924d3f935
2 changed files with 2 additions and 5 deletions

View File

@ -624,7 +624,7 @@ variableModifiers
statement
: block
| ASSERT expression (':' expression)? ';'
| 'if' parExpression statement (options {k=1;}:'else' statement)?
| 'if' parExpression statement ('else' statement)?
| 'for' '(' forControl ')' statement
| 'while' parExpression statement
| 'do' statement 'while' parExpression ';'
@ -675,7 +675,6 @@ switchLabel
;
forControl
options {k=3;} // be efficient for common case: for (ID ID : ID) ...
: enhancedForControl
| forInit? ';' expression? ';' forUpdate?
;

View File

@ -166,7 +166,6 @@
* Character.isJavaIdentifierPart(int) returns true."
*/
grammar Java;
options {backtrack=true; memoize=true;}
@lexer::members {
protected boolean enumIsKeyword = true;
@ -622,7 +621,7 @@ variableModifiers
statement
: block
| ASSERT expression (':' expression)? ';'
| 'if' parExpression statement (options {k=1;}:'else' statement)?
| 'if' parExpression statement ('else' statement)?
| 'for' '(' forControl ')' statement
| 'while' parExpression statement
| 'do' statement 'while' parExpression ';'
@ -673,7 +672,6 @@ switchLabel
;
forControl
options {k=3;} // be efficient for common case: for (ID ID : ID) ...
: enhancedForControl
| forInit? ';' expression? ';' forUpdate?
;