From 5924d3f9352aad689496b991b0ba04ea6db19fd3 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Tue, 30 Oct 2012 16:39:12 -0500 Subject: [PATCH] Corrections to Java grammars used by TestPerformance --- tool/test/org/antlr/v4/test/Java-LR.g4 | 3 +-- tool/test/org/antlr/v4/test/Java.g4 | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tool/test/org/antlr/v4/test/Java-LR.g4 b/tool/test/org/antlr/v4/test/Java-LR.g4 index b0e593bed..5d97bd432 100644 --- a/tool/test/org/antlr/v4/test/Java-LR.g4 +++ b/tool/test/org/antlr/v4/test/Java-LR.g4 @@ -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? ; diff --git a/tool/test/org/antlr/v4/test/Java.g4 b/tool/test/org/antlr/v4/test/Java.g4 index 7409341d4..ccf221cb1 100644 --- a/tool/test/org/antlr/v4/test/Java.g4 +++ b/tool/test/org/antlr/v4/test/Java.g4 @@ -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? ;