aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-02-26 08:58:58 (EST)
committersefftinge2009-02-26 08:58:58 (EST)
commit9da430f45cc94cd1fc98033b241177a6f26a9fde (patch)
tree0d965f8fd73fd7b497cceced7e99036c1fce2520
parentb853645e2b4ace05020a1c69f99965ab03003d90 (diff)
downloadorg.eclipse.xtext-9da430f45cc94cd1fc98033b241177a6f26a9fde.zip
org.eclipse.xtext-9da430f45cc94cd1fc98033b241177a6f26a9fde.tar.gz
org.eclipse.xtext-9da430f45cc94cd1fc98033b241177a6f26a9fde.tar.bz2
Packrat parser: Backtracking retries other paths in alternatives, that have not yet been parsed
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.xmi58
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parseTreeConstruction/EpatchTestLanguageParsetreeConstructor.java268
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g102
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguageParser.java366
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageParserConfiguration.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageSingleAssignmentValueConsumer.java290
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/services/EpatchTestLanguageGrammarAccess.java80
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.xtext2
8 files changed, 590 insertions, 590 deletions
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.xmi
index 3b63891..17803c5 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.xmi
@@ -582,47 +582,47 @@
</groups>
</groups>
<groups xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" feature="import" operator="=">
+ <abstractTokens xsi:type="xtext:Assignment" feature="refObject" operator="=">
<terminal xsi:type="xtext:CrossReference" rule="/1/@rules.0">
<type metamodel="/0/@metamodelDeclarations.0">
- <type xsi:type="ecore:EClass" href="http://www.eclipse.org/2008/tmf/xtext/EpatchTestLanguage#//Import"/>
+ <type xsi:type="ecore:EClass" href="http://www.eclipse.org/2008/tmf/xtext/EpatchTestLanguage#//NamedObject"/>
</type>
</terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" feature="impFrag" operator="=">
- <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
- </abstractTokens>
- </groups>
- </groups>
- <groups xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" feature="refObject" operator="=">
- <terminal xsi:type="xtext:CrossReference" rule="/1/@rules.0">
- <type metamodel="/0/@metamodelDeclarations.0">
- <type xsi:type="ecore:EClass" href="http://www.eclipse.org/2008/tmf/xtext/EpatchTestLanguage#//NamedObject"/>
- </type>
- </terminal>
- </abstractTokens>
- <abstractTokens xsi:type="xtext:Group" cardinality="?">
- <abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Keyword" value="."/>
- <abstractTokens xsi:type="xtext:Assignment" feature="refFeature" operator="=">
- <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
- </abstractTokens>
- </abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Keyword" value="["/>
- <abstractTokens xsi:type="xtext:Assignment" feature="refIndex" operator="=">
- <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.1"/>
+ <abstractTokens xsi:type="xtext:Keyword" value="."/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="refFeature" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Group" cardinality="?">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="["/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="refIndex" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.1"/>
+ </abstractTokens>
</abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="]"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Keyword" value="]"/>
</abstractTokens>
- </abstractTokens>
+ </groups>
+ </groups>
+ <groups xsi:type="xtext:Assignment" feature="newObject" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.18"/>
</groups>
</groups>
- <groups xsi:type="xtext:Assignment" feature="newObject" operator="=">
- <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.18"/>
+ <groups xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Assignment" feature="import" operator="=">
+ <terminal xsi:type="xtext:CrossReference" rule="/1/@rules.0">
+ <type metamodel="/0/@metamodelDeclarations.0">
+ <type xsi:type="ecore:EClass" href="http://www.eclipse.org/2008/tmf/xtext/EpatchTestLanguage#//Import"/>
+ </type>
+ </terminal>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" feature="impFrag" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
+ </abstractTokens>
</groups>
</alternatives>
</rules>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parseTreeConstruction/EpatchTestLanguageParsetreeConstructor.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parseTreeConstruction/EpatchTestLanguageParsetreeConstructor.java
index 1d92129..98956d8 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parseTreeConstruction/EpatchTestLanguageParsetreeConstructor.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parseTreeConstruction/EpatchTestLanguageParsetreeConstructor.java
@@ -5888,7 +5888,7 @@ protected class SingleAssignmentValue_Alternatives extends AlternativesToken {
@Override
protected Solution createSolution() {
- AbstractToken t = (first) ? new SingleAssignmentValue_1_Assignment_newObject(current, this) : new SingleAssignmentValue_0_Alternatives(current, this);
+ AbstractToken t = (first) ? new SingleAssignmentValue_1_Group(current, this) : new SingleAssignmentValue_0_Alternatives(current, this);
Solution s = t.firstSolution();
if(s == null && activateNextSolution()) s = createSolution();
if(s == null) return null;
@@ -5911,7 +5911,7 @@ protected class SingleAssignmentValue_0_Alternatives extends AlternativesToken {
@Override
protected Solution createSolution() {
- AbstractToken t = (first) ? new SingleAssignmentValue_0_1_Group(current, this) : new SingleAssignmentValue_0_0_Alternatives(current, this);
+ AbstractToken t = (first) ? new SingleAssignmentValue_0_1_Assignment_newObject(current, this) : new SingleAssignmentValue_0_0_Alternatives(current, this);
Solution s = t.firstSolution();
if(s == null && activateNextSolution()) s = createSolution();
if(s == null) return null;
@@ -6033,9 +6033,9 @@ protected class SingleAssignmentValue_0_0_1_Group extends GroupToken {
@Override
protected Solution createSolution() {
- Solution s1 = new SingleAssignmentValue_0_0_1_1_Assignment_impFrag(current, this).firstSolution();
+ Solution s1 = new SingleAssignmentValue_0_0_1_1_Group(current, this).firstSolution();
while(s1 != null) {
- Solution s2 = new SingleAssignmentValue_0_0_1_0_Assignment_import(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ Solution s2 = new SingleAssignmentValue_0_0_1_0_Assignment_refObject(s1.getCurrent(), s1.getPredecessor()).firstSolution();
if(s2 == null) {
s1 = s1.getPredecessor().nextSolution(this,s1);
if(s1 == null) return null;
@@ -6050,100 +6050,15 @@ protected class SingleAssignmentValue_0_0_1_Group extends GroupToken {
}
// not supported
-protected class SingleAssignmentValue_0_0_1_0_Assignment_import extends AssignmentToken {
+protected class SingleAssignmentValue_0_0_1_0_Assignment_refObject extends AssignmentToken {
- public SingleAssignmentValue_0_0_1_0_Assignment_import(IInstanceDescription curr, AbstractToken pred) {
+ public SingleAssignmentValue_0_0_1_0_Assignment_refObject(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
@Override
public Assignment getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele0010AssignmentImport();
- }
-
- @Override
- protected Solution createSolution() {
- if((value = current.getConsumable("import",IS_REQUIRED)) == null) return null;
- IInstanceDescription obj = current.cloneAndConsume("import");
- if(value instanceof EObject) { // xtext::CrossReference
- IInstanceDescription param = getDescr((EObject)value);
- if(param.isInstanceOf(grammarAccess.prSingleAssignmentValue().ele00100CrossReferenceEStringImport().getType().getType())) {
- type = AssignmentType.CR;
- element = grammarAccess.prSingleAssignmentValue().ele00100CrossReferenceEStringImport();
- return new Solution(obj);
- }
- }
- return null;
- }
-}
-
-// not supported
-protected class SingleAssignmentValue_0_0_1_1_Assignment_impFrag extends AssignmentToken {
-
- public SingleAssignmentValue_0_0_1_1_Assignment_impFrag(IInstanceDescription curr, AbstractToken pred) {
- super(curr, pred, !IS_MANY, IS_REQUIRED);
- }
-
- @Override
- public Assignment getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele0011AssignmentImpFrag();
- }
-
- @Override
- protected Solution createSolution() {
- if((value = current.getConsumable("impFrag",IS_REQUIRED)) == null) return null;
- IInstanceDescription obj = current.cloneAndConsume("impFrag");
- if(Boolean.TRUE.booleanValue()) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
- type = AssignmentType.LRC;
- element = grammarAccess.prSingleAssignmentValue().ele00110LexerRuleCallFRAGMENT();
- return new Solution(obj);
- }
- return null;
- }
-}
-
-
-
-// not supported
-protected class SingleAssignmentValue_0_1_Group extends GroupToken {
-
- public SingleAssignmentValue_0_1_Group(IInstanceDescription curr, AbstractToken pred) {
- super(curr, pred, !IS_MANY, IS_REQUIRED);
- }
-
- @Override
- public Group getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele01Group();
- }
-
- @Override
- protected Solution createSolution() {
- Solution s1 = new SingleAssignmentValue_0_1_1_Group(current, this).firstSolution();
- while(s1 != null) {
- Solution s2 = new SingleAssignmentValue_0_1_0_Assignment_refObject(s1.getCurrent(), s1.getPredecessor()).firstSolution();
- if(s2 == null) {
- s1 = s1.getPredecessor().nextSolution(this,s1);
- if(s1 == null) return null;
- } else {
- last = s2.getPredecessor();
- return s2;
- }
- }
- return null;
-
- }
-}
-
-// not supported
-protected class SingleAssignmentValue_0_1_0_Assignment_refObject extends AssignmentToken {
-
- public SingleAssignmentValue_0_1_0_Assignment_refObject(IInstanceDescription curr, AbstractToken pred) {
- super(curr, pred, !IS_MANY, IS_REQUIRED);
- }
-
- @Override
- public Assignment getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele010AssignmentRefObject();
+ return grammarAccess.prSingleAssignmentValue().ele0010AssignmentRefObject();
}
@Override
@@ -6152,9 +6067,9 @@ protected class SingleAssignmentValue_0_1_0_Assignment_refObject extends Assignm
IInstanceDescription obj = current.cloneAndConsume("refObject");
if(value instanceof EObject) { // xtext::CrossReference
IInstanceDescription param = getDescr((EObject)value);
- if(param.isInstanceOf(grammarAccess.prSingleAssignmentValue().ele0100CrossReferenceEStringNamedObject().getType().getType())) {
+ if(param.isInstanceOf(grammarAccess.prSingleAssignmentValue().ele00100CrossReferenceEStringNamedObject().getType().getType())) {
type = AssignmentType.CR;
- element = grammarAccess.prSingleAssignmentValue().ele0100CrossReferenceEStringNamedObject();
+ element = grammarAccess.prSingleAssignmentValue().ele00100CrossReferenceEStringNamedObject();
return new Solution(obj);
}
}
@@ -6163,22 +6078,22 @@ protected class SingleAssignmentValue_0_1_0_Assignment_refObject extends Assignm
}
// not supported
-protected class SingleAssignmentValue_0_1_1_Group extends GroupToken {
+protected class SingleAssignmentValue_0_0_1_1_Group extends GroupToken {
- public SingleAssignmentValue_0_1_1_Group(IInstanceDescription curr, AbstractToken pred) {
+ public SingleAssignmentValue_0_0_1_1_Group(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, !IS_REQUIRED);
}
@Override
public Group getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele011Group();
+ return grammarAccess.prSingleAssignmentValue().ele0011Group();
}
@Override
protected Solution createSolution() {
- Solution s1 = new SingleAssignmentValue_0_1_1_1_Group(current, this).firstSolution();
+ Solution s1 = new SingleAssignmentValue_0_0_1_1_1_Group(current, this).firstSolution();
while(s1 != null) {
- Solution s2 = new SingleAssignmentValue_0_1_1_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ Solution s2 = new SingleAssignmentValue_0_0_1_1_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
if(s2 == null) {
s1 = s1.getPredecessor().nextSolution(this,s1);
if(s1 == null) return null;
@@ -6193,22 +6108,22 @@ protected class SingleAssignmentValue_0_1_1_Group extends GroupToken {
}
// not supported
-protected class SingleAssignmentValue_0_1_1_0_Group extends GroupToken {
+protected class SingleAssignmentValue_0_0_1_1_0_Group extends GroupToken {
- public SingleAssignmentValue_0_1_1_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ public SingleAssignmentValue_0_0_1_1_0_Group(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
@Override
public Group getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele0110Group();
+ return grammarAccess.prSingleAssignmentValue().ele00110Group();
}
@Override
protected Solution createSolution() {
- Solution s1 = new SingleAssignmentValue_0_1_1_0_1_Assignment_refFeature(current, this).firstSolution();
+ Solution s1 = new SingleAssignmentValue_0_0_1_1_0_1_Assignment_refFeature(current, this).firstSolution();
while(s1 != null) {
- Solution s2 = new SingleAssignmentValue_0_1_1_0_0_Keyword(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ Solution s2 = new SingleAssignmentValue_0_0_1_1_0_0_Keyword(s1.getCurrent(), s1.getPredecessor()).firstSolution();
if(s2 == null) {
s1 = s1.getPredecessor().nextSolution(this,s1);
if(s1 == null) return null;
@@ -6223,27 +6138,27 @@ protected class SingleAssignmentValue_0_1_1_0_Group extends GroupToken {
}
// not supported
-protected class SingleAssignmentValue_0_1_1_0_0_Keyword extends KeywordToken {
+protected class SingleAssignmentValue_0_0_1_1_0_0_Keyword extends KeywordToken {
- public SingleAssignmentValue_0_1_1_0_0_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ public SingleAssignmentValue_0_0_1_1_0_0_Keyword(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
public Keyword getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele01100KeywordFullStop();
+ return grammarAccess.prSingleAssignmentValue().ele001100KeywordFullStop();
}
}
// not supported
-protected class SingleAssignmentValue_0_1_1_0_1_Assignment_refFeature extends AssignmentToken {
+protected class SingleAssignmentValue_0_0_1_1_0_1_Assignment_refFeature extends AssignmentToken {
- public SingleAssignmentValue_0_1_1_0_1_Assignment_refFeature(IInstanceDescription curr, AbstractToken pred) {
+ public SingleAssignmentValue_0_0_1_1_0_1_Assignment_refFeature(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
@Override
public Assignment getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele01101AssignmentRefFeature();
+ return grammarAccess.prSingleAssignmentValue().ele001101AssignmentRefFeature();
}
@Override
@@ -6252,7 +6167,7 @@ protected class SingleAssignmentValue_0_1_1_0_1_Assignment_refFeature extends As
IInstanceDescription obj = current.cloneAndConsume("refFeature");
if(Boolean.TRUE.booleanValue()) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
type = AssignmentType.LRC;
- element = grammarAccess.prSingleAssignmentValue().ele011010LexerRuleCallID();
+ element = grammarAccess.prSingleAssignmentValue().ele0011010LexerRuleCallID();
return new Solution(obj);
}
return null;
@@ -6261,22 +6176,22 @@ protected class SingleAssignmentValue_0_1_1_0_1_Assignment_refFeature extends As
// not supported
-protected class SingleAssignmentValue_0_1_1_1_Group extends GroupToken {
+protected class SingleAssignmentValue_0_0_1_1_1_Group extends GroupToken {
- public SingleAssignmentValue_0_1_1_1_Group(IInstanceDescription curr, AbstractToken pred) {
+ public SingleAssignmentValue_0_0_1_1_1_Group(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, !IS_REQUIRED);
}
@Override
public Group getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele0111Group();
+ return grammarAccess.prSingleAssignmentValue().ele00111Group();
}
@Override
protected Solution createSolution() {
- Solution s1 = new SingleAssignmentValue_0_1_1_1_1_Keyword(current, this).firstSolution();
+ Solution s1 = new SingleAssignmentValue_0_0_1_1_1_1_Keyword(current, this).firstSolution();
while(s1 != null) {
- Solution s2 = new SingleAssignmentValue_0_1_1_1_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ Solution s2 = new SingleAssignmentValue_0_0_1_1_1_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
if(s2 == null) {
s1 = s1.getPredecessor().nextSolution(this,s1);
if(s1 == null) return null;
@@ -6291,22 +6206,22 @@ protected class SingleAssignmentValue_0_1_1_1_Group extends GroupToken {
}
// not supported
-protected class SingleAssignmentValue_0_1_1_1_0_Group extends GroupToken {
+protected class SingleAssignmentValue_0_0_1_1_1_0_Group extends GroupToken {
- public SingleAssignmentValue_0_1_1_1_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ public SingleAssignmentValue_0_0_1_1_1_0_Group(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
@Override
public Group getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele01110Group();
+ return grammarAccess.prSingleAssignmentValue().ele001110Group();
}
@Override
protected Solution createSolution() {
- Solution s1 = new SingleAssignmentValue_0_1_1_1_0_1_Assignment_refIndex(current, this).firstSolution();
+ Solution s1 = new SingleAssignmentValue_0_0_1_1_1_0_1_Assignment_refIndex(current, this).firstSolution();
while(s1 != null) {
- Solution s2 = new SingleAssignmentValue_0_1_1_1_0_0_Keyword(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ Solution s2 = new SingleAssignmentValue_0_0_1_1_1_0_0_Keyword(s1.getCurrent(), s1.getPredecessor()).firstSolution();
if(s2 == null) {
s1 = s1.getPredecessor().nextSolution(this,s1);
if(s1 == null) return null;
@@ -6321,27 +6236,27 @@ protected class SingleAssignmentValue_0_1_1_1_0_Group extends GroupToken {
}
// not supported
-protected class SingleAssignmentValue_0_1_1_1_0_0_Keyword extends KeywordToken {
+protected class SingleAssignmentValue_0_0_1_1_1_0_0_Keyword extends KeywordToken {
- public SingleAssignmentValue_0_1_1_1_0_0_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ public SingleAssignmentValue_0_0_1_1_1_0_0_Keyword(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
public Keyword getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele011100KeywordLeftSquareBracket();
+ return grammarAccess.prSingleAssignmentValue().ele0011100KeywordLeftSquareBracket();
}
}
// not supported
-protected class SingleAssignmentValue_0_1_1_1_0_1_Assignment_refIndex extends AssignmentToken {
+protected class SingleAssignmentValue_0_0_1_1_1_0_1_Assignment_refIndex extends AssignmentToken {
- public SingleAssignmentValue_0_1_1_1_0_1_Assignment_refIndex(IInstanceDescription curr, AbstractToken pred) {
+ public SingleAssignmentValue_0_0_1_1_1_0_1_Assignment_refIndex(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
@Override
public Assignment getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele011101AssignmentRefIndex();
+ return grammarAccess.prSingleAssignmentValue().ele0011101AssignmentRefIndex();
}
@Override
@@ -6350,7 +6265,7 @@ protected class SingleAssignmentValue_0_1_1_1_0_1_Assignment_refIndex extends As
IInstanceDescription obj = current.cloneAndConsume("refIndex");
if(Boolean.TRUE.booleanValue()) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
type = AssignmentType.LRC;
- element = grammarAccess.prSingleAssignmentValue().ele0111010LexerRuleCallINT();
+ element = grammarAccess.prSingleAssignmentValue().ele00111010LexerRuleCallINT();
return new Solution(obj);
}
return null;
@@ -6359,14 +6274,14 @@ protected class SingleAssignmentValue_0_1_1_1_0_1_Assignment_refIndex extends As
// not supported
-protected class SingleAssignmentValue_0_1_1_1_1_Keyword extends KeywordToken {
+protected class SingleAssignmentValue_0_0_1_1_1_1_Keyword extends KeywordToken {
- public SingleAssignmentValue_0_1_1_1_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ public SingleAssignmentValue_0_0_1_1_1_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
public Keyword getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele01111KeywordRightSquareBracket();
+ return grammarAccess.prSingleAssignmentValue().ele001111KeywordRightSquareBracket();
}
}
@@ -6375,15 +6290,15 @@ protected class SingleAssignmentValue_0_1_1_1_1_Keyword extends KeywordToken {
// not supported
-protected class SingleAssignmentValue_1_Assignment_newObject extends AssignmentToken {
+protected class SingleAssignmentValue_0_1_Assignment_newObject extends AssignmentToken {
- public SingleAssignmentValue_1_Assignment_newObject(IInstanceDescription curr, AbstractToken pred) {
+ public SingleAssignmentValue_0_1_Assignment_newObject(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
@Override
public Assignment getGrammarElement() {
- return grammarAccess.prSingleAssignmentValue().ele1AssignmentNewObject();
+ return grammarAccess.prSingleAssignmentValue().ele01AssignmentNewObject();
}
@Override
@@ -6408,6 +6323,91 @@ protected class SingleAssignmentValue_1_Assignment_newObject extends AssignmentT
}
+// not supported
+protected class SingleAssignmentValue_1_Group extends GroupToken {
+
+ public SingleAssignmentValue_1_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ @Override
+ public Group getGrammarElement() {
+ return grammarAccess.prSingleAssignmentValue().ele1Group();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ Solution s1 = new SingleAssignmentValue_1_1_Assignment_impFrag(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new SingleAssignmentValue_1_0_Assignment_import(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this,s1);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// not supported
+protected class SingleAssignmentValue_1_0_Assignment_import extends AssignmentToken {
+
+ public SingleAssignmentValue_1_0_Assignment_import(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ @Override
+ public Assignment getGrammarElement() {
+ return grammarAccess.prSingleAssignmentValue().ele10AssignmentImport();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ if((value = current.getConsumable("import",IS_REQUIRED)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("import");
+ if(value instanceof EObject) { // xtext::CrossReference
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf(grammarAccess.prSingleAssignmentValue().ele100CrossReferenceEStringImport().getType().getType())) {
+ type = AssignmentType.CR;
+ element = grammarAccess.prSingleAssignmentValue().ele100CrossReferenceEStringImport();
+ return new Solution(obj);
+ }
+ }
+ return null;
+ }
+}
+
+// not supported
+protected class SingleAssignmentValue_1_1_Assignment_impFrag extends AssignmentToken {
+
+ public SingleAssignmentValue_1_1_Assignment_impFrag(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ @Override
+ public Assignment getGrammarElement() {
+ return grammarAccess.prSingleAssignmentValue().ele11AssignmentImpFrag();
+ }
+
+ @Override
+ protected Solution createSolution() {
+ if((value = current.getConsumable("impFrag",IS_REQUIRED)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("impFrag");
+ if(Boolean.TRUE.booleanValue()) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
+ type = AssignmentType.LRC;
+ element = grammarAccess.prSingleAssignmentValue().ele110LexerRuleCallFRAGMENT();
+ return new Solution(obj);
+ }
+ return null;
+ }
+}
+
+
+
/************ end Rule SingleAssignmentValue ****************/
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g
index 5c15d49..4d5910e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g
@@ -1895,57 +1895,20 @@ ruleSingleAssignmentValue returns [EObject current=null]
}
RULE_ID
{
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele00100CrossReferenceEStringImport(), "import");
- }
-
- // TODO assign feature to currentNode
-
-)(
-
- lv_impFrag_3= RULE_FRAGMENT
- {
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele00110LexerRuleCallFRAGMENT(), "impFrag");
- }
-
- {
- if ($current==null) {
- $current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
- associateNodeWithAstElement(currentNode, $current);
- }
-
- try {
- set($current, "impFrag", lv_impFrag_3, "FRAGMENT", lastConsumedNode);
- } catch (ValueConverterException vce) {
- handleValueConverterException(vce);
- }
- }
-
-)))
- |((
-
-
- {
- if ($current==null) {
- $current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
- associateNodeWithAstElement(currentNode, $current);
- }
- }
- RULE_ID
- {
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele0100CrossReferenceEStringNamedObject(), "refObject");
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele00100CrossReferenceEStringNamedObject(), "refObject");
}
// TODO assign feature to currentNode
)(('.'
{
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele01100KeywordFullStop(), null);
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele001100KeywordFullStop(), null);
}
(
- lv_refFeature_6= RULE_ID
+ lv_refFeature_4= RULE_ID
{
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele011010LexerRuleCallID(), "refFeature");
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele0011010LexerRuleCallID(), "refFeature");
}
{
@@ -1955,7 +1918,7 @@ ruleSingleAssignmentValue returns [EObject current=null]
}
try {
- set($current, "refFeature", lv_refFeature_6, "ID", lastConsumedNode);
+ set($current, "refFeature", lv_refFeature_4, "ID", lastConsumedNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
}
@@ -1963,13 +1926,13 @@ ruleSingleAssignmentValue returns [EObject current=null]
))(('['
{
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele011100KeywordLeftSquareBracket(), null);
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele0011100KeywordLeftSquareBracket(), null);
}
(
- lv_refIndex_8= RULE_INT
+ lv_refIndex_6= RULE_INT
{
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele0111010LexerRuleCallINT(), "refIndex");
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele00111010LexerRuleCallINT(), "refIndex");
}
{
@@ -1979,7 +1942,7 @@ ruleSingleAssignmentValue returns [EObject current=null]
}
try {
- set($current, "refIndex", lv_refIndex_8, "INT", lastConsumedNode);
+ set($current, "refIndex", lv_refIndex_6, "INT", lastConsumedNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
}
@@ -1987,16 +1950,16 @@ ruleSingleAssignmentValue returns [EObject current=null]
))']'
{
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele01111KeywordRightSquareBracket(), null);
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele001111KeywordRightSquareBracket(), null);
}
)?)?))
|(
{
- currentNode=createCompositeNode(grammarAccess.prSingleAssignmentValue().ele10ParserRuleCallCreatedObject(), currentNode);
+ currentNode=createCompositeNode(grammarAccess.prSingleAssignmentValue().ele010ParserRuleCallCreatedObject(), currentNode);
}
- lv_newObject_10=ruleCreatedObject
+ lv_newObject_8=ruleCreatedObject
{
if ($current==null) {
$current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
@@ -2004,14 +1967,51 @@ ruleSingleAssignmentValue returns [EObject current=null]
}
try {
- set($current, "newObject", lv_newObject_10, "CreatedObject", currentNode);
+ set($current, "newObject", lv_newObject_8, "CreatedObject", currentNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
}
currentNode = currentNode.getParent();
}
-));
+))
+ |((
+
+
+ {
+ if ($current==null) {
+ $current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
+ associateNodeWithAstElement(currentNode, $current);
+ }
+ }
+ RULE_ID
+ {
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele100CrossReferenceEStringImport(), "import");
+ }
+
+ // TODO assign feature to currentNode
+
+)(
+
+ lv_impFrag_10= RULE_FRAGMENT
+ {
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele110LexerRuleCallFRAGMENT(), "impFrag");
+ }
+
+ {
+ if ($current==null) {
+ $current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ try {
+ set($current, "impFrag", lv_impFrag_10, "FRAGMENT", lastConsumedNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+ }
+
+)));
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguageParser.java
index b4c0f63..22e258a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguageParser.java
@@ -4097,94 +4097,94 @@ public class InternalEpatchTestLanguageParser extends AbstractInternalAntlrParse
// $ANTLR start ruleSingleAssignmentValue
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1838:1: ruleSingleAssignmentValue returns [EObject current=null] : ( ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_10= ruleCreatedObject ) ) ;
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1838:1: ruleSingleAssignmentValue returns [EObject current=null] : ( ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_8= ruleCreatedObject ) ) | ( ( RULE_ID ) (lv_impFrag_10= RULE_FRAGMENT ) ) ) ;
public final EObject ruleSingleAssignmentValue() throws RecognitionException {
EObject current = null;
Token lv_keyword_0=null;
Token lv_value_1=null;
- Token lv_impFrag_3=null;
- Token lv_refFeature_6=null;
- Token lv_refIndex_8=null;
- EObject lv_newObject_10 = null;
+ Token lv_refFeature_4=null;
+ Token lv_refIndex_6=null;
+ Token lv_impFrag_10=null;
+ EObject lv_newObject_8 = null;
EObject temp=null; setCurrentLookahead(); resetLookahead();
try {
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1843:6: ( ( ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_10= ruleCreatedObject ) ) )
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:1: ( ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_10= ruleCreatedObject ) )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1843:6: ( ( ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_8= ruleCreatedObject ) ) | ( ( RULE_ID ) (lv_impFrag_10= RULE_FRAGMENT ) ) ) )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:1: ( ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_8= ruleCreatedObject ) ) | ( ( RULE_ID ) (lv_impFrag_10= RULE_FRAGMENT ) ) )
{
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:1: ( ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_10= ruleCreatedObject ) )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:1: ( ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_8= ruleCreatedObject ) ) | ( ( RULE_ID ) (lv_impFrag_10= RULE_FRAGMENT ) ) )
int alt39=2;
int LA39_0 = input.LA(1);
- if ( ((LA39_0>=RULE_ID && LA39_0<=RULE_STRING)||LA39_0==33) ) {
+ if ( (LA39_0==RULE_STRING||(LA39_0>=33 && LA39_0<=35)) ) {
alt39=1;
}
- else if ( ((LA39_0>=34 && LA39_0<=35)) ) {
- alt39=2;
+ else if ( (LA39_0==RULE_ID) ) {
+ int LA39_2 = input.LA(2);
+
+ if ( (LA39_2==RULE_FRAGMENT) ) {
+ alt39=2;
+ }
+ else if ( (LA39_2==EOF||LA39_2==19||LA39_2==24||LA39_2==28) ) {
+ alt39=1;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("1844:1: ( ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_8= ruleCreatedObject ) ) | ( ( RULE_ID ) (lv_impFrag_10= RULE_FRAGMENT ) ) )", 39, 2, input);
+
+ throw nvae;
+ }
}
else {
NoViableAltException nvae =
- new NoViableAltException("1844:1: ( ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_10= ruleCreatedObject ) )", 39, 0, input);
+ new NoViableAltException("1844:1: ( ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_8= ruleCreatedObject ) ) | ( ( RULE_ID ) (lv_impFrag_10= RULE_FRAGMENT ) ) )", 39, 0, input);
throw nvae;
}
switch (alt39) {
case 1 :
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:2: ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )? ) )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:2: ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_8= ruleCreatedObject ) )
{
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:2: ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )? ) )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:2: ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_8= ruleCreatedObject ) )
int alt38=2;
int LA38_0 = input.LA(1);
- if ( (LA38_0==RULE_STRING||LA38_0==33) ) {
+ if ( ((LA38_0>=RULE_ID && LA38_0<=RULE_STRING)||LA38_0==33) ) {
alt38=1;
}
- else if ( (LA38_0==RULE_ID) ) {
- int LA38_2 = input.LA(2);
-
- if ( (LA38_2==RULE_FRAGMENT) ) {
- alt38=1;
- }
- else if ( (LA38_2==EOF||LA38_2==19||LA38_2==24||LA38_2==28) ) {
- alt38=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("1844:2: ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )? ) )", 38, 2, input);
-
- throw nvae;
- }
+ else if ( ((LA38_0>=34 && LA38_0<=35)) ) {
+ alt38=2;
}
else {
NoViableAltException nvae =
- new NoViableAltException("1844:2: ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )? ) )", 38, 0, input);
+ new NoViableAltException("1844:2: ( ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) ) | (lv_newObject_8= ruleCreatedObject ) )", 38, 0, input);
throw nvae;
}
switch (alt38) {
case 1 :
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:3: ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:3: ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) )
{
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:3: ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) )
- int alt35=2;
- int LA35_0 = input.LA(1);
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:3: ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) )
+ int alt37=2;
+ int LA37_0 = input.LA(1);
- if ( (LA35_0==RULE_STRING||LA35_0==33) ) {
- alt35=1;
+ if ( (LA37_0==RULE_STRING||LA37_0==33) ) {
+ alt37=1;
}
- else if ( (LA35_0==RULE_ID) ) {
- alt35=2;
+ else if ( (LA37_0==RULE_ID) ) {
+ alt37=2;
}
else {
NoViableAltException nvae =
- new NoViableAltException("1844:3: ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) ) )", 35, 0, input);
+ new NoViableAltException("1844:3: ( ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) ) | ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? ) )", 37, 0, input);
throw nvae;
}
- switch (alt35) {
+ switch (alt37) {
case 1 :
// ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1844:4: ( (lv_keyword_0= 'null' ) | (lv_value_1= RULE_STRING ) )
{
@@ -4270,10 +4270,10 @@ public class InternalEpatchTestLanguageParser extends AbstractInternalAntlrParse
}
break;
case 2 :
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1887:6: ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1887:6: ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? )
{
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1887:6: ( ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT ) )
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1887:7: ( RULE_ID ) (lv_impFrag_3= RULE_FRAGMENT )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1887:6: ( ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )? )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1887:7: ( RULE_ID ) ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )?
{
// ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1887:7: ( RULE_ID )
// ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1890:3: RULE_ID
@@ -4286,137 +4286,36 @@ public class InternalEpatchTestLanguageParser extends AbstractInternalAntlrParse
match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSingleAssignmentValue3977);
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele00100CrossReferenceEStringImport(), "import");
-
-
- }
-
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1903:2: (lv_impFrag_3= RULE_FRAGMENT )
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1905:6: lv_impFrag_3= RULE_FRAGMENT
- {
- lv_impFrag_3=(Token)input.LT(1);
- match(input,RULE_FRAGMENT,FOLLOW_RULE_FRAGMENT_in_ruleSingleAssignmentValue4002);
-
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele00110LexerRuleCallFRAGMENT(), "impFrag");
-
-
- if (current==null) {
- current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
- associateNodeWithAstElement(currentNode, current);
- }
-
- try {
- set(current, "impFrag", lv_impFrag_3, "FRAGMENT", lastConsumedNode);
- } catch (ValueConverterException vce) {
- handleValueConverterException(vce);
- }
-
-
- }
-
-
- }
-
-
- }
- break;
-
- }
-
-
- }
- break;
- case 2 :
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1924:6: ( ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )? )
- {
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1924:6: ( ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )? )
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1924:7: ( RULE_ID ) ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )?
- {
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1924:7: ( RULE_ID )
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1927:3: RULE_ID
- {
-
- if (current==null) {
- current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
- associateNodeWithAstElement(currentNode, current);
- }
-
- match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSingleAssignmentValue4041);
-
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele0100CrossReferenceEStringNamedObject(), "refObject");
-
-
- }
-
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1940:2: ( ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )? )?
- int alt37=2;
- int LA37_0 = input.LA(1);
-
- if ( (LA37_0==19) ) {
- alt37=1;
- }
- switch (alt37) {
- case 1 :
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1940:3: ( '.' (lv_refFeature_6= RULE_ID ) ) ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )?
- {
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1940:3: ( '.' (lv_refFeature_6= RULE_ID ) )
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1940:4: '.' (lv_refFeature_6= RULE_ID )
- {
- match(input,19,FOLLOW_19_in_ruleSingleAssignmentValue4055);
-
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele01100KeywordFullStop(), null);
-
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1944:1: (lv_refFeature_6= RULE_ID )
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1946:6: lv_refFeature_6= RULE_ID
- {
- lv_refFeature_6=(Token)input.LT(1);
- match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSingleAssignmentValue4077);
-
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele011010LexerRuleCallID(), "refFeature");
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele00100CrossReferenceEStringNamedObject(), "refObject");
- if (current==null) {
- current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
- associateNodeWithAstElement(currentNode, current);
- }
-
- try {
- set(current, "refFeature", lv_refFeature_6, "ID", lastConsumedNode);
- } catch (ValueConverterException vce) {
- handleValueConverterException(vce);
- }
-
-
- }
-
-
}
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1964:3: ( ( '[' (lv_refIndex_8= RULE_INT ) ) ']' )?
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1903:2: ( ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )? )?
int alt36=2;
int LA36_0 = input.LA(1);
- if ( (LA36_0==29) ) {
+ if ( (LA36_0==19) ) {
alt36=1;
}
switch (alt36) {
case 1 :
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1964:4: ( '[' (lv_refIndex_8= RULE_INT ) ) ']'
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1903:3: ( '.' (lv_refFeature_4= RULE_ID ) ) ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )?
{
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1964:4: ( '[' (lv_refIndex_8= RULE_INT ) )
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1964:5: '[' (lv_refIndex_8= RULE_INT )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1903:3: ( '.' (lv_refFeature_4= RULE_ID ) )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1903:4: '.' (lv_refFeature_4= RULE_ID )
{
- match(input,29,FOLLOW_29_in_ruleSingleAssignmentValue4097);
+ match(input,19,FOLLOW_19_in_ruleSingleAssignmentValue3991);
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele011100KeywordLeftSquareBracket(), null);
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele001100KeywordFullStop(), null);
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1968:1: (lv_refIndex_8= RULE_INT )
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1970:6: lv_refIndex_8= RULE_INT
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1907:1: (lv_refFeature_4= RULE_ID )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1909:6: lv_refFeature_4= RULE_ID
{
- lv_refIndex_8=(Token)input.LT(1);
- match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleSingleAssignmentValue4119);
+ lv_refFeature_4=(Token)input.LT(1);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSingleAssignmentValue4013);
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele0111010LexerRuleCallINT(), "refIndex");
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele0011010LexerRuleCallID(), "refFeature");
if (current==null) {
@@ -4425,7 +4324,7 @@ public class InternalEpatchTestLanguageParser extends AbstractInternalAntlrParse
}
try {
- set(current, "refIndex", lv_refIndex_8, "INT", lastConsumedNode);
+ set(current, "refFeature", lv_refFeature_4, "ID", lastConsumedNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
}
@@ -4436,10 +4335,60 @@ public class InternalEpatchTestLanguageParser extends AbstractInternalAntlrParse
}
- match(input,31,FOLLOW_31_in_ruleSingleAssignmentValue4137);
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1927:3: ( ( '[' (lv_refIndex_6= RULE_INT ) ) ']' )?
+ int alt35=2;
+ int LA35_0 = input.LA(1);
+
+ if ( (LA35_0==29) ) {
+ alt35=1;
+ }
+ switch (alt35) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1927:4: ( '[' (lv_refIndex_6= RULE_INT ) ) ']'
+ {
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1927:4: ( '[' (lv_refIndex_6= RULE_INT ) )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1927:5: '[' (lv_refIndex_6= RULE_INT )
+ {
+ match(input,29,FOLLOW_29_in_ruleSingleAssignmentValue4033);
+
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele0011100KeywordLeftSquareBracket(), null);
+
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1931:1: (lv_refIndex_6= RULE_INT )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1933:6: lv_refIndex_6= RULE_INT
+ {
+ lv_refIndex_6=(Token)input.LT(1);
+ match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleSingleAssignmentValue4055);
+
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele00111010LexerRuleCallINT(), "refIndex");
+
+
+ if (current==null) {
+ current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ try {
+ set(current, "refIndex", lv_refIndex_6, "INT", lastConsumedNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+
+
+ }
+
+
+ }
+
+ match(input,31,FOLLOW_31_in_ruleSingleAssignmentValue4073);
+
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele001111KeywordRightSquareBracket(), null);
+
+
+ }
+ break;
+
+ }
- createLeafNode(grammarAccess.prSingleAssignmentValue().ele01111KeywordRightSquareBracket(), null);
-
}
break;
@@ -4448,12 +4397,44 @@ public class InternalEpatchTestLanguageParser extends AbstractInternalAntlrParse
}
+
+
+ }
break;
}
}
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1956:6: (lv_newObject_8= ruleCreatedObject )
+ {
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1956:6: (lv_newObject_8= ruleCreatedObject )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1959:6: lv_newObject_8= ruleCreatedObject
+ {
+
+ currentNode=createCompositeNode(grammarAccess.prSingleAssignmentValue().ele010ParserRuleCallCreatedObject(), currentNode);
+
+ pushFollow(FOLLOW_ruleCreatedObject_in_ruleSingleAssignmentValue4119);
+ lv_newObject_8=ruleCreatedObject();
+ _fsp--;
+
+
+ if (current==null) {
+ current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
+ associateNodeWithAstElement(currentNode.getParent(), current);
+ }
+
+ try {
+ set(current, "newObject", lv_newObject_8, "CreatedObject", currentNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+ currentNode = currentNode.getParent();
+
+
+ }
}
@@ -4465,36 +4446,55 @@ public class InternalEpatchTestLanguageParser extends AbstractInternalAntlrParse
}
break;
case 2 :
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1993:6: (lv_newObject_10= ruleCreatedObject )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1978:6: ( ( RULE_ID ) (lv_impFrag_10= RULE_FRAGMENT ) )
{
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1993:6: (lv_newObject_10= ruleCreatedObject )
- // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1996:6: lv_newObject_10= ruleCreatedObject
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1978:6: ( ( RULE_ID ) (lv_impFrag_10= RULE_FRAGMENT ) )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1978:7: ( RULE_ID ) (lv_impFrag_10= RULE_FRAGMENT )
+ {
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1978:7: ( RULE_ID )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1981:3: RULE_ID
{
-
- currentNode=createCompositeNode(grammarAccess.prSingleAssignmentValue().ele10ParserRuleCallCreatedObject(), currentNode);
-
- pushFollow(FOLLOW_ruleCreatedObject_in_ruleSingleAssignmentValue4183);
- lv_newObject_10=ruleCreatedObject();
- _fsp--;
+ if (current==null) {
+ current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSingleAssignmentValue4153);
+
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele100CrossReferenceEStringImport(), "import");
+
+
+ }
+
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1994:2: (lv_impFrag_10= RULE_FRAGMENT )
+ // ../org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/antlr/internal/InternalEpatchTestLanguage.g:1996:6: lv_impFrag_10= RULE_FRAGMENT
+ {
+ lv_impFrag_10=(Token)input.LT(1);
+ match(input,RULE_FRAGMENT,FOLLOW_RULE_FRAGMENT_in_ruleSingleAssignmentValue4178);
+
+ createLeafNode(grammarAccess.prSingleAssignmentValue().ele110LexerRuleCallFRAGMENT(), "impFrag");
+
if (current==null) {
current = factory.create(grammarAccess.prSingleAssignmentValue().getRule().getType().getType());
- associateNodeWithAstElement(currentNode.getParent(), current);
+ associateNodeWithAstElement(currentNode, current);
}
try {
- set(current, "newObject", lv_newObject_10, "CreatedObject", currentNode);
+ set(current, "impFrag", lv_impFrag_10, "FRAGMENT", lastConsumedNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
}
- currentNode = currentNode.getParent();
}
}
+
+
+ }
break;
}
@@ -5835,15 +5835,15 @@ public class InternalEpatchTestLanguageParser extends AbstractInternalAntlrParse
public static final BitSet FOLLOW_EOF_in_entryRuleSingleAssignmentValue3849 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_33_in_ruleSingleAssignmentValue3898 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_STRING_in_ruleSingleAssignmentValue3939 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_RULE_ID_in_ruleSingleAssignmentValue3977 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RULE_FRAGMENT_in_ruleSingleAssignmentValue4002 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_RULE_ID_in_ruleSingleAssignmentValue4041 = new BitSet(new long[]{0x0000000000080002L});
- public static final BitSet FOLLOW_19_in_ruleSingleAssignmentValue4055 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_RULE_ID_in_ruleSingleAssignmentValue4077 = new BitSet(new long[]{0x0000000020000002L});
- public static final BitSet FOLLOW_29_in_ruleSingleAssignmentValue4097 = new BitSet(new long[]{0x0000000000000080L});
- public static final BitSet FOLLOW_RULE_INT_in_ruleSingleAssignmentValue4119 = new BitSet(new long[]{0x0000000080000000L});
- public static final BitSet FOLLOW_31_in_ruleSingleAssignmentValue4137 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ruleCreatedObject_in_ruleSingleAssignmentValue4183 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleSingleAssignmentValue3977 = new BitSet(new long[]{0x0000000000080002L});
+ public static final BitSet FOLLOW_19_in_ruleSingleAssignmentValue3991 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleSingleAssignmentValue4013 = new BitSet(new long[]{0x0000000020000002L});
+ public static final BitSet FOLLOW_29_in_ruleSingleAssignmentValue4033 = new BitSet(new long[]{0x0000000000000080L});
+ public static final BitSet FOLLOW_RULE_INT_in_ruleSingleAssignmentValue4055 = new BitSet(new long[]{0x0000000080000000L});
+ public static final BitSet FOLLOW_31_in_ruleSingleAssignmentValue4073 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleCreatedObject_in_ruleSingleAssignmentValue4119 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleSingleAssignmentValue4153 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RULE_FRAGMENT_in_ruleSingleAssignmentValue4178 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleCreatedObject_in_entryRuleCreatedObject4222 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleCreatedObject4232 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleObjectNew_in_ruleCreatedObject4281 = new BitSet(new long[]{0x0000000000002012L});
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageParserConfiguration.java
index e78ac90..981aa28 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageParserConfiguration.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/EpatchTestLanguageParserConfiguration.java
@@ -394,15 +394,15 @@ public class EpatchTestLanguageParserConfiguration extends AbstractParserConfigu
getListAssignmentValueConsumer().setRuleCall$31$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$42$Delimiter);
getListAssignmentValueConsumer().setRuleCall$40$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$42$Delimiter);
getSingleAssignmentValueConsumer().setCrossReference$11$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$11$Delimiter);
- getSingleAssignmentValueConsumer().setCrossReference$17$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$11$Delimiter);
+ getSingleAssignmentValueConsumer().setCrossReference$28$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$11$Delimiter);
getSingleAssignmentValueConsumer().setKeyword$6$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.keyword$9$Delimiter);
- getSingleAssignmentValueConsumer().setKeyword$21$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.keyword$12$Delimiter);
- getSingleAssignmentValueConsumer().setKeyword$26$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.keyword$12$Delimiter);
- getSingleAssignmentValueConsumer().setKeyword$29$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.keyword$12$Delimiter);
+ getSingleAssignmentValueConsumer().setKeyword$15$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.keyword$12$Delimiter);
+ getSingleAssignmentValueConsumer().setKeyword$20$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.keyword$12$Delimiter);
+ getSingleAssignmentValueConsumer().setKeyword$23$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.keyword$12$Delimiter);
getSingleAssignmentValueConsumer().setRuleCall$8$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$42$Delimiter);
- getSingleAssignmentValueConsumer().setRuleCall$14$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$42$Delimiter);
- getSingleAssignmentValueConsumer().setRuleCall$23$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$11$Delimiter);
- getSingleAssignmentValueConsumer().setRuleCall$28$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$42$Delimiter);
+ getSingleAssignmentValueConsumer().setRuleCall$17$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$11$Delimiter);
+ getSingleAssignmentValueConsumer().setRuleCall$22$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$42$Delimiter);
+ getSingleAssignmentValueConsumer().setRuleCall$31$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$42$Delimiter);
getCreatedObjectConsumer().setKeyword$11$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.keyword$12$Delimiter);
getCreatedObjectConsumer().setKeyword$19$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.keyword$12$Delimiter);
getCreatedObjectConsumer().setRuleCall$7$Delimiter(org.eclipse.xtext.parser.epatch.parser.packrat.EpatchTestLanguageDelimiters.ruleCall$11$Delimiter);
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageSingleAssignmentValueConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageSingleAssignmentValueConsumer.java
index 9379c45..d6452c2 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageSingleAssignmentValueConsumer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/parser/packrat/consumers/EpatchTestLanguageSingleAssignmentValueConsumer.java
@@ -53,33 +53,33 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
private IElementConsumer crossReference$11$Consumer;
- private IElementConsumer assignment$13$Consumer;
+ private IElementConsumer group$13$Consumer;
- private IElementConsumer ruleCall$14$Consumer;
-
- private IElementConsumer group$15$Consumer;
+ private IElementConsumer keyword$15$Consumer;
private IElementConsumer assignment$16$Consumer;
- private IElementConsumer crossReference$17$Consumer;
+ private IElementConsumer ruleCall$17$Consumer;
- private IElementConsumer group$19$Consumer;
+ private IElementConsumer group$18$Consumer;
- private IElementConsumer keyword$21$Consumer;
+ private IElementConsumer keyword$20$Consumer;
- private IElementConsumer assignment$22$Consumer;
+ private IElementConsumer assignment$21$Consumer;
- private IElementConsumer ruleCall$23$Consumer;
+ private IElementConsumer ruleCall$22$Consumer;
- private IElementConsumer group$24$Consumer;
+ private IElementConsumer keyword$23$Consumer;
- private IElementConsumer keyword$26$Consumer;
+ private IElementConsumer assignment$24$Consumer;
- private IElementConsumer assignment$27$Consumer;
+ private IElementConsumer ruleCall$25$Consumer;
- private IElementConsumer ruleCall$28$Consumer;
+ private IElementConsumer group$26$Consumer;
+
+ private IElementConsumer assignment$27$Consumer;
- private IElementConsumer keyword$29$Consumer;
+ private IElementConsumer crossReference$28$Consumer;
private IElementConsumer assignment$30$Consumer;
@@ -87,23 +87,23 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
private ISequenceMatcher crossReference$11$Delimiter;
- private ISequenceMatcher crossReference$17$Delimiter;
+ private ISequenceMatcher crossReference$28$Delimiter;
private ICharacterClass keyword$6$Delimiter;
- private ICharacterClass keyword$21$Delimiter;
+ private ICharacterClass keyword$15$Delimiter;
- private ICharacterClass keyword$26$Delimiter;
+ private ICharacterClass keyword$20$Delimiter;
- private ICharacterClass keyword$29$Delimiter;
+ private ICharacterClass keyword$23$Delimiter;
private ISequenceMatcher ruleCall$8$Delimiter;
- private ISequenceMatcher ruleCall$14$Delimiter;
+ private ISequenceMatcher ruleCall$17$Delimiter;
- private ISequenceMatcher ruleCall$23$Delimiter;
+ private ISequenceMatcher ruleCall$22$Delimiter;
- private ISequenceMatcher ruleCall$28$Delimiter;
+ private ISequenceMatcher ruleCall$31$Delimiter;
protected class Alternatives$1$Consumer extends AlternativesConsumer {
@@ -116,8 +116,8 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
acceptor.accept(assignment$5$Consumer);
acceptor.accept(assignment$7$Consumer);
acceptor.accept(group$9$Consumer);
- acceptor.accept(group$15$Consumer);
- acceptor.accept(assignment$30$Consumer);
+ acceptor.accept(assignment$24$Consumer);
+ acceptor.accept(group$26$Consumer);
}
}
@@ -178,7 +178,7 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
@Override
protected void doGetConsumers(ConsumerAcceptor acceptor) {
acceptor.accept(assignment$10$Consumer);
- acceptor.accept(assignment$13$Consumer);
+ acceptor.accept(group$13$Consumer);
}
}
@@ -202,44 +202,33 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
@Override
protected int doConsume(boolean optional) throws Exception {
- return consumeTerminal(idConsumer, "import", false, false, getElement(), getCrossReference$11$Delimiter(), optional);
+ return consumeTerminal(idConsumer, "refObject", false, false, getElement(), getCrossReference$11$Delimiter(), optional);
}
}
- protected class Assignment$13$Consumer extends AssignmentConsumer {
+ protected class Group$13$Consumer extends OptionalGroupConsumer {
- protected Assignment$13$Consumer(final Assignment assignment) {
- super(assignment);
+ protected Group$13$Consumer(final Group group) {
+ super(group);
}
@Override
- protected IElementConsumer getConsumer() {
- return ruleCall$14$Consumer;
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(keyword$15$Consumer);
+ acceptor.accept(assignment$16$Consumer);
+ acceptor.accept(group$18$Consumer);
}
}
- protected class RuleCall$14$Consumer extends ElementConsumer<RuleCall> {
+ protected class Keyword$15$Consumer extends ElementConsumer<Keyword> {
- protected RuleCall$14$Consumer(final RuleCall ruleCall) {
- super(ruleCall);
+ protected Keyword$15$Consumer(final Keyword keyword) {
+ super(keyword);
}
@Override
protected int doConsume(boolean optional) throws Exception {
- return consumeTerminal(fragmentConsumer, "impFrag", false, false, getElement(), getRuleCall$14$Delimiter(), optional);
- }
- }
-
- protected class Group$15$Consumer extends GroupConsumer {
-
- protected Group$15$Consumer(final Group group) {
- super(group);
- }
-
- @Override
- protected void doGetConsumers(ConsumerAcceptor acceptor) {
- acceptor.accept(assignment$16$Consumer);
- acceptor.accept(group$19$Consumer);
+ return consumeKeyword(getElement(), null, false, false, getKeyword$15$Delimiter(), optional);
}
}
@@ -251,131 +240,142 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
@Override
protected IElementConsumer getConsumer() {
- return crossReference$17$Consumer;
+ return ruleCall$17$Consumer;
}
}
- protected class CrossReference$17$Consumer extends ElementConsumer<CrossReference> {
+ protected class RuleCall$17$Consumer extends ElementConsumer<RuleCall> {
- protected CrossReference$17$Consumer(final CrossReference crossReference) {
- super(crossReference);
+ protected RuleCall$17$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
}
@Override
protected int doConsume(boolean optional) throws Exception {
- return consumeTerminal(idConsumer, "refObject", false, false, getElement(), getCrossReference$17$Delimiter(), optional);
+ return consumeTerminal(idConsumer, "refFeature", false, false, getElement(), getRuleCall$17$Delimiter(), optional);
}
}
- protected class Group$19$Consumer extends OptionalGroupConsumer {
+ protected class Group$18$Consumer extends OptionalGroupConsumer {
- protected Group$19$Consumer(final Group group) {
+ protected Group$18$Consumer(final Group group) {
super(group);
}
@Override
protected void doGetConsumers(ConsumerAcceptor acceptor) {
- acceptor.accept(keyword$21$Consumer);
- acceptor.accept(assignment$22$Consumer);
- acceptor.accept(group$24$Consumer);
+ acceptor.accept(keyword$20$Consumer);
+ acceptor.accept(assignment$21$Consumer);
+ acceptor.accept(keyword$23$Consumer);
}
}
- protected class Keyword$21$Consumer extends ElementConsumer<Keyword> {
+ protected class Keyword$20$Consumer extends ElementConsumer<Keyword> {
- protected Keyword$21$Consumer(final Keyword keyword) {
+ protected Keyword$20$Consumer(final Keyword keyword) {
super(keyword);
}
@Override
protected int doConsume(boolean optional) throws Exception {
- return consumeKeyword(getElement(), null, false, false, getKeyword$21$Delimiter(), optional);
+ return consumeKeyword(getElement(), null, false, false, getKeyword$20$Delimiter(), optional);
}
}
- protected class Assignment$22$Consumer extends AssignmentConsumer {
+ protected class Assignment$21$Consumer extends AssignmentConsumer {
- protected Assignment$22$Consumer(final Assignment assignment) {
+ protected Assignment$21$Consumer(final Assignment assignment) {
super(assignment);
}
@Override
protected IElementConsumer getConsumer() {
- return ruleCall$23$Consumer;
+ return ruleCall$22$Consumer;
}
}
- protected class RuleCall$23$Consumer extends ElementConsumer<RuleCall> {
+ protected class RuleCall$22$Consumer extends ElementConsumer<RuleCall> {
- protected RuleCall$23$Consumer(final RuleCall ruleCall) {
+ protected RuleCall$22$Consumer(final RuleCall ruleCall) {
super(ruleCall);
}
@Override
protected int doConsume(boolean optional) throws Exception {
- return consumeTerminal(idConsumer, "refFeature", false, false, getElement(), getRuleCall$23$Delimiter(), optional);
+ return consumeTerminal(intConsumer, "refIndex", false, false, getElement(), getRuleCall$22$Delimiter(), optional);
}
}
- protected class Group$24$Consumer extends OptionalGroupConsumer {
+ protected class Keyword$23$Consumer extends ElementConsumer<Keyword> {
- protected Group$24$Consumer(final Group group) {
- super(group);
+ protected Keyword$23$Consumer(final Keyword keyword) {
+ super(keyword);
}
@Override
- protected void doGetConsumers(ConsumerAcceptor acceptor) {
- acceptor.accept(keyword$26$Consumer);
- acceptor.accept(assignment$27$Consumer);
- acceptor.accept(keyword$29$Consumer);
+ protected int doConsume(boolean optional) throws Exception {
+ return consumeKeyword(getElement(), null, false, false, getKeyword$23$Delimiter(), optional);
}
}
- protected class Keyword$26$Consumer extends ElementConsumer<Keyword> {
+ protected class Assignment$24$Consumer extends AssignmentConsumer {
- protected Keyword$26$Consumer(final Keyword keyword) {
- super(keyword);
+ protected Assignment$24$Consumer(final Assignment assignment) {
+ super(assignment);
+ }
+
+ @Override
+ protected IElementConsumer getConsumer() {
+ return ruleCall$25$Consumer;
+ }
+ }
+
+ protected class RuleCall$25$Consumer extends ElementConsumer<RuleCall> {
+
+ protected RuleCall$25$Consumer(final RuleCall ruleCall) {
+ super(ruleCall);
}
@Override
protected int doConsume(boolean optional) throws Exception {
- return consumeKeyword(getElement(), null, false, false, getKeyword$26$Delimiter(), optional);
+ return consumeNonTerminal(createdObjectConsumer, "newObject", false, false, false, getElement(), optional);
}
}
- protected class Assignment$27$Consumer extends AssignmentConsumer {
+ protected class Group$26$Consumer extends GroupConsumer {
- protected Assignment$27$Consumer(final Assignment assignment) {
- super(assignment);
+ protected Group$26$Consumer(final Group group) {
+ super(group);
}
@Override
- protected IElementConsumer getConsumer() {
- return ruleCall$28$Consumer;
+ protected void doGetConsumers(ConsumerAcceptor acceptor) {
+ acceptor.accept(assignment$27$Consumer);
+ acceptor.accept(assignment$30$Consumer);
}
}
- protected class RuleCall$28$Consumer extends ElementConsumer<RuleCall> {
+ protected class Assignment$27$Consumer extends AssignmentConsumer {
- protected RuleCall$28$Consumer(final RuleCall ruleCall) {
- super(ruleCall);
+ protected Assignment$27$Consumer(final Assignment assignment) {
+ super(assignment);
}
@Override
- protected int doConsume(boolean optional) throws Exception {
- return consumeTerminal(intConsumer, "refIndex", false, false, getElement(), getRuleCall$28$Delimiter(), optional);
+ protected IElementConsumer getConsumer() {
+ return crossReference$28$Consumer;
}
}
- protected class Keyword$29$Consumer extends ElementConsumer<Keyword> {
+ protected class CrossReference$28$Consumer extends ElementConsumer<CrossReference> {
- protected Keyword$29$Consumer(final Keyword keyword) {
- super(keyword);
+ protected CrossReference$28$Consumer(final CrossReference crossReference) {
+ super(crossReference);
}
@Override
protected int doConsume(boolean optional) throws Exception {
- return consumeKeyword(getElement(), null, false, false, getKeyword$29$Delimiter(), optional);
+ return consumeTerminal(idConsumer, "import", false, false, getElement(), getCrossReference$28$Delimiter(), optional);
}
}
@@ -399,22 +399,22 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
@Override
protected int doConsume(boolean optional) throws Exception {
- return consumeNonTerminal(createdObjectConsumer, "newObject", false, false, false, getElement(), optional);
+ return consumeTerminal(fragmentConsumer, "impFrag", false, false, getElement(), getRuleCall$31$Delimiter(), optional);
}
}
public EpatchTestLanguageSingleAssignmentValueConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
super(configuration, hiddenTokens);
crossReference$11$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- crossReference$17$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ crossReference$28$Delimiter = ISequenceMatcher.Factory.nullMatcher();
keyword$6$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$21$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$26$Delimiter = ICharacterClass.Factory.nullClass();
- keyword$29$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$15$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$20$Delimiter = ICharacterClass.Factory.nullClass();
+ keyword$23$Delimiter = ICharacterClass.Factory.nullClass();
ruleCall$8$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$14$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$23$Delimiter = ISequenceMatcher.Factory.nullMatcher();
- ruleCall$28$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ ruleCall$17$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ ruleCall$22$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ ruleCall$31$Delimiter = ISequenceMatcher.Factory.nullMatcher();
}
@Override
@@ -435,24 +435,24 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
assignment$7$Consumer = new Assignment$7$Consumer(rule.ele0001AssignmentValue());
ruleCall$8$Consumer = new RuleCall$8$Consumer(rule.ele00010LexerRuleCallSTRING());
group$9$Consumer = new Group$9$Consumer(rule.ele001Group());
- assignment$10$Consumer = new Assignment$10$Consumer(rule.ele0010AssignmentImport());
- crossReference$11$Consumer = new CrossReference$11$Consumer(rule.ele00100CrossReferenceEStringImport());
- assignment$13$Consumer = new Assignment$13$Consumer(rule.ele0011AssignmentImpFrag());
- ruleCall$14$Consumer = new RuleCall$14$Consumer(rule.ele00110LexerRuleCallFRAGMENT());
- group$15$Consumer = new Group$15$Consumer(rule.ele01Group());
- assignment$16$Consumer = new Assignment$16$Consumer(rule.ele010AssignmentRefObject());
- crossReference$17$Consumer = new CrossReference$17$Consumer(rule.ele0100CrossReferenceEStringNamedObject());
- group$19$Consumer = new Group$19$Consumer(rule.ele011Group());
- keyword$21$Consumer = new Keyword$21$Consumer(rule.ele01100KeywordFullStop());
- assignment$22$Consumer = new Assignment$22$Consumer(rule.ele01101AssignmentRefFeature());
- ruleCall$23$Consumer = new RuleCall$23$Consumer(rule.ele011010LexerRuleCallID());
- group$24$Consumer = new Group$24$Consumer(rule.ele0111Group());
- keyword$26$Consumer = new Keyword$26$Consumer(rule.ele011100KeywordLeftSquareBracket());
- assignment$27$Consumer = new Assignment$27$Consumer(rule.ele011101AssignmentRefIndex());
- ruleCall$28$Consumer = new RuleCall$28$Consumer(rule.ele0111010LexerRuleCallINT());
- keyword$29$Consumer = new Keyword$29$Consumer(rule.ele01111KeywordRightSquareBracket());
- assignment$30$Consumer = new Assignment$30$Consumer(rule.ele1AssignmentNewObject());
- ruleCall$31$Consumer = new RuleCall$31$Consumer(rule.ele10ParserRuleCallCreatedObject());
+ assignment$10$Consumer = new Assignment$10$Consumer(rule.ele0010AssignmentRefObject());
+ crossReference$11$Consumer = new CrossReference$11$Consumer(rule.ele00100CrossReferenceEStringNamedObject());
+ group$13$Consumer = new Group$13$Consumer(rule.ele0011Group());
+ keyword$15$Consumer = new Keyword$15$Consumer(rule.ele001100KeywordFullStop());
+ assignment$16$Consumer = new Assignment$16$Consumer(rule.ele001101AssignmentRefFeature());
+ ruleCall$17$Consumer = new RuleCall$17$Consumer(rule.ele0011010LexerRuleCallID());
+ group$18$Consumer = new Group$18$Consumer(rule.ele00111Group());
+ keyword$20$Consumer = new Keyword$20$Consumer(rule.ele0011100KeywordLeftSquareBracket());
+ assignment$21$Consumer = new Assignment$21$Consumer(rule.ele0011101AssignmentRefIndex());
+ ruleCall$22$Consumer = new RuleCall$22$Consumer(rule.ele00111010LexerRuleCallINT());
+ keyword$23$Consumer = new Keyword$23$Consumer(rule.ele001111KeywordRightSquareBracket());
+ assignment$24$Consumer = new Assignment$24$Consumer(rule.ele01AssignmentNewObject());
+ ruleCall$25$Consumer = new RuleCall$25$Consumer(rule.ele010ParserRuleCallCreatedObject());
+ group$26$Consumer = new Group$26$Consumer(rule.ele1Group());
+ assignment$27$Consumer = new Assignment$27$Consumer(rule.ele10AssignmentImport());
+ crossReference$28$Consumer = new CrossReference$28$Consumer(rule.ele100CrossReferenceEStringImport());
+ assignment$30$Consumer = new Assignment$30$Consumer(rule.ele11AssignmentImpFrag());
+ ruleCall$31$Consumer = new RuleCall$31$Consumer(rule.ele110LexerRuleCallFRAGMENT());
}
@Override
@@ -493,12 +493,12 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
crossReference$11$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
}
- public ISequenceMatcher getCrossReference$17$Delimiter() {
- return crossReference$17$Delimiter;
+ public ISequenceMatcher getCrossReference$28$Delimiter() {
+ return crossReference$28$Delimiter;
}
- public void setCrossReference$17$Delimiter(ISequenceMatcher matcher) {
- crossReference$17$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
+ public void setCrossReference$28$Delimiter(ISequenceMatcher matcher) {
+ crossReference$28$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
}
public ICharacterClass getKeyword$6$Delimiter() {
@@ -509,28 +509,28 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
keyword$6$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
}
- public ICharacterClass getKeyword$21$Delimiter() {
- return keyword$21$Delimiter;
+ public ICharacterClass getKeyword$15$Delimiter() {
+ return keyword$15$Delimiter;
}
- public void setKeyword$21$Delimiter(ICharacterClass characterClass) {
- keyword$21$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
+ public void setKeyword$15$Delimiter(ICharacterClass characterClass) {
+ keyword$15$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
}
- public ICharacterClass getKeyword$26$Delimiter() {
- return keyword$26$Delimiter;
+ public ICharacterClass getKeyword$20$Delimiter() {
+ return keyword$20$Delimiter;
}
- public void setKeyword$26$Delimiter(ICharacterClass characterClass) {
- keyword$26$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
+ public void setKeyword$20$Delimiter(ICharacterClass characterClass) {
+ keyword$20$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
}
- public ICharacterClass getKeyword$29$Delimiter() {
- return keyword$29$Delimiter;
+ public ICharacterClass getKeyword$23$Delimiter() {
+ return keyword$23$Delimiter;
}
- public void setKeyword$29$Delimiter(ICharacterClass characterClass) {
- keyword$29$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
+ public void setKeyword$23$Delimiter(ICharacterClass characterClass) {
+ keyword$23$Delimiter = characterClass != null ? characterClass : ICharacterClass.Factory.nullClass();
}
public ISequenceMatcher getRuleCall$8$Delimiter() {
@@ -541,28 +541,28 @@ public final class EpatchTestLanguageSingleAssignmentValueConsumer extends NonTe
ruleCall$8$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
}
- public ISequenceMatcher getRuleCall$14$Delimiter() {
- return ruleCall$14$Delimiter;
+ public ISequenceMatcher getRuleCall$17$Delimiter() {
+ return ruleCall$17$Delimiter;
}
- public void setRuleCall$14$Delimiter(ISequenceMatcher matcher) {
- ruleCall$14$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
+ public void setRuleCall$17$Delimiter(ISequenceMatcher matcher) {
+ ruleCall$17$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
}
- public ISequenceMatcher getRuleCall$23$Delimiter() {
- return ruleCall$23$Delimiter;
+ public ISequenceMatcher getRuleCall$22$Delimiter() {
+ return ruleCall$22$Delimiter;
}
- public void setRuleCall$23$Delimiter(ISequenceMatcher matcher) {
- ruleCall$23$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
+ public void setRuleCall$22$Delimiter(ISequenceMatcher matcher) {
+ ruleCall$22$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
}
- public ISequenceMatcher getRuleCall$28$Delimiter() {
- return ruleCall$28$Delimiter;
+ public ISequenceMatcher getRuleCall$31$Delimiter() {
+ return ruleCall$31$Delimiter;
}
- public void setRuleCall$28$Delimiter(ISequenceMatcher matcher) {
- ruleCall$28$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
+ public void setRuleCall$31$Delimiter(ISequenceMatcher matcher) {
+ ruleCall$31$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
}
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/services/EpatchTestLanguageGrammarAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/services/EpatchTestLanguageGrammarAccess.java
index 67556ab..966290b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/services/EpatchTestLanguageGrammarAccess.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/services/EpatchTestLanguageGrammarAccess.java
@@ -1291,26 +1291,26 @@ public class EpatchTestLanguageGrammarAccess implements IGrammarAccess {
private final Assignment c0001AssignmentValue = (Assignment)c000Alternatives.eContents().get(1);
private final RuleCall c00010LexerRuleCallSTRING = (RuleCall)c0001AssignmentValue.eContents().get(0);
private final Group c001Group = (Group)c00Alternatives.eContents().get(1);
- private final Assignment c0010AssignmentImport = (Assignment)c001Group.eContents().get(0);
- private final CrossReference c00100CrossReferenceEStringImport = (CrossReference)c0010AssignmentImport.eContents().get(0);
- private final Assignment c0011AssignmentImpFrag = (Assignment)c001Group.eContents().get(1);
- private final RuleCall c00110LexerRuleCallFRAGMENT = (RuleCall)c0011AssignmentImpFrag.eContents().get(0);
- private final Group c01Group = (Group)c0Alternatives.eContents().get(1);
- private final Assignment c010AssignmentRefObject = (Assignment)c01Group.eContents().get(0);
- private final CrossReference c0100CrossReferenceEStringNamedObject = (CrossReference)c010AssignmentRefObject.eContents().get(0);
- private final Group c011Group = (Group)c01Group.eContents().get(1);
- private final Group c0110Group = (Group)c011Group.eContents().get(0);
- private final Keyword c01100KeywordFullStop = (Keyword)c0110Group.eContents().get(0);
- private final Assignment c01101AssignmentRefFeature = (Assignment)c0110Group.eContents().get(1);
- private final RuleCall c011010LexerRuleCallID = (RuleCall)c01101AssignmentRefFeature.eContents().get(0);
- private final Group c0111Group = (Group)c011Group.eContents().get(1);
- private final Group c01110Group = (Group)c0111Group.eContents().get(0);
- private final Keyword c011100KeywordLeftSquareBracket = (Keyword)c01110Group.eContents().get(0);
- private final Assignment c011101AssignmentRefIndex = (Assignment)c01110Group.eContents().get(1);
- private final RuleCall c0111010LexerRuleCallINT = (RuleCall)c011101AssignmentRefIndex.eContents().get(0);
- private final Keyword c01111KeywordRightSquareBracket = (Keyword)c0111Group.eContents().get(1);
- private final Assignment c1AssignmentNewObject = (Assignment)cAlternatives.eContents().get(1);
- private final RuleCall c10ParserRuleCallCreatedObject = (RuleCall)c1AssignmentNewObject.eContents().get(0);
+ private final Assignment c0010AssignmentRefObject = (Assignment)c001Group.eContents().get(0);
+ private final CrossReference c00100CrossReferenceEStringNamedObject = (CrossReference)c0010AssignmentRefObject.eContents().get(0);
+ private final Group c0011Group = (Group)c001Group.eContents().get(1);
+ private final Group c00110Group = (Group)c0011Group.eContents().get(0);
+ private final Keyword c001100KeywordFullStop = (Keyword)c00110Group.eContents().get(0);
+ private final Assignment c001101AssignmentRefFeature = (Assignment)c00110Group.eContents().get(1);
+ private final RuleCall c0011010LexerRuleCallID = (RuleCall)c001101AssignmentRefFeature.eContents().get(0);
+ private final Group c00111Group = (Group)c0011Group.eContents().get(1);
+ private final Group c001110Group = (Group)c00111Group.eContents().get(0);
+ private final Keyword c0011100KeywordLeftSquareBracket = (Keyword)c001110Group.eContents().get(0);
+ private final Assignment c0011101AssignmentRefIndex = (Assignment)c001110Group.eContents().get(1);
+ private final RuleCall c00111010LexerRuleCallINT = (RuleCall)c0011101AssignmentRefIndex.eContents().get(0);
+ private final Keyword c001111KeywordRightSquareBracket = (Keyword)c00111Group.eContents().get(1);
+ private final Assignment c01AssignmentNewObject = (Assignment)c0Alternatives.eContents().get(1);
+ private final RuleCall c010ParserRuleCallCreatedObject = (RuleCall)c01AssignmentNewObject.eContents().get(0);
+ private final Group c1Group = (Group)cAlternatives.eContents().get(1);
+ private final Assignment c10AssignmentImport = (Assignment)c1Group.eContents().get(0);
+ private final CrossReference c100CrossReferenceEStringImport = (CrossReference)c10AssignmentImport.eContents().get(0);
+ private final Assignment c11AssignmentImpFrag = (Assignment)c1Group.eContents().get(1);
+ private final RuleCall c110LexerRuleCallFRAGMENT = (RuleCall)c11AssignmentImpFrag.eContents().get(0);
// not supported
public ParserRule getRule() { return rule; }
@@ -1343,64 +1343,64 @@ public class EpatchTestLanguageGrammarAccess implements IGrammarAccess {
public Group ele001Group() { return c001Group; }
// not supported
- public Assignment ele0010AssignmentImport() { return c0010AssignmentImport; }
+ public Assignment ele0010AssignmentRefObject() { return c0010AssignmentRefObject; }
// not supported
- public CrossReference ele00100CrossReferenceEStringImport() { return c00100CrossReferenceEStringImport; }
+ public CrossReference ele00100CrossReferenceEStringNamedObject() { return c00100CrossReferenceEStringNamedObject; }
// not supported
- public Assignment ele0011AssignmentImpFrag() { return c0011AssignmentImpFrag; }
+ public Group ele0011Group() { return c0011Group; }
// not supported
- public RuleCall ele00110LexerRuleCallFRAGMENT() { return c00110LexerRuleCallFRAGMENT; }
+ public Group ele00110Group() { return c00110Group; }
// not supported
- public Group ele01Group() { return c01Group; }
+ public Keyword ele001100KeywordFullStop() { return c001100KeywordFullStop; }
// not supported
- public Assignment ele010AssignmentRefObject() { return c010AssignmentRefObject; }
+ public Assignment ele001101AssignmentRefFeature() { return c001101AssignmentRefFeature; }
// not supported
- public CrossReference ele0100CrossReferenceEStringNamedObject() { return c0100CrossReferenceEStringNamedObject; }
+ public RuleCall ele0011010LexerRuleCallID() { return c0011010LexerRuleCallID; }
// not supported
- public Group ele011Group() { return c011Group; }
+ public Group ele00111Group() { return c00111Group; }
// not supported
- public Group ele0110Group() { return c0110Group; }
+ public Group ele001110Group() { return c001110Group; }
// not supported
- public Keyword ele01100KeywordFullStop() { return c01100KeywordFullStop; }
+ public Keyword ele0011100KeywordLeftSquareBracket() { return c0011100KeywordLeftSquareBracket; }
// not supported
- public Assignment ele01101AssignmentRefFeature() { return c01101AssignmentRefFeature; }
+ public Assignment ele0011101AssignmentRefIndex() { return c0011101AssignmentRefIndex; }
// not supported
- public RuleCall ele011010LexerRuleCallID() { return c011010LexerRuleCallID; }
+ public RuleCall ele00111010LexerRuleCallINT() { return c00111010LexerRuleCallINT; }
// not supported
- public Group ele0111Group() { return c0111Group; }
+ public Keyword ele001111KeywordRightSquareBracket() { return c001111KeywordRightSquareBracket; }
// not supported
- public Group ele01110Group() { return c01110Group; }
+ public Assignment ele01AssignmentNewObject() { return c01AssignmentNewObject; }
// not supported
- public Keyword ele011100KeywordLeftSquareBracket() { return c011100KeywordLeftSquareBracket; }
+ public RuleCall ele010ParserRuleCallCreatedObject() { return c010ParserRuleCallCreatedObject; }
// not supported
- public Assignment ele011101AssignmentRefIndex() { return c011101AssignmentRefIndex; }
+ public Group ele1Group() { return c1Group; }
// not supported
- public RuleCall ele0111010LexerRuleCallINT() { return c0111010LexerRuleCallINT; }
+ public Assignment ele10AssignmentImport() { return c10AssignmentImport; }
// not supported
- public Keyword ele01111KeywordRightSquareBracket() { return c01111KeywordRightSquareBracket; }
+ public CrossReference ele100CrossReferenceEStringImport() { return c100CrossReferenceEStringImport; }
// not supported
- public Assignment ele1AssignmentNewObject() { return c1AssignmentNewObject; }
+ public Assignment ele11AssignmentImpFrag() { return c11AssignmentImpFrag; }
// not supported
- public RuleCall ele10ParserRuleCallCreatedObject() { return c10ParserRuleCallCreatedObject; }
+ public RuleCall ele110LexerRuleCallFRAGMENT() { return c110LexerRuleCallFRAGMENT; }
}
public class CreatedObjectElements implements IParserRuleAccess {
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.xtext
index b472eeb..c2077a0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.xtext
@@ -73,7 +73,7 @@ ListAssignmentValue returns AssignmentValue:
index=INT ":" (("[" refIndex=INT "]") | value=STRING | (refObject=[NamedObject] ("." refFeature=ID ("[" refIndex=INT "]")?)?) | newObject=CreatedObject | (^import=[Import] impFrag=FRAGMENT));
SingleAssignmentValue returns AssignmentValue:
- keyword="null" | value=STRING | (^import=[Import] impFrag=FRAGMENT) | (refObject=[NamedObject] ("." refFeature=ID ("[" refIndex=INT "]")?)?) | newObject=CreatedObject;
+ keyword="null" | value=STRING | (refObject=[NamedObject] ("." refFeature=ID ("[" refIndex=INT "]")?)?) | newObject=CreatedObject | (^import=[Import] impFrag=FRAGMENT);
CreatedObject:
(ObjectNew|ObjectCopy) name=ID? ("{"