summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-01-27 15:44:16 (EST)
committer sefftinge2009-01-27 15:44:16 (EST)
commit19d9a533a139bbf093cee7f9a2db28570aa63403 (patch)
tree4a26a9be418842d466659175b748dc8d0c36e7c2
parentb976c1438b73709145098500cc961f745cdfd689 (diff)
downloadorg.eclipse.xtext-19d9a533a139bbf093cee7f9a2db28570aa63403.zip
org.eclipse.xtext-19d9a533a139bbf093cee7f9a2db28570aa63403.tar.gz
org.eclipse.xtext-19d9a533a139bbf093cee7f9a2db28570aa63403.tar.bz2
some fixes in ParseResultFactory
packrat parser implements IParser and therefore can be used in a resource fix in service registry - find services in a predictable order
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/AbstractReferenceGrammarRuntimeConfig.java14
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/antlr/ReferenceGrammarParser.java5
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/AbstractDomainmodelRuntimeConfig.java14
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/antlr/DomainmodelParser.java5
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/AbstractFowlerDslRuntimeConfig.java14
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/antlr/FowlerDslParser.java5
-rw-r--r--plugins/org.eclipse.xtext.service/src/org/eclipse/xtext/service/AbstractServiceRegistrationFactory.java12
-rw-r--r--tests/org.eclipse.xtext.generator.tests/META-INF/MANIFEST.MF1
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/AbstractXtextGrammarTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/AbstractImportUriTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/AbstractLangATestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/antlr/ImportUriTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/antlr/LangATestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/AbstractDummyTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/antlr/DummyTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractAbstractTestLanguageRuntimeConfig.java10
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractConcreteTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/ConcreteTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/AbstractMetamodelRefTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/AbstractMultiGenMMTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/antlr/MetamodelRefTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/antlr/MultiGenMMTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/antlr/XtextGrammarTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/AbstractDatatypeRulesTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/antlr/DatatypeRulesTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/AbstractTerminalRulesTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/AbstractXtextTerminalsTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/antlr/TerminalRulesTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/antlr/XtextTerminalsTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/AbstractFormatterTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/antlr/FormatterTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/AbstractComplexReconstrTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/AbstractSimpleReconstrTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/ComplexReconstrTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/SimpleReconstrTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/AbstractTransientValuesTestRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/antlr/TransientValuesTestParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/AbstractMultiValueFeatureTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/antlr/MultiValueFeatureTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractActionTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractContentAssistTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractFowlerDslTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractLexerTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractLookaheadTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractOptionalEmptyTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractPartialParserTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractReferenceGrammarTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractSimpleExpressionsTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractTreeTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ActionTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ContentAssistTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/FowlerDslTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/LexerTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/LookaheadTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/OptionalEmptyTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/PartialParserTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ReferenceGrammarTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/SimpleExpressionsTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/TestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/TreeTestLanguageParser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/AbstractBug250313RuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/antlr/Bug250313Parser.java5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractPackratAntlrComparingTest.java27
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractParserComparingTest.java68
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractPartialParserTest.java6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractXtextGrammarParsingTest.java43
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/ParserTestHelper.java40
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserReplaceTest.java3
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java13
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParsingPerformanceTest.java8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/XtextGrammarComparingTest.java30
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguageRuntimeConfig.java12
-rw-r--r--tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/AbstractTestLanguageRuntimeConfig.java14
-rw-r--r--tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/antlr/TestLanguageParser.java5
77 files changed, 661 insertions, 213 deletions
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/AbstractReferenceGrammarRuntimeConfig.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/AbstractReferenceGrammarRuntimeConfig.java
index 34fe1ce..1f2d8ff 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/AbstractReferenceGrammarRuntimeConfig.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/AbstractReferenceGrammarRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractReferenceGrammarRuntimeConfig extends AbstractServ
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.reference.parser.antlr.ReferenceGrammarParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractReferenceGrammarRuntimeConfig extends AbstractServ
return org.eclipse.xtext.reference.parser.packrat.ReferenceGrammarPackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.reference.IReferenceGrammar.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractReferenceGrammarRuntimeConfig extends AbstractServ
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/antlr/ReferenceGrammarParser.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/antlr/ReferenceGrammarParser.java
index cb25c67..d779865 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/antlr/ReferenceGrammarParser.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/antlr/ReferenceGrammarParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.reference.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class ReferenceGrammarParser extends org.eclipse.xtext.parser.antlr.Abstr
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalReferenceGrammarLexer lexer = new InternalReferenceGrammarLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalReferenceGrammarParser parser = new InternalReferenceGrammarParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/AbstractDomainmodelRuntimeConfig.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/AbstractDomainmodelRuntimeConfig.java
index 9acc564..791cf18 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/AbstractDomainmodelRuntimeConfig.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/AbstractDomainmodelRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractDomainmodelRuntimeConfig extends AbstractServiceRe
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.example.parser.antlr.DomainmodelParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractDomainmodelRuntimeConfig extends AbstractServiceRe
return org.eclipse.xtext.example.parser.packrat.DomainmodelPackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.example.IDomainmodel.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractDomainmodelRuntimeConfig extends AbstractServiceRe
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/antlr/DomainmodelParser.java b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/antlr/DomainmodelParser.java
index c62743f..8ce440c 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/antlr/DomainmodelParser.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/parser/antlr/DomainmodelParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.example.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class DomainmodelParser extends org.eclipse.xtext.parser.antlr.AbstractAn
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalDomainmodelLexer lexer = new InternalDomainmodelLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalDomainmodelParser parser = new InternalDomainmodelParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/AbstractFowlerDslRuntimeConfig.java b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/AbstractFowlerDslRuntimeConfig.java
index 86ccedd..60ac229 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/AbstractFowlerDslRuntimeConfig.java
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/AbstractFowlerDslRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractFowlerDslRuntimeConfig extends AbstractServiceRegi
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.example.parser.antlr.FowlerDslParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractFowlerDslRuntimeConfig extends AbstractServiceRegi
return org.eclipse.xtext.example.parser.packrat.FowlerDslPackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.example.IFowlerDsl.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractFowlerDslRuntimeConfig extends AbstractServiceRegi
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/antlr/FowlerDslParser.java b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/antlr/FowlerDslParser.java
index 208bf35..030f10d 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/antlr/FowlerDslParser.java
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/antlr/FowlerDslParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.example.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class FowlerDslParser extends org.eclipse.xtext.parser.antlr.AbstractAntl
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalFowlerDslLexer lexer = new InternalFowlerDslLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalFowlerDslParser parser = new InternalFowlerDslParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/plugins/org.eclipse.xtext.service/src/org/eclipse/xtext/service/AbstractServiceRegistrationFactory.java b/plugins/org.eclipse.xtext.service/src/org/eclipse/xtext/service/AbstractServiceRegistrationFactory.java
index 9a7ca97..4c37d39 100644
--- a/plugins/org.eclipse.xtext.service/src/org/eclipse/xtext/service/AbstractServiceRegistrationFactory.java
+++ b/plugins/org.eclipse.xtext.service/src/org/eclipse/xtext/service/AbstractServiceRegistrationFactory.java
@@ -1,6 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2008 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *******************************************************************************/
package org.eclipse.xtext.service;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.Set;
import org.eclipse.emf.common.util.WrappedException;
@@ -15,7 +23,7 @@ public abstract class AbstractServiceRegistrationFactory implements IServiceRegi
public class ScopedServiceRegistration implements IServiceRegistrationFactory {
private final IServiceScope scope;
- private Set<IServiceRegistration> regs = new HashSet<IServiceRegistration>();
+ private Set<IServiceRegistration> regs = new LinkedHashSet<IServiceRegistration>();
public ScopedServiceRegistration(IServiceScope scope) {
this.scope = scope;
diff --git a/tests/org.eclipse.xtext.generator.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.xtext.generator.tests/META-INF/MANIFEST.MF
index c2edd9e..de687c8 100644
--- a/tests/org.eclipse.xtext.generator.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.xtext.generator.tests/META-INF/MANIFEST.MF
@@ -15,6 +15,7 @@ Require-Bundle: org.eclipse.xtext,
org.eclipse.xtend,
org.eclipse.xtend.typesystem.emf,
org.eclipse.xtend.util.stdlib,
+ de.itemis.xtext.antlr;resolution:=optional,
org.easymock;bundle-version="2.3.0"
Export-Package: org.eclipse.xtext,
org.eclipse.xtext.crossrefs,
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/AbstractXtextGrammarTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/AbstractXtextGrammarTestLanguageRuntimeConfig.java
index 444c587..fc69f3a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/AbstractXtextGrammarTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/AbstractXtextGrammarTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractXtextGrammarTestLanguageRuntimeConfig extends Abst
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.parser.antlr.XtextGrammarTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractXtextGrammarTestLanguageRuntimeConfig extends Abst
return org.eclipse.xtext.parser.packrat.XtextGrammarTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.IXtextGrammarTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractXtextGrammarTestLanguageRuntimeConfig extends Abst
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
index 30c6432..8d076d0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
@@ -20,12 +20,12 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="//TypeRef" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractMetamodelDeclaration">
- <eStructuralFeatures xsi:type="ecore:EReference" name="ePackage">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="alias">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ePackage">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GeneratedMetamodel" eSuperTypes="//AbstractMetamodelDeclaration">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/AbstractImportUriTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/AbstractImportUriTestLanguageRuntimeConfig.java
index 335ea59..4532fd3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/AbstractImportUriTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/AbstractImportUriTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractImportUriTestLanguageRuntimeConfig extends Abstrac
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.crossrefs.parser.antlr.ImportUriTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractImportUriTestLanguageRuntimeConfig extends Abstrac
return org.eclipse.xtext.crossrefs.parser.packrat.ImportUriTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.crossrefs.IImportUriTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractImportUriTestLanguageRuntimeConfig extends Abstrac
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/AbstractLangATestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/AbstractLangATestLanguageRuntimeConfig.java
index 40cc960..2a34366 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/AbstractLangATestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/AbstractLangATestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractLangATestLanguageRuntimeConfig extends AbstractSer
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.crossrefs.parser.antlr.LangATestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractLangATestLanguageRuntimeConfig extends AbstractSer
return org.eclipse.xtext.crossrefs.parser.packrat.LangATestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.crossrefs.ILangATestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractLangATestLanguageRuntimeConfig extends AbstractSer
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/antlr/ImportUriTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/antlr/ImportUriTestLanguageParser.java
index faff089..0fc3b219 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/antlr/ImportUriTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/antlr/ImportUriTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.crossrefs.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class ImportUriTestLanguageParser extends org.eclipse.xtext.parser.antlr.
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalImportUriTestLanguageLexer lexer = new InternalImportUriTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalImportUriTestLanguageParser parser = new InternalImportUriTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/antlr/LangATestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/antlr/LangATestLanguageParser.java
index 86b2b01..47c4794 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/antlr/LangATestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/antlr/LangATestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.crossrefs.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class LangATestLanguageParser extends org.eclipse.xtext.parser.antlr.Abst
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalLangATestLanguageLexer lexer = new InternalLangATestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalLangATestLanguageParser parser = new InternalLangATestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/AbstractDummyTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/AbstractDummyTestLanguageRuntimeConfig.java
index 96019c7..b410695 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/AbstractDummyTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/AbstractDummyTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractDummyTestLanguageRuntimeConfig extends AbstractSer
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.dummy.parser.antlr.DummyTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractDummyTestLanguageRuntimeConfig extends AbstractSer
return org.eclipse.xtext.dummy.parser.packrat.DummyTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.dummy.IDummyTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractDummyTestLanguageRuntimeConfig extends AbstractSer
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/antlr/DummyTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/antlr/DummyTestLanguageParser.java
index 32a8b73..2152085 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/antlr/DummyTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/antlr/DummyTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.dummy.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class DummyTestLanguageParser extends org.eclipse.xtext.parser.antlr.Abst
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalDummyTestLanguageLexer lexer = new InternalDummyTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalDummyTestLanguageParser parser = new InternalDummyTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractAbstractTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractAbstractTestLanguageRuntimeConfig.java
index 6366ce0..eb0696c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractAbstractTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractAbstractTestLanguageRuntimeConfig.java
@@ -21,12 +21,22 @@ public abstract class AbstractAbstractTestLanguageRuntimeConfig extends Abstract
return org.eclipse.xtext.grammarinheritance.parser.packrat.AbstractTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.grammarinheritance.IAbstractTestLanguage.SCOPE)
.with(org.eclipse.xtext.IMetamodelAccess.class, getIMetamodelAccess())
.with(org.eclipse.xtext.IGrammarAccess.class, getIGrammarAccess())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractConcreteTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractConcreteTestLanguageRuntimeConfig.java
index edfadc5..b2887a2 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractConcreteTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractConcreteTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractConcreteTestLanguageRuntimeConfig extends Abstract
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.grammarinheritance.parser.antlr.ConcreteTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractConcreteTestLanguageRuntimeConfig extends Abstract
return org.eclipse.xtext.grammarinheritance.parser.packrat.ConcreteTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.grammarinheritance.IConcreteTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractConcreteTestLanguageRuntimeConfig extends Abstract
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/ConcreteTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/ConcreteTestLanguageParser.java
index 905701e..8f0e11c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/ConcreteTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/antlr/ConcreteTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.grammarinheritance.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class ConcreteTestLanguageParser extends org.eclipse.xtext.parser.antlr.A
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalConcreteTestLanguageLexer lexer = new InternalConcreteTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalConcreteTestLanguageParser parser = new InternalConcreteTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/AbstractMetamodelRefTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/AbstractMetamodelRefTestLanguageRuntimeConfig.java
index 468605e..d0c7eeb 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/AbstractMetamodelRefTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/AbstractMetamodelRefTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractMetamodelRefTestLanguageRuntimeConfig extends Abst
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.metamodelreferencing.tests.parser.antlr.MetamodelRefTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractMetamodelRefTestLanguageRuntimeConfig extends Abst
return org.eclipse.xtext.metamodelreferencing.tests.parser.packrat.MetamodelRefTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.metamodelreferencing.tests.IMetamodelRefTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractMetamodelRefTestLanguageRuntimeConfig extends Abst
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/AbstractMultiGenMMTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/AbstractMultiGenMMTestLanguageRuntimeConfig.java
index 3c91039..d0d18d5 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/AbstractMultiGenMMTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/AbstractMultiGenMMTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractMultiGenMMTestLanguageRuntimeConfig extends Abstra
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.metamodelreferencing.tests.parser.antlr.MultiGenMMTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractMultiGenMMTestLanguageRuntimeConfig extends Abstra
return org.eclipse.xtext.metamodelreferencing.tests.parser.packrat.MultiGenMMTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.metamodelreferencing.tests.IMultiGenMMTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractMultiGenMMTestLanguageRuntimeConfig extends Abstra
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/antlr/MetamodelRefTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/antlr/MetamodelRefTestLanguageParser.java
index 0c36533..2499d78 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/antlr/MetamodelRefTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/antlr/MetamodelRefTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.metamodelreferencing.tests.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class MetamodelRefTestLanguageParser extends org.eclipse.xtext.parser.ant
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalMetamodelRefTestLanguageLexer lexer = new InternalMetamodelRefTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalMetamodelRefTestLanguageParser parser = new InternalMetamodelRefTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/antlr/MultiGenMMTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/antlr/MultiGenMMTestLanguageParser.java
index 114ef02..f04fdd0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/antlr/MultiGenMMTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/antlr/MultiGenMMTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.metamodelreferencing.tests.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class MultiGenMMTestLanguageParser extends org.eclipse.xtext.parser.antlr
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalMultiGenMMTestLanguageLexer lexer = new InternalMultiGenMMTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalMultiGenMMTestLanguageParser parser = new InternalMultiGenMMTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/antlr/XtextGrammarTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/antlr/XtextGrammarTestLanguageParser.java
index d8b2421..171cac7 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/antlr/XtextGrammarTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/antlr/XtextGrammarTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class XtextGrammarTestLanguageParser extends org.eclipse.xtext.parser.ant
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalXtextGrammarTestLanguageLexer lexer = new InternalXtextGrammarTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalXtextGrammarTestLanguageParser parser = new InternalXtextGrammarTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/AbstractDatatypeRulesTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/AbstractDatatypeRulesTestLanguageRuntimeConfig.java
index bf2ff26..626f97b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/AbstractDatatypeRulesTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/AbstractDatatypeRulesTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractDatatypeRulesTestLanguageRuntimeConfig extends Abs
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.parser.datatyperules.parser.antlr.DatatypeRulesTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractDatatypeRulesTestLanguageRuntimeConfig extends Abs
return org.eclipse.xtext.parser.datatyperules.parser.packrat.DatatypeRulesTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.parser.datatyperules.IDatatypeRulesTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractDatatypeRulesTestLanguageRuntimeConfig extends Abs
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/antlr/DatatypeRulesTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/antlr/DatatypeRulesTestLanguageParser.java
index d93c727..be8392f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/antlr/DatatypeRulesTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/datatyperules/parser/antlr/DatatypeRulesTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.parser.datatyperules.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class DatatypeRulesTestLanguageParser extends org.eclipse.xtext.parser.an
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalDatatypeRulesTestLanguageLexer lexer = new InternalDatatypeRulesTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalDatatypeRulesTestLanguageParser parser = new InternalDatatypeRulesTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/AbstractTerminalRulesTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/AbstractTerminalRulesTestLanguageRuntimeConfig.java
index 791aafd..3b679de 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/AbstractTerminalRulesTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/AbstractTerminalRulesTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractTerminalRulesTestLanguageRuntimeConfig extends Abs
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.parser.terminalrules.parser.antlr.TerminalRulesTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractTerminalRulesTestLanguageRuntimeConfig extends Abs
return org.eclipse.xtext.parser.terminalrules.parser.packrat.TerminalRulesTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.parser.terminalrules.ITerminalRulesTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractTerminalRulesTestLanguageRuntimeConfig extends Abs
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/AbstractXtextTerminalsTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/AbstractXtextTerminalsTestLanguageRuntimeConfig.java
index 1842869..6c9d5d3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/AbstractXtextTerminalsTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/AbstractXtextTerminalsTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractXtextTerminalsTestLanguageRuntimeConfig extends Ab
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.parser.terminalrules.parser.antlr.XtextTerminalsTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractXtextTerminalsTestLanguageRuntimeConfig extends Ab
return org.eclipse.xtext.parser.terminalrules.parser.packrat.XtextTerminalsTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.parser.terminalrules.IXtextTerminalsTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractXtextTerminalsTestLanguageRuntimeConfig extends Ab
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/antlr/TerminalRulesTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/antlr/TerminalRulesTestLanguageParser.java
index 2f5efdc..705fc0a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/antlr/TerminalRulesTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/antlr/TerminalRulesTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.parser.terminalrules.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class TerminalRulesTestLanguageParser extends org.eclipse.xtext.parser.an
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalTerminalRulesTestLanguageLexer lexer = new InternalTerminalRulesTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalTerminalRulesTestLanguageParser parser = new InternalTerminalRulesTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/antlr/XtextTerminalsTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/antlr/XtextTerminalsTestLanguageParser.java
index e733bbf..51bf368 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/antlr/XtextTerminalsTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/parser/antlr/XtextTerminalsTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.parser.terminalrules.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class XtextTerminalsTestLanguageParser extends org.eclipse.xtext.parser.a
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalXtextTerminalsTestLanguageLexer lexer = new InternalXtextTerminalsTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalXtextTerminalsTestLanguageParser parser = new InternalXtextTerminalsTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/AbstractFormatterTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/AbstractFormatterTestLanguageRuntimeConfig.java
index 1575d19..f2b8a06 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/AbstractFormatterTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/AbstractFormatterTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractFormatterTestLanguageRuntimeConfig extends Abstrac
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.parsetree.formatter.parser.antlr.FormatterTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractFormatterTestLanguageRuntimeConfig extends Abstrac
return org.eclipse.xtext.parsetree.formatter.parser.packrat.FormatterTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.parsetree.formatter.IFormatterTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractFormatterTestLanguageRuntimeConfig extends Abstrac
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/antlr/FormatterTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/antlr/FormatterTestLanguageParser.java
index 060e3fe..e2f7b6a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/antlr/FormatterTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/formatter/parser/antlr/FormatterTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.parsetree.formatter.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class FormatterTestLanguageParser extends org.eclipse.xtext.parser.antlr.
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalFormatterTestLanguageLexer lexer = new InternalFormatterTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalFormatterTestLanguageParser parser = new InternalFormatterTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/AbstractComplexReconstrTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/AbstractComplexReconstrTestLanguageRuntimeConfig.java
index 62f519a..974951d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/AbstractComplexReconstrTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/AbstractComplexReconstrTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractComplexReconstrTestLanguageRuntimeConfig extends A
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.parsetree.reconstr.parser.antlr.ComplexReconstrTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractComplexReconstrTestLanguageRuntimeConfig extends A
return org.eclipse.xtext.parsetree.reconstr.parser.packrat.ComplexReconstrTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.parsetree.reconstr.IComplexReconstrTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractComplexReconstrTestLanguageRuntimeConfig extends A
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/AbstractSimpleReconstrTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/AbstractSimpleReconstrTestLanguageRuntimeConfig.java
index e2c4596..aa6ef81 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/AbstractSimpleReconstrTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/AbstractSimpleReconstrTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractSimpleReconstrTestLanguageRuntimeConfig extends Ab
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.parsetree.reconstr.parser.antlr.SimpleReconstrTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractSimpleReconstrTestLanguageRuntimeConfig extends Ab
return org.eclipse.xtext.parsetree.reconstr.parser.packrat.SimpleReconstrTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.parsetree.reconstr.ISimpleReconstrTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractSimpleReconstrTestLanguageRuntimeConfig extends Ab
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/ComplexReconstrTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/ComplexReconstrTestLanguageParser.java
index 4335399..93b2d1e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/ComplexReconstrTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/ComplexReconstrTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.parsetree.reconstr.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class ComplexReconstrTestLanguageParser extends org.eclipse.xtext.parser.
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalComplexReconstrTestLanguageLexer lexer = new InternalComplexReconstrTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalComplexReconstrTestLanguageParser parser = new InternalComplexReconstrTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/SimpleReconstrTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/SimpleReconstrTestLanguageParser.java
index 0538967..8b6125d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/SimpleReconstrTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/antlr/SimpleReconstrTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.parsetree.reconstr.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class SimpleReconstrTestLanguageParser extends org.eclipse.xtext.parser.a
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalSimpleReconstrTestLanguageLexer lexer = new InternalSimpleReconstrTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalSimpleReconstrTestLanguageParser parser = new InternalSimpleReconstrTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/AbstractTransientValuesTestRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/AbstractTransientValuesTestRuntimeConfig.java
index eaefdde..47cf9bb 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/AbstractTransientValuesTestRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/AbstractTransientValuesTestRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractTransientValuesTestRuntimeConfig extends AbstractS
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.parsetree.transientvalues.parser.antlr.TransientValuesTestParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractTransientValuesTestRuntimeConfig extends AbstractS
return org.eclipse.xtext.parsetree.transientvalues.parser.packrat.TransientValuesTestPackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.parsetree.transientvalues.ITransientValuesTest.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractTransientValuesTestRuntimeConfig extends AbstractS
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/antlr/TransientValuesTestParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/antlr/TransientValuesTestParser.java
index b5e8f21..3fdec94 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/antlr/TransientValuesTestParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/transientvalues/parser/antlr/TransientValuesTestParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.parsetree.transientvalues.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class TransientValuesTestParser extends org.eclipse.xtext.parser.antlr.Ab
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalTransientValuesTestLexer lexer = new InternalTransientValuesTestLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalTransientValuesTestParser parser = new InternalTransientValuesTestParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/AbstractMultiValueFeatureTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/AbstractMultiValueFeatureTestLanguageRuntimeConfig.java
index 359cee8..5803f91 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/AbstractMultiValueFeatureTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/AbstractMultiValueFeatureTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractMultiValueFeatureTestLanguageRuntimeConfig extends
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.resource.metamodel.parser.antlr.MultiValueFeatureTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractMultiValueFeatureTestLanguageRuntimeConfig extends
return org.eclipse.xtext.resource.metamodel.parser.packrat.MultiValueFeatureTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.resource.metamodel.IMultiValueFeatureTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractMultiValueFeatureTestLanguageRuntimeConfig extends
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/antlr/MultiValueFeatureTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/antlr/MultiValueFeatureTestLanguageParser.java
index 1fd3765..cc0fc784 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/antlr/MultiValueFeatureTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/resource/metamodel/parser/antlr/MultiValueFeatureTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.resource.metamodel.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class MultiValueFeatureTestLanguageParser extends org.eclipse.xtext.parse
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalMultiValueFeatureTestLanguageLexer lexer = new InternalMultiValueFeatureTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalMultiValueFeatureTestLanguageParser parser = new InternalMultiValueFeatureTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractActionTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractActionTestLanguageRuntimeConfig.java
index 641db06..d1a6772 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractActionTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractActionTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractActionTestLanguageRuntimeConfig extends AbstractSe
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.testlanguages.parser.antlr.ActionTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractActionTestLanguageRuntimeConfig extends AbstractSe
return org.eclipse.xtext.testlanguages.parser.packrat.ActionTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.testlanguages.IActionTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractActionTestLanguageRuntimeConfig extends AbstractSe
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractContentAssistTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractContentAssistTestLanguageRuntimeConfig.java
index 92fb058..44c9e9d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractContentAssistTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractContentAssistTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractContentAssistTestLanguageRuntimeConfig extends Abs
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.testlanguages.parser.antlr.ContentAssistTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractContentAssistTestLanguageRuntimeConfig extends Abs
return org.eclipse.xtext.testlanguages.parser.packrat.ContentAssistTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.testlanguages.IContentAssistTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractContentAssistTestLanguageRuntimeConfig extends Abs
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractFowlerDslTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractFowlerDslTestLanguageRuntimeConfig.java
index b270a86..27e49ca 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractFowlerDslTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractFowlerDslTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractFowlerDslTestLanguageRuntimeConfig extends Abstrac
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.testlanguages.parser.antlr.FowlerDslTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractFowlerDslTestLanguageRuntimeConfig extends Abstrac
return org.eclipse.xtext.testlanguages.parser.packrat.FowlerDslTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.testlanguages.IFowlerDslTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractFowlerDslTestLanguageRuntimeConfig extends Abstrac
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractLexerTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractLexerTestLanguageRuntimeConfig.java
index 40cd0b4..1db2ffd 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractLexerTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractLexerTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractLexerTestLanguageRuntimeConfig extends AbstractSer
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.testlanguages.parser.antlr.LexerTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractLexerTestLanguageRuntimeConfig extends AbstractSer
return org.eclipse.xtext.testlanguages.parser.packrat.LexerTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.testlanguages.ILexerTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractLexerTestLanguageRuntimeConfig extends AbstractSer
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractLookaheadTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractLookaheadTestLanguageRuntimeConfig.java
index d67033b..dd74ba0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractLookaheadTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractLookaheadTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractLookaheadTestLanguageRuntimeConfig extends Abstrac
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.testlanguages.parser.antlr.LookaheadTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractLookaheadTestLanguageRuntimeConfig extends Abstrac
return org.eclipse.xtext.testlanguages.parser.packrat.LookaheadTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.testlanguages.ILookaheadTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractLookaheadTestLanguageRuntimeConfig extends Abstrac
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractOptionalEmptyTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractOptionalEmptyTestLanguageRuntimeConfig.java
index 32d2c96..1c64b06 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractOptionalEmptyTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractOptionalEmptyTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractOptionalEmptyTestLanguageRuntimeConfig extends Abs
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.testlanguages.parser.antlr.OptionalEmptyTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractOptionalEmptyTestLanguageRuntimeConfig extends Abs
return org.eclipse.xtext.testlanguages.parser.packrat.OptionalEmptyTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.testlanguages.IOptionalEmptyTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractOptionalEmptyTestLanguageRuntimeConfig extends Abs
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractPartialParserTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractPartialParserTestLanguageRuntimeConfig.java
index f2d08df..f3a3f3d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractPartialParserTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractPartialParserTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractPartialParserTestLanguageRuntimeConfig extends Abs
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.testlanguages.parser.antlr.PartialParserTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractPartialParserTestLanguageRuntimeConfig extends Abs
return org.eclipse.xtext.testlanguages.parser.packrat.PartialParserTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.testlanguages.IPartialParserTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractPartialParserTestLanguageRuntimeConfig extends Abs
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractReferenceGrammarTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractReferenceGrammarTestLanguageRuntimeConfig.java
index b7bb4ef..27f7d3d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractReferenceGrammarTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractReferenceGrammarTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractReferenceGrammarTestLanguageRuntimeConfig extends
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.testlanguages.parser.antlr.ReferenceGrammarTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractReferenceGrammarTestLanguageRuntimeConfig extends
return org.eclipse.xtext.testlanguages.parser.packrat.ReferenceGrammarTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.testlanguages.IReferenceGrammarTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractReferenceGrammarTestLanguageRuntimeConfig extends
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractSimpleExpressionsTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractSimpleExpressionsTestLanguageRuntimeConfig.java
index 1f5e421..0d43dca 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractSimpleExpressionsTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractSimpleExpressionsTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractSimpleExpressionsTestLanguageRuntimeConfig extends
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.testlanguages.parser.antlr.SimpleExpressionsTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractSimpleExpressionsTestLanguageRuntimeConfig extends
return org.eclipse.xtext.testlanguages.parser.packrat.SimpleExpressionsTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.testlanguages.ISimpleExpressionsTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractSimpleExpressionsTestLanguageRuntimeConfig extends
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractTestLanguageRuntimeConfig.java
index 01c01e3..096555e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractTestLanguageRuntimeConfig extends AbstractServiceR
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.testlanguages.parser.antlr.TestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractTestLanguageRuntimeConfig extends AbstractServiceR
return org.eclipse.xtext.testlanguages.parser.packrat.TestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.testlanguages.ITestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractTestLanguageRuntimeConfig extends AbstractServiceR
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractTreeTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractTreeTestLanguageRuntimeConfig.java
index 2177d67..6f1c85e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractTreeTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractTreeTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractTreeTestLanguageRuntimeConfig extends AbstractServ
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.testlanguages.parser.antlr.TreeTestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractTreeTestLanguageRuntimeConfig extends AbstractServ
return org.eclipse.xtext.testlanguages.parser.packrat.TreeTestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.testlanguages.ITreeTestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractTreeTestLanguageRuntimeConfig extends AbstractServ
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
index d0d0a55..8d02c8e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
@@ -13,12 +13,12 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="familie" unique="false" upperBound="-1" eType="//Familie" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Person">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Kind" eSuperTypes="//Person"/>
<eClassifiers xsi:type="ecore:EClass" name="Erwachsener" eSuperTypes="//Person"/>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ActionTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ActionTestLanguageParser.java
index 0df15ac..d80df78 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ActionTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ActionTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.testlanguages.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class ActionTestLanguageParser extends org.eclipse.xtext.parser.antlr.Abs
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalActionTestLanguageLexer lexer = new InternalActionTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalActionTestLanguageParser parser = new InternalActionTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ContentAssistTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ContentAssistTestLanguageParser.java
index 0ec084d..cef372a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ContentAssistTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ContentAssistTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.testlanguages.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class ContentAssistTestLanguageParser extends org.eclipse.xtext.parser.an
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalContentAssistTestLanguageLexer lexer = new InternalContentAssistTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalContentAssistTestLanguageParser parser = new InternalContentAssistTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/FowlerDslTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/FowlerDslTestLanguageParser.java
index 87af125..148f431 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/FowlerDslTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/FowlerDslTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.testlanguages.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class FowlerDslTestLanguageParser extends org.eclipse.xtext.parser.antlr.
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalFowlerDslTestLanguageLexer lexer = new InternalFowlerDslTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalFowlerDslTestLanguageParser parser = new InternalFowlerDslTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/LexerTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/LexerTestLanguageParser.java
index 401c753..3d33c94 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/LexerTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/LexerTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.testlanguages.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class LexerTestLanguageParser extends org.eclipse.xtext.parser.antlr.Abst
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalLexerTestLanguageLexer lexer = new InternalLexerTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalLexerTestLanguageParser parser = new InternalLexerTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/LookaheadTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/LookaheadTestLanguageParser.java
index d4d213c..1fa53f8 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/LookaheadTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/LookaheadTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.testlanguages.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class LookaheadTestLanguageParser extends org.eclipse.xtext.parser.antlr.
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalLookaheadTestLanguageLexer lexer = new InternalLookaheadTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalLookaheadTestLanguageParser parser = new InternalLookaheadTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/OptionalEmptyTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/OptionalEmptyTestLanguageParser.java
index 92fe0c9..473dbff 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/OptionalEmptyTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/OptionalEmptyTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.testlanguages.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class OptionalEmptyTestLanguageParser extends org.eclipse.xtext.parser.an
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalOptionalEmptyTestLanguageLexer lexer = new InternalOptionalEmptyTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalOptionalEmptyTestLanguageParser parser = new InternalOptionalEmptyTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/PartialParserTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/PartialParserTestLanguageParser.java
index a4a50d1..17c219a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/PartialParserTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/PartialParserTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.testlanguages.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class PartialParserTestLanguageParser extends org.eclipse.xtext.parser.an
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalPartialParserTestLanguageLexer lexer = new InternalPartialParserTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalPartialParserTestLanguageParser parser = new InternalPartialParserTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ReferenceGrammarTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ReferenceGrammarTestLanguageParser.java
index 04e37be..30b5556 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ReferenceGrammarTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/ReferenceGrammarTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.testlanguages.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class ReferenceGrammarTestLanguageParser extends org.eclipse.xtext.parser
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalReferenceGrammarTestLanguageLexer lexer = new InternalReferenceGrammarTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalReferenceGrammarTestLanguageParser parser = new InternalReferenceGrammarTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/SimpleExpressionsTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/SimpleExpressionsTestLanguageParser.java
index 1055be4..1177adb 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/SimpleExpressionsTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/SimpleExpressionsTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.testlanguages.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class SimpleExpressionsTestLanguageParser extends org.eclipse.xtext.parse
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalSimpleExpressionsTestLanguageLexer lexer = new InternalSimpleExpressionsTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalSimpleExpressionsTestLanguageParser parser = new InternalSimpleExpressionsTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/TestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/TestLanguageParser.java
index d945218..f3e337e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/TestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/TestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.testlanguages.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class TestLanguageParser extends org.eclipse.xtext.parser.antlr.AbstractA
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalTestLanguageLexer lexer = new InternalTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalTestLanguageParser parser = new InternalTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/TreeTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/TreeTestLanguageParser.java
index 645f7db..4bbc864 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/TreeTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/antlr/TreeTestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.testlanguages.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class TreeTestLanguageParser extends org.eclipse.xtext.parser.antlr.Abstr
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalTreeTestLanguageLexer lexer = new InternalTreeTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalTreeTestLanguageParser parser = new InternalTreeTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/AbstractBug250313RuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/AbstractBug250313RuntimeConfig.java
index c6e1548..1ae4ac3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/AbstractBug250313RuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/AbstractBug250313RuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractBug250313RuntimeConfig extends AbstractServiceRegi
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.valueconverter.parser.antlr.Bug250313Parser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractBug250313RuntimeConfig extends AbstractServiceRegi
return org.eclipse.xtext.valueconverter.parser.packrat.Bug250313PackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.valueconverter.IBug250313.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractBug250313RuntimeConfig extends AbstractServiceRegi
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/antlr/Bug250313Parser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/antlr/Bug250313Parser.java
index ff96555..6065e9e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/antlr/Bug250313Parser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/antlr/Bug250313Parser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.valueconverter.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class Bug250313Parser extends org.eclipse.xtext.parser.antlr.AbstractAntl
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalBug250313Lexer lexer = new InternalBug250313Lexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalBug250313Parser parser = new InternalBug250313Parser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractPackratAntlrComparingTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractPackratAntlrComparingTest.java
new file mode 100644
index 0000000..4d07631
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractPackratAntlrComparingTest.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.parser;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public abstract class AbstractPackratAntlrComparingTest extends AbstractParserComparingTest {
+
+ @Override
+ protected IParser createFirstParser() {
+ return getParser();
+ }
+
+ @Override
+ protected IParser createSecondParser() {
+ return createPackratParser();
+ }
+
+ protected abstract IParser createPackratParser();
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractParserComparingTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractParserComparingTest.java
new file mode 100644
index 0000000..1289f92
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractParserComparingTest.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.parser;
+
+import org.eclipse.xtext.GenerateAllTestGrammars;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.tests.AbstractGeneratorTest;
+import org.eclipse.xtext.util.EmfStructureComparator;
+import org.eclipse.xtext.util.Pair;
+import org.eclipse.xtext.util.StringInputStream;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public abstract class AbstractParserComparingTest extends AbstractGeneratorTest {
+
+ private IParser firstParser;
+ private IParser secondParser;
+ private ParserTestHelper firstHelper;
+ private ParserTestHelper secondHelper;
+
+ @Override
+ protected void setUp() throws Exception {
+ with(getStandaloneSetupClass());
+ firstParser = createFirstParser();
+ secondParser = createSecondParser();
+ firstHelper = new ParserTestHelper(getResourceFactory(), firstParser);
+ secondHelper = new ParserTestHelper(getResourceFactory(), secondParser);
+ }
+
+ protected abstract Class<?> getStandaloneSetupClass();
+
+ protected abstract IParser createFirstParser();
+ protected abstract IParser createSecondParser();
+
+ protected abstract Iterable<Pair<String, String>> getAllModels();
+
+ public void testCompareAllModels() throws Exception {
+ EmfStructureComparator comparator = new EmfStructureComparator();
+ for(Pair<String, String> pair: getAllModels()) {
+ String model = pair.getSecond();
+ XtextResource firstResult = firstHelper.getResourceFromStream(new StringInputStream(model));
+ XtextResource secondResult = secondHelper.getResourceFromStream(new StringInputStream(model));
+ checkResource(pair.getFirst() + " - " + getFirstParserName(), firstResult);
+ checkResource(pair.getFirst() + " - " + getSecondParserName(), secondResult);
+ comparator.assertSameStructure(firstResult.getParseResult().getRootASTElement(), firstResult.getParseResult().getRootASTElement());
+ }
+ }
+
+ protected String getFirstParserName() {
+ return firstParser.getClass().getSimpleName();
+ }
+
+ protected String getSecondParserName() {
+ return secondParser.getClass().getSimpleName();
+ }
+
+ private void checkResource(String parserName, XtextResource resource) {
+ assertTrue(parserName, resource.getErrors().isEmpty());
+ assertNotNull(parserName, resource.getParseResult().getRootASTElement());
+ assertNotNull(parserName, resource.getParseResult().getRootNode());
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractPartialParserTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractPartialParserTest.java
index af09b75..dd2321a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractPartialParserTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractPartialParserTest.java
@@ -9,6 +9,7 @@
package org.eclipse.xtext.parser;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.IAntlrParser;
import org.eclipse.xtext.parsetree.LeafNode;
import org.eclipse.xtext.tests.AbstractGeneratorTest;
import org.eclipse.xtext.util.EmfStructureComparator;
@@ -32,5 +33,10 @@ public abstract class AbstractPartialParserTest extends AbstractGeneratorTest {
}
};
}
+
+ protected IAntlrParser getAntlrParser() {
+ SwitchingParser switchingParser = (SwitchingParser) getParser();
+ return switchingParser.getAntlrParser();
+ }
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractXtextGrammarParsingTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractXtextGrammarParsingTest.java
new file mode 100644
index 0000000..9d11989
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/AbstractXtextGrammarParsingTest.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.parser;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.xtext.GenerateAllTestGrammars;
+import org.eclipse.xtext.util.CollectionUtils;
+import org.eclipse.xtext.util.Function;
+import org.eclipse.xtext.util.Pair;
+import org.eclipse.xtext.util.Tuples;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public abstract class AbstractXtextGrammarParsingTest extends AbstractPackratAntlrComparingTest {
+
+ @Override
+ protected Iterable<Pair<String, String>> getAllModels() {
+ List<Class<?>> classes = Arrays.asList(GenerateAllTestGrammars.testclasses);
+ return CollectionUtils.map(classes, new Function<Class<?>, Pair<String, String>>() {
+ public Pair<String, String> exec(Class<?> param) {
+ String filename = "" + param.getName().replace('.', '/') + ".xtext";
+ String model;
+ try {
+ model = readFileIntoString(filename);
+ }
+ catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ return Tuples.create(param.getSimpleName(), model);
+ }
+ });
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/ParserTestHelper.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/ParserTestHelper.java
index 205be35..60dc847 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/ParserTestHelper.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/ParserTestHelper.java
@@ -9,14 +9,10 @@ package org.eclipse.xtext.parser;
import java.io.IOException;
import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.Resource.Diagnostic;
-import org.eclipse.xtext.parser.packrat.IPackratParser;
-import org.eclipse.xtext.parsetree.CompositeNode;
import org.eclipse.xtext.resource.IResourceFactory;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.resource.XtextResourceSet;
@@ -24,12 +20,12 @@ import org.eclipse.xtext.resource.XtextResourceSet;
/**
* @author Sebastian Zarnekow - Initial contribution and API
*/
-public class ParserTestHelper implements IParser, IResourceFactory {
+public class ParserTestHelper {
private final IResourceFactory factory;
- private final IPackratParser parser;
+ private final IParser parser;
- public ParserTestHelper(IResourceFactory factory, IPackratParser parser) {
+ public ParserTestHelper(IResourceFactory factory, IParser parser) {
this.factory = factory;
this.parser = parser;
}
@@ -50,37 +46,9 @@ public class ParserTestHelper implements IParser, IResourceFactory {
return resource;
}
- public IParseResult parse(InputStream in, IAstFactory factory) {
- final Reader reader = new InputStreamReader(in);
- final StringBuilder builder = new StringBuilder();
- final char[] buffer = new char[256];
- int read = 0;
- try {
- while ((read = reader.read(buffer)) != -1) {
- builder.append(buffer, 0, read);
- }
- }
- catch (IOException ex) {
- throw new RuntimeException(ex);
- }
- return parser.parse(builder.toString());
- }
-
- public IParseResult parse(InputStream in) {
- throw new UnsupportedOperationException();
- }
-
- public IParseResult reparse(CompositeNode originalRootNode, int offset, int length, String change) {
- throw new UnsupportedOperationException();
- }
-
- public String[] getModelFileExtensions() {
- return null;
- }
-
public XtextResource createResource(URI uri) {
XtextResource result = (XtextResource) factory.createResource(uri);
- result.setParser(this);
+ result.setParser(parser);
return result;
}
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserReplaceTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserReplaceTest.java
index 0ed1886..e57428d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserReplaceTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserReplaceTest.java
@@ -58,7 +58,7 @@ public class PartialParserReplaceTest extends AbstractPartialParserTest {
String reparseRegion = PartialParsingUtil.insertChangeIntoReplaceRegion(parsingPointers
.getDefaultReplaceRootNode(), offset, length, change);
assertEquals(expectedReparseRegion, reparseRegion);
- IParseResult partiallyReparse = PartialParsingUtil.reparse(getParser(), rootNode, offset, length, change);
+ IParseResult partiallyReparse = PartialParsingUtil.reparse(getAntlrParser(), rootNode, offset, length, change);
EList<SyntaxError> errors = partiallyReparse.getRootNode().allSyntaxErrors();
for (SyntaxError syntaxError : errors) {
logger.debug(model + offset + length + change + ":" + syntaxError.getMessage());
@@ -67,4 +67,5 @@ public class PartialParserReplaceTest extends AbstractPartialParserTest {
String expectedReparseModel = model.substring(0, offset) + change + model.substring(offset + length);
assertEquals(expectedReparseModel, partiallyReparse.getRootNode().serialize());
}
+
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java
index cba92d1..46ad993 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParserTest.java
@@ -68,7 +68,7 @@ public class PartialParserTest extends AbstractPartialParserTest {
assertTrue(leaf.getSyntaxError() != null);
// resource.update(23, 0, ")");
// assertTrue(resource.getParseResult().getParseErrors().isEmpty());
- IParseResult reparse = PartialParsingUtil.reparse(getParser(), rootNode, 23, 0, ")");
+ IParseResult reparse = PartialParsingUtil.reparse(getAntlrParser(), rootNode, 23, 0, ")");
rootNode = reparse.getRootNode();
String expectedFixedModel = "spielplatz 1 {kind (k 1)}";
String fixedModel = rootNode.serialize();
@@ -84,7 +84,7 @@ public class PartialParserTest extends AbstractPartialParserTest {
XtextResource resource = getResourceFromString(model);
CompositeNode rootNode = resource.getParseResult().getRootNode();
checkGrammarAssigned(rootNode);
- IParseResult reparse = PartialParsingUtil.reparse(getParser(), rootNode, model.length() - 2, 0, "\n");
+ IParseResult reparse = PartialParsingUtil.reparse(getAntlrParser(), rootNode, model.length() - 2, 0, "\n");
rootNode = reparse.getRootNode();
checkGrammarAssigned(rootNode);
}
@@ -197,7 +197,7 @@ public class PartialParserTest extends AbstractPartialParserTest {
assertEquals(node.getParent() == null, grammarElement instanceof ParserRule);
}
}
-
+
@SuppressWarnings("unchecked")
public void testNodeState() throws Exception {
with(SimpleExpressionsTestLanguageStandaloneSetup.class);
@@ -214,7 +214,7 @@ public class PartialParserTest extends AbstractPartialParserTest {
}
}
assertTrue("node c found", found);
- IParseResult reparse = PartialParsingUtil.reparse(getParser(), rootNode, model.indexOf('c'), 1, "xy");
+ IParseResult reparse = PartialParsingUtil.reparse(getAntlrParser(), rootNode, model.indexOf('c'), 1, "xy");
assertTrue(reparse.getParseErrors() == null || reparse.getParseErrors().isEmpty());
iter = rootNode.getLeafNodes().iterator();
found = false;
@@ -233,10 +233,11 @@ public class PartialParserTest extends AbstractPartialParserTest {
PartialParsingPointers parsingPointers = PartialParsingUtil.calculatePartialParsingPointers(rootNode, offset,
length);
String entryRuleName = parsingPointers.findEntryRuleName();
- IParseResult parseResult = ((AbstractParser) getParser()).parse(entryRuleName, new StringInputStream(
- parsingPointers.findReparseRegion()), getASTFactory());
+ IParseResult parseResult = getAntlrParser().parse(entryRuleName, new StringInputStream(
+ parsingPointers.findReparseRegion()));
comparator.assertSameStructure(parsingPointers.getDefaultReplaceRootNode(), parseResult.getRootNode());
comparator.assertSameStructure(parsingPointers.findASTReplaceElement(), parseResult.getRootASTElement());
assertEquals(parsingPointers.getDefaultReplaceRootNode().serialize(), parseResult.getRootNode().serialize());
}
+
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParsingPerformanceTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParsingPerformanceTest.java
index 3b7def9..ee8db52 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParsingPerformanceTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParsingPerformanceTest.java
@@ -37,7 +37,7 @@ public class PartialParsingPerformanceTest extends AbstractPartialParserTest {
}
String model = modelBuffer.toString();
CompositeNode rootNode = getRootNode(model);
- IParseResult reparse = PartialParsingUtil.reparse(getParser(), rootNode, model.indexOf('c'), 1, "Hugo");
+ IParseResult reparse = PartialParsingUtil.reparse(getAntlrParser(), rootNode, model.indexOf('c'), 1, "Hugo");
assertTrue(reparse.getParseErrors() == null || reparse.getParseErrors().isEmpty());
}
@@ -62,7 +62,7 @@ public class PartialParsingPerformanceTest extends AbstractPartialParserTest {
modelBuffer.append("}\n");
String model = modelBuffer.toString();
CompositeNode rootNode = getRootNode(model);
- IParseResult reparse = PartialParsingUtil.reparse(getParser(), rootNode, model.indexOf("Sven"), 4, "Peter");
+ IParseResult reparse = PartialParsingUtil.reparse(getAntlrParser(), rootNode, model.indexOf("Sven"), 4, "Peter");
if(reparse.getParseErrors() != null && !reparse.getParseErrors().isEmpty()) {
fail("Unexpected parse error " + reparse.getParseErrors().get(0).getMessage()) ;
}
@@ -90,7 +90,7 @@ public class PartialParsingPerformanceTest extends AbstractPartialParserTest {
modelBuffer.append("}\n");
String model = modelBuffer.toString();
CompositeNode rootNode = getRootNode(model);
- IParseResult reparse = PartialParsingUtil.reparse(getParser(), rootNode, model.indexOf("Sven"), 4, "Peter");
+ IParseResult reparse = PartialParsingUtil.reparse(getAntlrParser(), rootNode, model.indexOf("Sven"), 4, "Peter");
assertEquals(1, reparse.getParseErrors().size());
}
@@ -108,5 +108,5 @@ public class PartialParsingPerformanceTest extends AbstractPartialParserTest {
XtextResource resource = getResourceFromString(model);
assertEquals(0, resource.getParseResult().getParseErrors().size());
}
-
+
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/XtextGrammarComparingTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/XtextGrammarComparingTest.java
new file mode 100644
index 0000000..c9e40b3
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/XtextGrammarComparingTest.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.parser;
+
+import org.eclipse.xtext.XtextStandaloneSetup;
+import org.eclipse.xtext.parser.packrat.XtextPackratParser;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public class XtextGrammarComparingTest extends AbstractXtextGrammarParsingTest {
+
+ @Override
+ protected XtextPackratParser createPackratParser() {
+ XtextPackratParser result = new XtextPackratParser();
+ setAstFactory(result);
+ return result;
+ }
+
+ @Override
+ protected Class<?> getStandaloneSetupClass() {
+ return XtextStandaloneSetup.class;
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguageRuntimeConfig.java
index 39c043e..630c486 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguageRuntimeConfig.java
@@ -11,8 +11,13 @@ import org.eclipse.xtext.crossref.impl.DefaultLinkingService;
import org.eclipse.xtext.crossref.impl.DefaultScopeProvider;
import org.eclipse.xtext.crossref.internal.Linker;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
+import org.eclipse.xtext.parsetree.reconstr.ITransientValueService;
import org.eclipse.xtext.resource.DefaultFragmentProvider;
import org.eclipse.xtext.resource.IFragmentProvider;
+import org.eclipse.xtext.xtext.XtextLinker;
+import org.eclipse.xtext.xtext.XtextLinkingService;
+import org.eclipse.xtext.xtext.XtextScopeProvider;
+import org.eclipse.xtext.xtext.XtextTransientValueService;
/**
* used to register components to be used at runtime.
@@ -25,11 +30,12 @@ public class XtextTerminalsTestLanguageRuntimeConfig extends AbstractXtextTermin
scope(XtextTerminalsTestLanguageStandaloneSetup.getServiceScope())
.with(IGrammarAccess.class, getIGrammarAccess())
.with(IValueConverterService.class, getIValueConverterService())
- .with(ILinker.class, getILinker())
- .with(ILinkingService.class, getILinkingService())
- .with(IScopeProvider.class, getIScopeProvider())
.with(IFragmentProvider.class, getIFragmentProvider())
.with(AntlrTokenDefProvider.class)
+ .with(IScopeProvider.class, XtextScopeProvider.class)
+ .with(ILinker.class, XtextLinker.class)
+ .with(ILinkingService.class, XtextLinkingService.class)
+ .with(ITransientValueService.class, XtextTransientValueService.class)
.registrations());
return generated;
}
diff --git a/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/AbstractTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/AbstractTestLanguageRuntimeConfig.java
index c7751bc..f9459c4 100644
--- a/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/AbstractTestLanguageRuntimeConfig.java
+++ b/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/AbstractTestLanguageRuntimeConfig.java
@@ -41,7 +41,7 @@ public abstract class AbstractTestLanguageRuntimeConfig extends AbstractServiceR
return org.eclipse.xtext.parser.antlr.AntlrEcoreElementFactory.class;
}
- protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> getIAntlrParser() {
return org.eclipse.xtext.ui.integration.parser.antlr.TestLanguageParser.class;
}
@@ -57,6 +57,14 @@ public abstract class AbstractTestLanguageRuntimeConfig extends AbstractServiceR
return org.eclipse.xtext.ui.integration.parser.packrat.TestLanguagePackratParser.class;
}
+ protected Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> getIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
public Set<IServiceRegistration> registrations() {
return scope(org.eclipse.xtext.ui.integration.ITestLanguage.SCOPE)
@@ -68,10 +76,12 @@ public abstract class AbstractTestLanguageRuntimeConfig extends AbstractServiceR
.with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
.with(org.eclipse.xtext.parsetree.reconstr.ITransientValueService.class, getITransientValueService())
.with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
- .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrParser.class, getIAntlrParser())
.with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
.with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
.with(org.eclipse.xtext.parser.packrat.IPackratParser.class, getIPackratParser())
+ .with(org.eclipse.xtext.parser.packrat.IParseResultFactory.class, getIParseResultFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
.registrations();
}
diff --git a/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/antlr/TestLanguageParser.java b/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/antlr/TestLanguageParser.java
index 385aa5a..6abd2d6 100644
--- a/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/antlr/TestLanguageParser.java
+++ b/tests/org.eclipse.xtext.ui.integration.tests/src-gen/org/eclipse/xtext/ui/integration/parser/antlr/TestLanguageParser.java
@@ -5,7 +5,6 @@ package org.eclipse.xtext.ui.integration.parser.antlr;
import org.antlr.runtime.ANTLRInputStream;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
-import org.eclipse.xtext.parser.IAstFactory;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.ParseException;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -20,11 +19,11 @@ public class TestLanguageParser extends org.eclipse.xtext.parser.antlr.AbstractA
protected AntlrTokenDefProvider antlrTokenDefProvider;
@Override
- protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
InternalTestLanguageLexer lexer = new InternalTestLanguageLexer(in);
XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
InternalTestLanguageParser parser = new InternalTestLanguageParser(
- stream, factory, grammarAccess.getGrammar());
+ stream, getElementFactory(), grammarAccess.getGrammar());
parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
try {
if(ruleName != null) {