Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorssankaran2013-12-02 05:27:27 +0000
committerssankaran2013-12-02 05:27:27 +0000
commit96c4102f3d029f4dc8f7d84cd7957662a88272cf (patch)
tree44ef1dd916bee9cfa09f05a42f8f28582dbcdd2f
parentb082e1efeb6ba3527e560f37e38edd781283b70c (diff)
downloadeclipse.jdt.core-96c4102f3d029f4dc8f7d84cd7957662a88272cf.tar.gz
eclipse.jdt.core-96c4102f3d029f4dc8f7d84cd7957662a88272cf.tar.xz
eclipse.jdt.core-96c4102f3d029f4dc8f7d84cd7957662a88272cf.zip
AnirGram
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java3
-rw-r--r--org.eclipse.jdt.core/grammar/java.g12
2 files changed, 14 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index b80ca57b8f..3e7c5edb66 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -2250,6 +2250,9 @@ protected void consumeBlock() {
}
pushOnAstStack(block);
}
+protected void consumeBlockStatement() {
+ // todo.
+}
protected void consumeBlockStatements() {
// BlockStatements ::= BlockStatements BlockStatement
concatNodeLists();
diff --git a/org.eclipse.jdt.core/grammar/java.g b/org.eclipse.jdt.core/grammar/java.g
index f1c0e1d958..e0fccd05fc 100644
--- a/org.eclipse.jdt.core/grammar/java.g
+++ b/org.eclipse.jdt.core/grammar/java.g
@@ -204,6 +204,7 @@ Goal ::= '%' Expression
Goal ::= '%' ArrayInitializer
-- completion parser
Goal ::= '~' BlockStatementsopt
+Goal ::= '{' BlockStatementopt
-- source type converter
Goal ::= '||' MemberValue
-- syntax diagnosis
@@ -993,11 +994,20 @@ OpenBlock ::= $empty
/.$putCase consumeOpenBlock() ; $break ./
/:$readableName OpenBlock:/
-BlockStatements -> BlockStatement
+BlockStatements ::= BlockStatement
+/.$putCase consumeBlockStatement() ; $break ./
+/:$readableName BlockStatements:/
BlockStatements ::= BlockStatements BlockStatement
/.$putCase consumeBlockStatements() ; $break ./
/:$readableName BlockStatements:/
+-- Production name hardcoded in parser. Must be ::= and not ->
+BlockStatementopt ::= BlockStatementopt0
+/:$readableName BlockStatementopt:/
+BlockStatementopt0 -> $empty
+BlockStatementopt0 -> BlockStatement
+/:$readableName BlockStatementopt0:/
+
BlockStatement -> LocalVariableDeclarationStatement
BlockStatement -> Statement
--1.1 feature

Back to the top