summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2008-12-02 15:41:57 (EST)
committer sefftinge2008-12-02 15:41:57 (EST)
commitec710d33630e3b85fe931fc24218c6946158fbed (patch)
tree420d9df379a4328cdc4665ade39a423e5291eb16
parent02cd1da5903d55cec329020367792f97519fd65d (diff)
downloadorg.eclipse.xtext-ec710d33630e3b85fe931fc24218c6946158fbed.zip
org.eclipse.xtext-ec710d33630e3b85fe931fc24218c6946158fbed.tar.gz
org.eclipse.xtext-ec710d33630e3b85fe931fc24218c6946158fbed.tar.bz2
CrossRefs for RuleCalls in xtext grammar (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=257255)
-rw-r--r--devtools/org.eclipse.xtext.reference.ui/src-gen/org/eclipse/xtext/reference/ReferenceGrammarGenProposalProvider.java3
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.xmi100
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammarLexer.java2
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammarParser.java2
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/GenFowlerDslUiConfig.java1
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/FowlerDsl.xmi56
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDslLexer.java2
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDslParser.java2
-rw-r--r--examples/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/FowlerdslChecks.chk7
-rw-r--r--plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/AbstractProposalProvider.java2
-rw-r--r--plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/outline/OutlineSelectionChangedListener.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextGrammarTest.xmi190
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/ImportUriTestLanguage.xmi24
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/LangA.xmi24
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangALexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangAParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/DummyLanguage.xmi20
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xmi6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/ConcreteTestLanguage.xmi22
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi28
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g21
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.tokens4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestLexer.java78
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestParser.java49
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest__.g14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parsetree/reconstr/MetamodelRefTestParseTreeConstructor.java52
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/services/MetamodelRefTestGrammarAccess.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/ComplexReconstrTest.xmi160
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/SimpleReconstrTest.xmi88
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractContentAssistTestLanguageRuntimeConfig.java70
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ActionTestLanguage.xmi18
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi75
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageStandaloneSetup.java53
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/FowlerDslTestLanguage.xmi56
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/IContentAssistTestLanguage.java23
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/LexerLanguage.xmi16
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/LookaheadLanguage.xmi36
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/OptionalEmptyLanguage.xmi12
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi62
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi86
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/SimpleExpressions.xmi36
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/TestLanguage.xmi30
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/TreeTestLanguage.xmi22
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/contentAssistTestLanguage.ecore20
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/ContentAssistTestLanguageAntlrTokenFileProvider.java15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/ContentAssistTestLanguageParser.java44
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g305
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.tokens14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguageLexer.java955
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguageParser.java723
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage__.g39
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/ContentAssistTestLanguageParseTreeConstructor.java678
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageGrammarAccess.java77
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageMetamodelAccess.java51
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageResourceFactory.java28
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/Bug250313.xmi12
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Lexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Parser.java2
-rwxr-xr-xtests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xtext5
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MultiGenMMTest.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParsingPointerTest.java24
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.java15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xtext27
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageRuntimeConfig.java19
-rw-r--r--tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/TestLanguage.xmi12
-rw-r--r--tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguageParser.java2
102 files changed, 4118 insertions, 605 deletions
diff --git a/devtools/org.eclipse.xtext.reference.ui/src-gen/org/eclipse/xtext/reference/ReferenceGrammarGenProposalProvider.java b/devtools/org.eclipse.xtext.reference.ui/src-gen/org/eclipse/xtext/reference/ReferenceGrammarGenProposalProvider.java
index 3c9cf96..7eae0fb 100644
--- a/devtools/org.eclipse.xtext.reference.ui/src-gen/org/eclipse/xtext/reference/ReferenceGrammarGenProposalProvider.java
+++ b/devtools/org.eclipse.xtext.reference.ui/src-gen/org/eclipse/xtext/reference/ReferenceGrammarGenProposalProvider.java
@@ -218,10 +218,11 @@ public class ReferenceGrammarGenProposalProvider extends AbstractProposalProvid
return Collections.singletonList(createCompletionProposal(assignment,model,"CustomTypeParserRuleName", offset));
}
+
public List<? extends ICompletionProposal> completeReferenceModelCustomType(RuleCall ruleCall, EObject model, String prefix,
IDocument doc, int offset) {
if (logger.isDebugEnabled()) {
- logger.debug("completeReferenceModelCustomType '" + ruleCall.getName() + "' cardinality '" + ruleCall.getCardinality()
+ logger.debug("completeReferenceModelCustomType '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ "' for model '" + model + "' and prefix '" + prefix.trim() + "'");
}
return Collections.emptyList();
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.xmi b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.xmi
index bfa491d..795e89e 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.xmi
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.xmi
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="ReferenceGrammar" nsURI="http://eclipse.org/xtext/reference/ReferenceGrammar"/>
- <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ReferenceModel" uri="http://eclipse.org/xtext/reference/ReferenceModel"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>reference</idElements>
<idElements>ReferenceGrammar</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="ReferenceGrammar" nsURI="http://eclipse.org/xtext/reference/ReferenceGrammar"/>
+ <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ReferenceModel" uri="http://eclipse.org/xtext/reference/ReferenceModel"/>
<rules xsi:type="xtext:ParserRule" name="Spielplatz">
<alternatives xsi:type="xtext:Group" cardinality="?">
<abstractTokens xsi:type="xtext:Group">
@@ -14,12 +14,16 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="spielplatz"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="groesse">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="groesse" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="=" feature="beschreibung">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" feature="beschreibung" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="{"/>
@@ -28,23 +32,23 @@
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:Assignment" operator="+=" feature="kinder">
- <terminal xsi:type="xtext:RuleCall" name="Kind"/>
+ <groups xsi:type="xtext:Assignment" feature="kinder" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</groups>
- <groups xsi:type="xtext:Assignment" operator="+=" feature="erzieher">
- <terminal xsi:type="xtext:RuleCall" name="Erwachsener"/>
+ <groups xsi:type="xtext:Assignment" feature="erzieher" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</groups>
</groups>
- <groups xsi:type="xtext:Assignment" operator="+=" feature="spielzeuge">
- <terminal xsi:type="xtext:RuleCall" name="Spielzeug"/>
+ <groups xsi:type="xtext:Assignment" feature="spielzeuge" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</groups>
</groups>
- <groups xsi:type="xtext:Assignment" operator="+=" feature="familie">
- <terminal xsi:type="xtext:RuleCall" name="Familie"/>
+ <groups xsi:type="xtext:Assignment" feature="familie" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.5"/>
</groups>
</groups>
- <groups xsi:type="xtext:Assignment" operator="+=" feature="types">
- <terminal xsi:type="xtext:RuleCall" name="CustomTypeParserRule"/>
+ <groups xsi:type="xtext:Assignment" feature="types" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.7"/>
</groups>
</abstractTokens>
</abstractTokens>
@@ -53,8 +57,8 @@
</rules>
<rules xsi:type="xtext:ParserRule" name="Person">
<alternatives xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="Kind"/>
- <groups xsi:type="xtext:RuleCall" name="Erwachsener"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.2"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Kind">
@@ -65,12 +69,16 @@
<abstractTokens xsi:type="xtext:Keyword" value="kind"/>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="age">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="age" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
@@ -84,12 +92,16 @@
<abstractTokens xsi:type="xtext:Keyword" value="erwachsener"/>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="age">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="age" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
@@ -103,12 +115,14 @@
<abstractTokens xsi:type="xtext:Keyword" value="spielzeug"/>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="farbe">
- <terminal xsi:type="xtext:RuleCall" name="Farbe"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="farbe" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.6"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
@@ -125,29 +139,33 @@
<abstractTokens xsi:type="xtext:Keyword" value="familie"/>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
<terminal xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Keyword" value="keyword"/>
- <groups xsi:type="xtext:RuleCall" name="STRING"/>
+ <groups xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </groups>
+ </groups>
+ <groups xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="ID"/>
</terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="mutter">
+ <abstractTokens xsi:type="xtext:Assignment" feature="mutter" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="Erwachsener"/>
</terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="vater">
+ <abstractTokens xsi:type="xtext:Assignment" feature="vater" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="Erwachsener"/>
</terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="kinder">
+ <abstractTokens xsi:type="xtext:Assignment" feature="kinder" operator="+=">
<terminal xsi:type="xtext:CrossReference">
<type name="Kind"/>
</terminal>
@@ -155,7 +173,7 @@
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Keyword" value=","/>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="kinder">
+ <abstractTokens xsi:type="xtext:Assignment" feature="kinder" operator="+=">
<terminal xsi:type="xtext:CrossReference">
<type name="Kind"/>
</terminal>
@@ -166,7 +184,7 @@
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Farbe">
- <alternatives xsi:type="xtext:Assignment" operator="=" feature="wert">
+ <alternatives xsi:type="xtext:Assignment" feature="wert" operator="=">
<terminal xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
@@ -183,8 +201,10 @@
<type alias="ReferenceModel" name="CustomType"/>
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="type"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammarLexer.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammarLexer.java
index 3297f18..101d798 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammarLexer.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammarLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammar.g 2008-11-05 09:29:38
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammar.g 2008-12-02 18:50:55
package org.eclipse.xtext.reference.parser.internal;
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammarParser.java b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammarParser.java
index 7caaaf0..69a1422 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammarParser.java
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammarParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammar.g 2008-11-05 09:29:38
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/reference/parser/internal/InternalReferenceGrammar.g 2008-12-02 18:50:54
package org.eclipse.xtext.reference.parser.internal;
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/GenFowlerDslUiConfig.java b/examples/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/GenFowlerDslUiConfig.java
index edc9edb..87c764e 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/GenFowlerDslUiConfig.java
+++ b/examples/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/GenFowlerDslUiConfig.java
@@ -17,6 +17,7 @@ public class GenFowlerDslUiConfig extends AbstractServiceRegistrationFactory {
.with(org.eclipse.xtext.ui.common.editor.codecompletion.IProposalProvider.class, org.eclipse.xtext.example.FowlerDslGenProposalProvider.class)
.with(org.eclipse.jface.text.contentassist.IContentAssistant.class, org.eclipse.jface.text.contentassist.ContentAssistant.class)
.with(org.eclipse.jface.text.contentassist.IContentAssistProcessor.class, org.eclipse.xtext.ui.common.editor.codecompletion.DefaultContentAssistProcessor.class)
+ .with(org.eclipse.xtext.ui.common.editor.codecompletion.ILinkingCandidatesService.class, org.eclipse.xtext.ui.common.editor.codecompletion.impl.DefaultLinkingCandidatesService.class)
.registrations();
}
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/FowlerDsl.xmi b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/FowlerDsl.xmi
index 4bcf2cd..3259aa9 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/FowlerDsl.xmi
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/FowlerDsl.xmi
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="fowlerdsl" nsURI="http://example.xtext.org/FowlerDsl"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>example</idElements>
<idElements>FowlerDsl</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="fowlerdsl" nsURI="http://example.xtext.org/FowlerDsl"/>
<rules xsi:type="xtext:ParserRule" name="Statemachine">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
@@ -14,47 +14,55 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="events"/>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="events">
- <terminal xsi:type="xtext:RuleCall" name="Event"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="events" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="end"/>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="commands"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="commands">
- <terminal xsi:type="xtext:RuleCall" name="Command"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="commands" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="end"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="states">
- <terminal xsi:type="xtext:RuleCall" name="State"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="states" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Event">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="?=" feature="resetting">
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" feature="resetting" operator="?=">
<terminal xsi:type="xtext:Keyword" value="resetting"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="code">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="code" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Command">
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="code">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="code" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
@@ -64,8 +72,10 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="state"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
@@ -74,7 +84,7 @@
<abstractTokens xsi:type="xtext:Keyword" value="actions"/>
<abstractTokens xsi:type="xtext:Keyword" value="{"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="+" operator="+=" feature="actions">
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="+" feature="actions" operator="+=">
<terminal xsi:type="xtext:CrossReference">
<type name="Command"/>
</terminal>
@@ -83,8 +93,8 @@
<abstractTokens xsi:type="xtext:Keyword" value="}"/>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="transitions">
- <terminal xsi:type="xtext:RuleCall" name="Transition"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="transitions" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="end"/>
@@ -93,14 +103,14 @@
<rules xsi:type="xtext:ParserRule" name="Transition">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="event">
+ <abstractTokens xsi:type="xtext:Assignment" feature="event" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="Event"/>
</terminal>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="=>"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="state">
+ <abstractTokens xsi:type="xtext:Assignment" feature="state" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="State"/>
</terminal>
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDslLexer.java b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDslLexer.java
index 81160d4..71ee948 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDslLexer.java
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDslLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDsl.g 2008-11-10 15:56:28
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDsl.g 2008-12-02 18:52:01
package org.eclipse.xtext.example.parser.internal;
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDslParser.java b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDslParser.java
index 28bd6ef..a9c6ab0 100644
--- a/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDslParser.java
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDslParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDsl.g 2008-11-10 15:56:27
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/example/parser/internal/InternalFowlerDsl.g 2008-12-02 18:52:01
package org.eclipse.xtext.example.parser.internal;
diff --git a/examples/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/FowlerdslChecks.chk b/examples/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/FowlerdslChecks.chk
new file mode 100644
index 0000000..99a6e35
--- /dev/null
+++ b/examples/org.eclipse.xtext.example.fowlerdsl/src/org/eclipse/xtext/example/FowlerdslChecks.chk
@@ -0,0 +1,7 @@
+import fowlerdsl;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/AbstractProposalProvider.java b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/AbstractProposalProvider.java
index 92030e6..330aa75 100644
--- a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/AbstractProposalProvider.java
+++ b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/AbstractProposalProvider.java
@@ -88,7 +88,7 @@ public abstract class AbstractProposalProvider implements IProposalProvider {
public List<? extends ICompletionProposal> completeRuleCall(RuleCall ruleCall, EObject model, String prefix,
IDocument doc, int offset) {
if (logger.isDebugEnabled()) {
- logger.debug("completeRuleCall '" + ruleCall.getName() + "' cardinality '" + ruleCall.getCardinality()
+ logger.debug("completeRuleCall '" + ruleCall.getRule().getName() + "' cardinality '" + ruleCall.getCardinality()
+ "' for model '" + model + "' and prefix '" + prefix.trim() + "'");
}
diff --git a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/outline/OutlineSelectionChangedListener.java b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/outline/OutlineSelectionChangedListener.java
index 0db366a..c8ac4a5 100644
--- a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/outline/OutlineSelectionChangedListener.java
+++ b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/outline/OutlineSelectionChangedListener.java
@@ -71,7 +71,7 @@ public final class OutlineSelectionChangedListener extends AbstractSelectionChan
EObject grammarElement = leafNode.getGrammarElement();
if (grammarElement instanceof RuleCall) {
RuleCall ruleCall = (RuleCall) grammarElement;
- String ruleName = ruleCall.getName();
+ String ruleName = ruleCall.getRule().getName();
if (idNode == null && ruleName.equals("ID")) {
idNode = leafNode;
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextGrammarTest.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextGrammarTest.xmi
index 71115c4..ff61a0a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextGrammarTest.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextGrammarTest.xmi
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="XtextTest" nsURI="http://www.eclipse.org/2008/Test/XtextTest"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>XtextGrammarTest</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="XtextTest" nsURI="http://www.eclipse.org/2008/Test/XtextTest"/>
<rules xsi:type="xtext:ParserRule" name="Grammar">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
@@ -12,56 +12,64 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:Assignment" operator="?=" feature="abstract">
+ <groups xsi:type="xtext:Assignment" feature="abstract" operator="?=">
<terminal xsi:type="xtext:Keyword" value="abstract language"/>
</groups>
<groups xsi:type="xtext:Keyword" value="language"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="idElements">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="idElements" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Keyword" value="."/>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="idElements">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="idElements" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="extends"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="superGrammarIdElements">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="superGrammarIdElements" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Keyword" value="."/>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="superGrammarIdElements">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="superGrammarIdElements" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="metamodelDeclarations">
- <terminal xsi:type="xtext:RuleCall" name="AbstractMetamodelDeclaration"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="metamodelDeclarations" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="+" operator="+=" feature="rules">
- <terminal xsi:type="xtext:RuleCall" name="AbstractRule"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="+" feature="rules" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="AbstractRule">
<alternatives xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="LexerRule"/>
- <groups xsi:type="xtext:RuleCall" name="ParserRule"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.5"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.6"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="AbstractMetamodelDeclaration">
<alternatives xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="GeneratedMetamodel"/>
- <groups xsi:type="xtext:RuleCall" name="ReferencedMetamodel"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.3"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="GeneratedMetamodel">
@@ -69,18 +77,24 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="generate"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="nsURI">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="nsURI" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
<abstractTokens xsi:type="xtext:Keyword" value="as"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="alias">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="alias" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</alternatives>
@@ -89,14 +103,18 @@
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="import"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="uri">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="uri" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
<abstractTokens xsi:type="xtext:Keyword" value="as"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="alias">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="alias" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</alternatives>
@@ -111,21 +129,25 @@
<groups xsi:type="xtext:Keyword" value="native"/>
<groups xsi:type="xtext:Keyword" value="lexer"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
<abstractTokens xsi:type="xtext:Keyword" value="returns"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="TypeRef"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="type" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.7"/>
</abstractTokens>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=":"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="body">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="body" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=";"/>
@@ -136,20 +158,22 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
<abstractTokens xsi:type="xtext:Keyword" value="returns"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="TypeRef"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="type" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.7"/>
</abstractTokens>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=":"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="alternatives">
- <terminal xsi:type="xtext:RuleCall" name="Alternatives"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="alternatives" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.8"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=";"/>
@@ -158,20 +182,24 @@
<rules xsi:type="xtext:ParserRule" name="TypeRef">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group" cardinality="?">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="alias">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="alias" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="::"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Alternatives">
<type name="AbstractElement"/>
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:RuleCall" name="Group"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.9"/>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Action" feature="groups" operator="+=">
@@ -179,8 +207,8 @@
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="|"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="groups">
- <terminal xsi:type="xtext:RuleCall" name="Group"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="groups" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.9"/>
</abstractTokens>
</abstractTokens>
</alternatives>
@@ -188,13 +216,13 @@
<rules xsi:type="xtext:ParserRule" name="Group">
<type name="AbstractElement"/>
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:RuleCall" name="AbstractToken"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.10"/>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Action" feature="abstractTokens" operator="+=">
<typeName name="Group"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="abstractTokens">
- <terminal xsi:type="xtext:RuleCall" name="AbstractToken"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="abstractTokens" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.10"/>
</abstractTokens>
</abstractTokens>
</alternatives>
@@ -204,12 +232,12 @@
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="Assignment"/>
- <groups xsi:type="xtext:RuleCall" name="Action"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.11"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.12"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="AbstractTerminal"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.13"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="=" feature="cardinality">
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" feature="cardinality" operator="=">
<terminal xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Keyword" value="?"/>
@@ -224,10 +252,12 @@
<type name="Assignment"/>
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="feature">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="feature" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="operator">
+ <abstractTokens xsi:type="xtext:Assignment" feature="operator" operator="=">
<terminal xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Keyword" value="+="/>
@@ -237,8 +267,8 @@
</terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="terminal">
- <terminal xsi:type="xtext:RuleCall" name="AbstractTerminal"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="terminal" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.13"/>
</abstractTokens>
</alternatives>
</rules>
@@ -257,17 +287,19 @@
<abstractTokens xsi:type="xtext:Keyword" value="="/>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="typeName">
- <terminal xsi:type="xtext:RuleCall" name="TypeRef"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="typeName" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.7"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="."/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="feature">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="feature" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="operator">
+ <abstractTokens xsi:type="xtext:Assignment" feature="operator" operator="=">
<terminal xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Keyword" value="="/>
<groups xsi:type="xtext:Keyword" value="+="/>
@@ -284,12 +316,12 @@
<alternatives xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="Keyword"/>
- <groups xsi:type="xtext:RuleCall" name="RuleCall"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.16"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.17"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="ParenthesizedElement"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.15"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="CrossReference"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.14"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="CrossReference">
@@ -297,14 +329,14 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="["/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="TypeRef"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="type" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.7"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
<abstractTokens xsi:type="xtext:Keyword" value="|"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="rule">
- <terminal xsi:type="xtext:RuleCall" name="RuleCall"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="rule" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.17"/>
</abstractTokens>
</abstractTokens>
</abstractTokens>
@@ -316,19 +348,23 @@
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="("/>
- <abstractTokens xsi:type="xtext:RuleCall" name="Alternatives"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.8"/>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Keyword">
- <alternatives xsi:type="xtext:Assignment" operator="=" feature="value">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <alternatives xsi:type="xtext:Assignment" feature="value" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="RuleCall">
- <alternatives xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</alternatives>
</rules>
</xtext:Grammar>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/ImportUriTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/ImportUriTestLanguage.xmi
index a417f28..633b210 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/ImportUriTestLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/ImportUriTestLanguage.xmi
@@ -1,26 +1,28 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="importedURI" nsURI="http://eclipse.org/xtext/importUriTestLanguage"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>crossrefs</idElements>
<idElements>ImportUriTestLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="importedURI" nsURI="http://eclipse.org/xtext/importUriTestLanguage"/>
<rules xsi:type="xtext:ParserRule" name="Main">
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="imports">
- <terminal xsi:type="xtext:RuleCall" name="Import"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="imports" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="types">
- <terminal xsi:type="xtext:RuleCall" name="Type"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="types" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Import">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="import"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="importURI">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="importURI" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
@@ -29,13 +31,15 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="type"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="extends"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="extends">
+ <abstractTokens xsi:type="xtext:Assignment" feature="extends" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="Type"/>
</terminal>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/LangA.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/LangA.xmi
index f7bddd6..d2d1ff9 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/LangA.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/LangA.xmi
@@ -1,26 +1,28 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="langA" nsURI="http://eclipse.org/xtext/langA"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>crossrefs</idElements>
<idElements>LangA</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="langA" nsURI="http://eclipse.org/xtext/langA"/>
<rules xsi:type="xtext:ParserRule" name="Main">
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="imports">
- <terminal xsi:type="xtext:RuleCall" name="Import"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="imports" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="types">
- <terminal xsi:type="xtext:RuleCall" name="Type"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="types" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Import">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="import"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="uri">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="uri" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
@@ -29,13 +31,15 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="type"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="extends"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="extends">
+ <abstractTokens xsi:type="xtext:Assignment" feature="extends" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="Type"/>
</terminal>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguageLexer.java
index 1bdfe37..5d0d200 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguage.g 2008-11-28 10:59:10
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguage.g 2008-12-02 18:42:26
package org.eclipse.xtext.crossrefs.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguageParser.java
index 1a766fc..987894c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguage.g 2008-11-28 10:59:10
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalImportUriTestLanguage.g 2008-12-02 18:42:26
package org.eclipse.xtext.crossrefs.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangALexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangALexer.java
index 430cda5..43ff4ae 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangALexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangALexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangA.g 2008-11-28 10:58:59
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangA.g 2008-12-02 18:42:16
package org.eclipse.xtext.crossrefs.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangAParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangAParser.java
index f2a4dd6..e303ccd 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangAParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangAParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangA.g 2008-11-28 10:58:59
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangA.g 2008-12-02 18:42:16
package org.eclipse.xtext.crossrefs.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/DummyLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/DummyLanguage.xmi
index 0114446..af5d1b2 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/DummyLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/DummyLanguage.xmi
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="DummyLang" nsURI="http://www.eclipse.org/2008/xtext/DummyLang"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>dummy</idElements>
<idElements>DummyLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="DummyLang" nsURI="http://www.eclipse.org/2008/xtext/DummyLang"/>
<rules xsi:type="xtext:ParserRule" name="Model">
- <alternatives xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="elements">
- <terminal xsi:type="xtext:RuleCall" name="Element"/>
+ <alternatives xsi:type="xtext:Assignment" cardinality="*" feature="elements" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Element">
@@ -16,17 +16,21 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="?=" feature="optional">
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" feature="optional" operator="?=">
<terminal xsi:type="xtext:Keyword" value="optional"/>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="element"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="descriptions">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="descriptions" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=";"/>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageLexer.java
index fbc473b..abd619d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguage.g 2008-11-28 10:59:03
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguage.g 2008-12-02 18:42:20
package org.eclipse.xtext.dummy.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageParser.java
index f2ae9b5..1ef4993 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguage.g 2008-11-28 10:59:03
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguage.g 2008-12-02 18:42:20
package org.eclipse.xtext.dummy.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xmi
index c660ba1..9d7a006 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xmi
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext" abstract="true">
- <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="mm" uri="classpath:/org/eclipse/xtext/grammarinheritance/ametamodel.ecore"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>grammarinheritance</idElements>
<idElements>AbstractTestLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="mm" uri="classpath:/org/eclipse/xtext/grammarinheritance/ametamodel.ecore"/>
<rules xsi:type="xtext:ParserRule" name="InheritedParserRule">
<type alias="mm" name="AType"/>
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="element"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</abstractTokens>
</alternatives>
</rules>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/ConcreteTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/ConcreteTestLanguage.xmi
index 821b648..3e36bcd 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/ConcreteTestLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/ConcreteTestLanguage.xmi
@@ -1,29 +1,33 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
+ <idElements>org</idElements>
+ <idElements>eclipse</idElements>
+ <idElements>xtext</idElements>
+ <idElements>grammarinheritance</idElements>
+ <idElements>ConcreteTestLanguage</idElements>
<superGrammarIdElements>org</superGrammarIdElements>
<superGrammarIdElements>eclipse</superGrammarIdElements>
<superGrammarIdElements>xtext</superGrammarIdElements>
<superGrammarIdElements>grammarinheritance</superGrammarIdElements>
<superGrammarIdElements>AbstractTestLanguage</superGrammarIdElements>
<metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="foo" nsURI="http://holla"/>
- <idElements>org</idElements>
- <idElements>eclipse</idElements>
- <idElements>xtext</idElements>
- <idElements>grammarinheritance</idElements>
- <idElements>ConcreteTestLanguage</idElements>
<rules xsi:type="xtext:ParserRule" name="ConcreteParserRule">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="model"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="magicNumber">
- <terminal xsi:type="xtext:RuleCall" name="REAL"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="magicNumber" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xtext#//@rules.1"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=":"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="elements">
- <terminal xsi:type="xtext:RuleCall" name="InheritedParserRule"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="elements" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/grammarinheritance/AbstractTestLanguage.xtext#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageLexer.java
index 32d46f5..af6a169 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguage.g 2008-11-28 10:59:00
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguage.g 2008-12-02 18:42:17
package org.eclipse.xtext.grammarinheritance.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageParser.java
index 56a4160..a5752bf 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguage.g 2008-11-28 10:59:00
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguage.g 2008-12-02 18:42:17
package org.eclipse.xtext.grammarinheritance.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi
index 2bd94fd..f92c1b6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi
@@ -1,27 +1,39 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="xtext" uri="http://www.eclipse.org/2008/Xtext"/>
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="SimpleTest" nsURI="http://eclipse.org/xtext/tests/SimpleTest"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>metamodelreferencing</idElements>
<idElements>tests</idElements>
<idElements>MetamodelRefTest</idElements>
+ <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="xtext" uri="http://www.eclipse.org/2008/Xtext"/>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="SimpleTest" nsURI="http://eclipse.org/xtext/tests/SimpleTest"/>
<rules xsi:type="xtext:ParserRule" name="Foo">
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="nameRefs">
- <terminal xsi:type="xtext:RuleCall" name="NameRef"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="nameRefs" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="NameRef">
<type alias="xtext" name="RuleCall"/>
- <alternatives xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <alternatives xsi:type="xtext:Assignment" feature="rule" operator="=">
+ <terminal xsi:type="xtext:CrossReference">
+ <type name="MyRule"/>
+ </terminal>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="MyRule">
+ <type alias="xtext" name="ParserRule"/>
+ <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</alternatives>
</rules>
</xtext:Grammar>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g
index 9405f84..a71ad80 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g
@@ -121,25 +121,26 @@ ruleNameRef returns [EObject current=null]
@after { resetLookahead(); }:
(
- lv_name=RULE_STRING
- {
- createLeafNode("classpath:/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi#//@rules.1/@alternatives/@terminal" /* xtext::RuleCall */, "name");
- }
-
- {
- if ($current==null) {
+
+ {
+ if ($current==null) {
$current = factory.create("xtext::RuleCall");
associateNodeWithAstElement(currentNode, $current);
}
-
- factory.set($current, "name", lv_name,"STRING");
- }
+ }
+(
+ RULE_ID {
+ createLeafNode("classpath:/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi#//@rules.1/@alternatives/@terminal" /* xtext::CrossReference */, "rule");
+ }
+)
);
+
+
RULE_ID : ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
RULE_INT : ('0'..'9')+;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.tokens b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.tokens
index f7d3aac..37fd4f8 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.tokens
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.tokens
@@ -1,7 +1,7 @@
RULE_ML_COMMENT=7
RULE_ID=4
RULE_WS=9
-RULE_INT=6
-RULE_STRING=5
+RULE_INT=5
+RULE_STRING=6
RULE_ANY_OTHER=10
RULE_SL_COMMENT=8
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestLexer.java
index b360c3c..95dd401 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g 2008-11-28 10:59:03
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g 2008-12-02 18:42:19
package org.eclipse.xtext.metamodelreferencing.tests.parser.internal;
@@ -17,8 +17,8 @@ public class InternalMetamodelRefTestLexer extends Lexer {
public static final int RULE_ID=4;
public static final int RULE_WS=9;
public static final int EOF=-1;
- public static final int RULE_INT=6;
- public static final int RULE_STRING=5;
+ public static final int RULE_INT=5;
+ public static final int RULE_STRING=6;
public static final int Tokens=11;
public static final int RULE_ANY_OTHER=10;
public static final int RULE_SL_COMMENT=8;
@@ -32,10 +32,10 @@ public class InternalMetamodelRefTestLexer extends Lexer {
public final void mRULE_ID() throws RecognitionException {
try {
int _type = RULE_ID;
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:143:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:143:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:144:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:144:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
{
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:143:11: ( '^' )?
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:144:11: ( '^' )?
int alt1=2;
int LA1_0 = input.LA(1);
@@ -44,7 +44,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
}
switch (alt1) {
case 1 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:143:12: '^'
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:144:12: '^'
{
match('^');
@@ -63,7 +63,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
recover(mse); throw mse;
}
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:143:41: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:144:41: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
loop2:
do {
int alt2=2;
@@ -111,10 +111,10 @@ public class InternalMetamodelRefTestLexer extends Lexer {
public final void mRULE_INT() throws RecognitionException {
try {
int _type = RULE_INT;
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:145:10: ( ( '0' .. '9' )+ )
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:145:12: ( '0' .. '9' )+
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:146:10: ( ( '0' .. '9' )+ )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:146:12: ( '0' .. '9' )+
{
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:145:12: ( '0' .. '9' )+
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:146:12: ( '0' .. '9' )+
int cnt3=0;
loop3:
do {
@@ -128,7 +128,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
switch (alt3) {
case 1 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:145:13: '0' .. '9'
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:146:13: '0' .. '9'
{
matchRange('0','9');
@@ -158,7 +158,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
public final void mRULE_STRING() throws RecognitionException {
try {
int _type = RULE_STRING;
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:147:13: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:148:13: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' )
int alt6=2;
int LA6_0 = input.LA(1);
@@ -170,16 +170,16 @@ public class InternalMetamodelRefTestLexer extends Lexer {
}
else {
NoViableAltException nvae =
- new NoViableAltException("147:1: RULE_STRING : ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' );", 6, 0, input);
+ new NoViableAltException("148:1: RULE_STRING : ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' );", 6, 0, input);
throw nvae;
}
switch (alt6) {
case 1 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:147:15: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"'
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:148:15: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"'
{
match('\"');
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:147:19: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )*
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:148:19: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )*
loop4:
do {
int alt4=3;
@@ -195,7 +195,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
switch (alt4) {
case 1 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:147:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:148:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
@@ -212,7 +212,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
}
break;
case 2 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:147:65: ~ ( '\\\\' | '\"' )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:148:65: ~ ( '\\\\' | '\"' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -238,10 +238,10 @@ public class InternalMetamodelRefTestLexer extends Lexer {
}
break;
case 2 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:147:101: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\''
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:148:101: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\''
{
match('\'');
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:147:106: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )*
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:148:106: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )*
loop5:
do {
int alt5=3;
@@ -257,7 +257,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
switch (alt5) {
case 1 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:147:108: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:148:108: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
@@ -274,7 +274,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
}
break;
case 2 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:147:152: ~ ( '\\\\' | '\\'' )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:148:152: ~ ( '\\\\' | '\\'' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -312,12 +312,12 @@ public class InternalMetamodelRefTestLexer extends Lexer {
public final void mRULE_ML_COMMENT() throws RecognitionException {
try {
int _type = RULE_ML_COMMENT;
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:149:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:149:19: '/*' ( options {greedy=false; } : . )* '*/'
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:150:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:150:19: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*");
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:149:24: ( options {greedy=false; } : . )*
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:150:24: ( options {greedy=false; } : . )*
loop7:
do {
int alt7=2;
@@ -342,7 +342,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
switch (alt7) {
case 1 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:149:52: .
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:150:52: .
{
matchAny();
@@ -371,12 +371,12 @@ public class InternalMetamodelRefTestLexer extends Lexer {
public final void mRULE_SL_COMMENT() throws RecognitionException {
try {
int _type = RULE_SL_COMMENT;
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:151:17: ( '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )? )
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:151:19: '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )?
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:152:17: ( '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )? )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:152:19: '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )?
{
match("//");
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:151:24: (~ ( '\\n' | '\\r' ) )*
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:152:24: (~ ( '\\n' | '\\r' ) )*
loop8:
do {
int alt8=2;
@@ -389,7 +389,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
switch (alt8) {
case 1 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:151:24: ~ ( '\\n' | '\\r' )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:152:24: ~ ( '\\n' | '\\r' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -410,7 +410,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
}
} while (true);
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:151:38: ( ( '\\r' )? '\\n' )?
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:152:38: ( ( '\\r' )? '\\n' )?
int alt10=2;
int LA10_0 = input.LA(1);
@@ -419,9 +419,9 @@ public class InternalMetamodelRefTestLexer extends Lexer {
}
switch (alt10) {
case 1 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:151:39: ( '\\r' )? '\\n'
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:152:39: ( '\\r' )? '\\n'
{
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:151:39: ( '\\r' )?
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:152:39: ( '\\r' )?
int alt9=2;
int LA9_0 = input.LA(1);
@@ -430,7 +430,7 @@ public class InternalMetamodelRefTestLexer extends Lexer {
}
switch (alt9) {
case 1 :
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:151:39: '\\r'
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:152:39: '\\r'
{
match('\r');
@@ -461,10 +461,10 @@ public class InternalMetamodelRefTestLexer extends Lexer {
public final void mRULE_WS() throws RecognitionException {
try {
int _type = RULE_WS;
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:153:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:153:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:154:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:154:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
{
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:153:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:154:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
int cnt11=0;
loop11:
do {
@@ -518,8 +518,8 @@ public class InternalMetamodelRefTestLexer extends Lexer {
public final void mRULE_ANY_OTHER() throws RecognitionException {
try {
int _type = RULE_ANY_OTHER;
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:155:16: ( . )
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:155:18: .
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:156:16: ( . )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:156:18: .
{
matchAny();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestParser.java
index e6c00a8..2c250c2 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g 2008-11-28 10:59:03
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g 2008-12-02 18:42:19
package org.eclipse.xtext.metamodelreferencing.tests.parser.internal;
@@ -20,14 +20,14 @@ import java.util.ArrayList;
public class InternalMetamodelRefTestParser extends AbstractAntlrParser {
public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_STRING", "RULE_INT", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER"
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER"
};
public static final int RULE_ML_COMMENT=7;
public static final int RULE_ID=4;
public static final int RULE_WS=9;
public static final int EOF=-1;
- public static final int RULE_INT=6;
- public static final int RULE_STRING=5;
+ public static final int RULE_INT=5;
+ public static final int RULE_STRING=6;
public static final int RULE_ANY_OTHER=10;
public static final int RULE_SL_COMMENT=8;
@@ -137,7 +137,7 @@ public class InternalMetamodelRefTestParser extends AbstractAntlrParser {
int alt1=2;
int LA1_0 = input.LA(1);
- if ( (LA1_0==RULE_STRING) ) {
+ if ( (LA1_0==RULE_ID) ) {
alt1=1;
}
@@ -227,33 +227,34 @@ public class InternalMetamodelRefTestParser extends AbstractAntlrParser {
// $ANTLR start ruleNameRef
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:119:1: ruleNameRef returns [EObject current=null] : (lv_name= RULE_STRING ) ;
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:119:1: ruleNameRef returns [EObject current=null] : ( ( RULE_ID ) ) ;
public final EObject ruleNameRef() throws RecognitionException {
EObject current = null;
- Token lv_name=null;
-
EObject temp=null; setCurrentLookahead(); resetLookahead();
try {
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:121:33: ( (lv_name= RULE_STRING ) )
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:122:1: (lv_name= RULE_STRING )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:121:33: ( ( ( RULE_ID ) ) )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:122:1: ( ( RULE_ID ) )
{
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:122:1: (lv_name= RULE_STRING )
- // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:124:6: lv_name= RULE_STRING
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:122:1: ( ( RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:125:3: ( RULE_ID )
{
- lv_name=(Token)input.LT(1);
- match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleNameRef266);
-
- createLeafNode("classpath:/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi#//@rules.1/@alternatives/@terminal" /* xtext::RuleCall */, "name");
-
- if (current==null) {
+ if (current==null) {
current = factory.create("xtext::RuleCall");
associateNodeWithAstElement(currentNode, current);
}
-
- factory.set(current, "name", lv_name,"STRING");
-
+
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:131:1: ( RULE_ID )
+ // ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g:132:2: RULE_ID
+ {
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleNameRef269);
+
+ createLeafNode("classpath:/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi#//@rules.1/@alternatives/@terminal" /* xtext::CrossReference */, "rule");
+
+
+ }
+
}
@@ -278,10 +279,10 @@ public class InternalMetamodelRefTestParser extends AbstractAntlrParser {
public static final BitSet FOLLOW_ruleFoo_in_entryRuleFoo70 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFoo80 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_RULE_ID_in_ruleFoo126 = new BitSet(new long[]{0x0000000000000022L});
- public static final BitSet FOLLOW_ruleNameRef_in_ruleFoo171 = new BitSet(new long[]{0x0000000000000022L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleFoo126 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_ruleNameRef_in_ruleFoo171 = new BitSet(new long[]{0x0000000000000012L});
public static final BitSet FOLLOW_ruleNameRef_in_entryRuleNameRef211 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleNameRef221 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_RULE_STRING_in_ruleNameRef266 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleNameRef269 = new BitSet(new long[]{0x0000000000000002L});
} \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest__.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest__.g
index 0a51cc1..478e331 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest__.g
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest__.g
@@ -7,25 +7,25 @@ package org.eclipse.xtext.metamodelreferencing.tests.parser.internal;
import org.eclipse.xtext.parser.antlr.Lexer;
}
-// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 143
+// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 144
RULE_ID : ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
-// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 145
+// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 146
RULE_INT : ('0'..'9')+;
-// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 147
+// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 148
RULE_STRING : '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'"') )* '"' | '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\'';
-// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 149
+// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 150
RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )* '*/' {$channel=HIDDEN;};
-// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 151
+// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 152
RULE_SL_COMMENT : '//' ~('\n'|'\r')* ('\r'? '\n')? {$channel=HIDDEN;};
-// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 153
+// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 154
RULE_WS : (' '|'\t'|'\r'|'\n')+ {$channel=HIDDEN;};
-// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 155
+// $ANTLR src "./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g" 156
RULE_ANY_OTHER : .;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parsetree/reconstr/MetamodelRefTestParseTreeConstructor.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parsetree/reconstr/MetamodelRefTestParseTreeConstructor.java
index 33877cc..0e9a73b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parsetree/reconstr/MetamodelRefTestParseTreeConstructor.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parsetree/reconstr/MetamodelRefTestParseTreeConstructor.java
@@ -23,7 +23,8 @@ public class MetamodelRefTestParseTreeConstructor extends AbstractParseTreeConst
IInstanceDescription inst = getDescr(obj);
Solution s;
if(inst.isInstanceOf("Foo") && (s = new Foo_Group(inst, null).firstSolution()) != null) return s;
- if(inst.isInstanceOf("xtext::RuleCall") && (s = new NameRef_Assignment_name(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("xtext::RuleCall") && (s = new NameRef_Assignment_rule(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("xtext::ParserRule") && (s = new MyRule_Assignment_name(inst, null).firstSolution()) != null) return s;
return null;
}
@@ -102,7 +103,7 @@ protected class Foo_1_Assignment_nameRefs extends AssignmentToken {
if(value instanceof EObject) { // xtext::RuleCall
IInstanceDescription param = getDescr((EObject)value);
if(param.isInstanceOf("xtext::RuleCall")) {
- Solution s = new NameRef_Assignment_name(param, this).firstSolution();
+ Solution s = new NameRef_Assignment_rule(param, this).firstSolution();
if(s != null) {
type = AssignmentType.PRC;
return new Solution(obj,s.getPredecessor());
@@ -118,15 +119,15 @@ protected class Foo_1_Assignment_nameRefs extends AssignmentToken {
/************ begin Rule NameRef ****************
*
- * NameRef returns xtext :: RuleCall : name = STRING ;
+ * NameRef returns xtext :: RuleCall : rule = [ MyRule ] ;
*
**/
-// name = STRING
-protected class NameRef_Assignment_name extends AssignmentToken {
+// rule = [ MyRule ]
+protected class NameRef_Assignment_rule extends AssignmentToken {
- public NameRef_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
+ public NameRef_Assignment_rule(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
@@ -135,17 +136,52 @@ protected class NameRef_Assignment_name extends AssignmentToken {
}
protected Solution createSolution() {
+ if((value = current.getConsumable("rule",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("rule");
+ if(value instanceof EObject) { // xtext::CrossReference
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("MyRule")) {
+ type = AssignmentType.CR;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi#//@rules.1/@alternatives/@terminal");
+ return new Solution(obj);
+ }
+ }
+ return null;
+ }
+}
+
+/************ end Rule NameRef ****************/
+
+/************ begin Rule MyRule ****************
+ *
+ * MyRule returns xtext :: ParserRule : name = ID ;
+ *
+ **/
+
+
+// name = ID
+protected class MyRule_Assignment_name extends AssignmentToken {
+
+ public MyRule_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi#//@rules.2/@alternatives");
+ }
+
+ protected Solution createSolution() {
if((value = current.getConsumable("name",required)) == null) return null;
IInstanceDescription obj = current.cloneAndConsume("name");
if(true) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
type = AssignmentType.LRC;
- element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi#//@rules.1/@alternatives/@terminal");
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi#//@rules.2/@alternatives/@terminal");
return new Solution(obj);
}
return null;
}
}
-/************ end Rule NameRef ****************/
+/************ end Rule MyRule ****************/
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/services/MetamodelRefTestGrammarAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/services/MetamodelRefTestGrammarAccess.java
index 37832e1..3e3a43f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/services/MetamodelRefTestGrammarAccess.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/services/MetamodelRefTestGrammarAccess.java
@@ -32,6 +32,10 @@ public class MetamodelRefTestGrammarAccess extends BaseEPackageAccess implements
return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi#//@rules.1"),true);
}
+ public ParserRule pr_MyRule() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xmi#//@rules.2"),true);
+ }
+
public LexerRule lr_ID() {
return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"),true);
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestLexer.java
index e5eb43d..dd3c8e9 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTest.g 2008-11-28 10:59:02
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTest.g 2008-12-02 18:42:18
package org.eclipse.xtext.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestParser.java
index 1057ea8..afcc496 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTest.g 2008-11-28 10:59:01
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTest.g 2008-12-02 18:42:18
package org.eclipse.xtext.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/ComplexReconstrTest.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/ComplexReconstrTest.xmi
index cf57ac0..3a470eb 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/ComplexReconstrTest.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/ComplexReconstrTest.xmi
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="complexrewritetest" nsURI="http://complex/rewrite/test"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>parsetree</idElements>
<idElements>reconstr</idElements>
<idElements>ComplexReconstrTest</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="complexrewritetest" nsURI="http://complex/rewrite/test"/>
<rules xsi:type="xtext:ParserRule" name="Op">
<type name="Expression"/>
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:RuleCall" name="Term"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.1"/>
<abstractTokens xsi:type="xtext:Alternatives" cardinality="*">
<groups xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
@@ -19,8 +19,8 @@
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="+"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="addOperands">
- <terminal xsi:type="xtext:RuleCall" name="Term"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="addOperands" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
</groups>
<groups xsi:type="xtext:Group">
@@ -30,8 +30,8 @@
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="-"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="minusOperands">
- <terminal xsi:type="xtext:RuleCall" name="Term"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="minusOperands" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
</groups>
</abstractTokens>
@@ -40,13 +40,15 @@
<rules xsi:type="xtext:ParserRule" name="Term">
<type name="Expression"/>
<alternatives xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="Atom"/>
- <groups xsi:type="xtext:RuleCall" name="Parens"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.2"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Atom">
- <alternatives xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Parens">
@@ -55,11 +57,11 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="("/>
- <abstractTokens xsi:type="xtext:RuleCall" name="Op"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.0"/>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="=" feature="em">
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" feature="em" operator="=">
<terminal xsi:type="xtext:Keyword" value="!"/>
</abstractTokens>
</alternatives>
@@ -71,10 +73,12 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="TA"/>
- <abstractTokens xsi:type="xtext:RuleCall" name="TrickyA1"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.5"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="name" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Alternatives" cardinality="?">
@@ -92,15 +96,19 @@
</groups>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="TrickyA1">
<type name="TypeD"/>
- <alternatives xsi:type="xtext:Assignment" operator="+=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <alternatives xsi:type="xtext:Assignment" feature="name" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="TrickyB">
@@ -108,16 +116,22 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="TB"/>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="type" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="type" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
@@ -127,8 +141,10 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="TC"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
@@ -160,29 +176,41 @@
<abstractTokens xsi:type="xtext:Keyword" value="TD"/>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="foo">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="foo" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="type" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="type" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="type" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
@@ -193,26 +221,36 @@
<abstractTokens xsi:type="xtext:Keyword" value="TE"/>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="foo">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="foo" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="type" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="x"/>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="type" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</alternatives>
@@ -222,20 +260,28 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="TF"/>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="type" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:Assignment" operator="+=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <groups xsi:type="xtext:Assignment" feature="name" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</groups>
- <groups xsi:type="xtext:Assignment" operator="+=" feature="type">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <groups xsi:type="xtext:Assignment" feature="type" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</groups>
</abstractTokens>
</alternatives>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/SimpleReconstrTest.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/SimpleReconstrTest.xmi
index 7cae507..67a74a6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/SimpleReconstrTest.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/SimpleReconstrTest.xmi
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="simplerewritetest" nsURI="http://simple/rewrite/test"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>parsetree</idElements>
<idElements>reconstr</idElements>
<idElements>SimpleReconstrTest</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="simplerewritetest" nsURI="http://simple/rewrite/test"/>
<rules xsi:type="xtext:ParserRule" name="Op">
<type name="Expression"/>
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:RuleCall" name="Term"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.1"/>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Action" feature="values" operator="+=">
<typeName name="Op"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="values">
- <terminal xsi:type="xtext:RuleCall" name="Term"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="values" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
</abstractTokens>
</alternatives>
@@ -29,23 +29,25 @@
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="Atom"/>
- <groups xsi:type="xtext:RuleCall" name="TwoNumbers"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.2"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="ManyStrings"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.5"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="Parens"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="Type"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.6"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="Ref2"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.7"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="Spare"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.8"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Atom">
- <alternatives xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Parens">
@@ -54,11 +56,11 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="("/>
- <abstractTokens xsi:type="xtext:RuleCall" name="Op"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.0"/>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="=" feature="em">
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" feature="em" operator="=">
<terminal xsi:type="xtext:Keyword" value="!"/>
</abstractTokens>
</alternatives>
@@ -66,17 +68,23 @@
<rules xsi:type="xtext:ParserRule" name="TwoNumbers">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="num1">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="num1" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="num2">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="num2" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Keyword" value="#"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="num3">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="num3" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</alternatives>
@@ -85,12 +93,16 @@
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="="/>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="str1">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="str1" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="str2">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="str2" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
@@ -99,13 +111,15 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="type"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="extends"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="extends">
+ <abstractTokens xsi:type="xtext:Assignment" feature="extends" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="Type"/>
</terminal>
@@ -115,11 +129,13 @@
<rules xsi:type="xtext:ParserRule" name="Ref2">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="#2"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="ref2">
+ <abstractTokens xsi:type="xtext:Assignment" feature="ref2" operator="=">
<terminal xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Keyword" value="mykeyword1"/>
- <groups xsi:type="xtext:RuleCall" name="STRING"/>
+ <groups xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </groups>
</groups>
<groups xsi:type="xtext:Keyword" value="mykeyword2"/>
</terminal>
@@ -130,14 +146,18 @@
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="#3"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="id">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="id" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Keyword" value="."/>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="id">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="id" operator="+=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
</alternatives>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestLexer.java
index c7307ef..9da629a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTest.g 2008-11-28 10:59:06
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTest.g 2008-12-02 18:42:22
package org.eclipse.xtext.parsetree.reconstr.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestParser.java
index 277068a..4f6dddf 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTest.g 2008-11-28 10:59:05
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTest.g 2008-12-02 18:42:21
package org.eclipse.xtext.parsetree.reconstr.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestLexer.java
index ef6a6ac..753b693 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTest.g 2008-11-28 10:59:05
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTest.g 2008-12-02 18:42:21
package org.eclipse.xtext.parsetree.reconstr.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestParser.java
index 4be4b50..078e0ad 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTest.g 2008-11-28 10:59:05
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTest.g 2008-12-02 18:42:21
package org.eclipse.xtext.parsetree.reconstr.parser.internal;
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
new file mode 100644
index 0000000..6b9c1dd
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/AbstractContentAssistTestLanguageRuntimeConfig.java
@@ -0,0 +1,70 @@
+package org.eclipse.xtext.testlanguages;
+
+import java.util.Set;
+
+import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
+
+/**
+ * used to register components to be used at runtime.
+ */
+public abstract class AbstractContentAssistTestLanguageRuntimeConfig extends AbstractServiceRegistrationFactory {
+
+ protected Class<? extends org.eclipse.xtext.IGrammarAccess> getIGrammarAccess() {
+ return org.eclipse.xtext.testlanguages.services.ContentAssistTestLanguageGrammarAccess.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.IMetamodelAccess> getIMetamodelAccess() {
+ return org.eclipse.xtext.testlanguages.services.ContentAssistTestLanguageMetamodelAccess.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IAstFactory> getIAstFactory() {
+ return org.eclipse.xtext.parser.GenericEcoreElementFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.IParser> getIParser() {
+ return org.eclipse.xtext.testlanguages.parser.ContentAssistTestLanguageParser.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> getIAntlrTokenFileProvider() {
+ return org.eclipse.xtext.testlanguages.parser.ContentAssistTestLanguageAntlrTokenFileProvider.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.resource.IResourceFactory> getIResourceFactory() {
+ return org.eclipse.xtext.testlanguages.services.ContentAssistTestLanguageResourceFactory.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor> getIParseTreeConstructor() {
+ return org.eclipse.xtext.testlanguages.parsetree.reconstr.ContentAssistTestLanguageParseTreeConstructor.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parsetree.reconstr.ITokenSerializer> getITokenSerializer() {
+ return org.eclipse.xtext.parsetree.reconstr.impl.WhitespacePreservingTokenSerializer.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer> getICrossReferenceSerializer() {
+ return org.eclipse.xtext.parsetree.reconstr.impl.SimpleCrossReferenceSerializer.class;
+ }
+
+ protected Class<? extends org.eclipse.xtext.parser.antlr.Lexer> getLexer() {
+ return org.eclipse.xtext.testlanguages.parser.internal.InternalContentAssistTestLanguageLexer.class;
+ }
+
+
+ public Set<IServiceRegistration> registrations() {
+ return scope(org.eclipse.xtext.testlanguages.IContentAssistTestLanguage.SCOPE)
+ .with(org.eclipse.xtext.IGrammarAccess.class, getIGrammarAccess())
+ .with(org.eclipse.xtext.IMetamodelAccess.class, getIMetamodelAccess())
+ .with(org.eclipse.xtext.parser.IAstFactory.class, getIAstFactory())
+ .with(org.eclipse.xtext.parser.IParser.class, getIParser())
+ .with(org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider.class, getIAntlrTokenFileProvider())
+ .with(org.eclipse.xtext.resource.IResourceFactory.class, getIResourceFactory())
+ .with(org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor.class, getIParseTreeConstructor())
+ .with(org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.class, getITokenSerializer())
+ .with(org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer.class, getICrossReferenceSerializer())
+ .with(org.eclipse.xtext.parser.antlr.Lexer.class, getLexer())
+
+ .registrations();
+ }
+
+}
+
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ActionTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ActionTestLanguage.xmi
index d443364..5174fe7 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ActionTestLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ActionTestLanguage.xmi
@@ -1,26 +1,26 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="ActionLang" nsURI="http://www.eclipse.org/2008/tmf/xtext/ActionLang"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>testlanguages</idElements>
<idElements>ActionTestLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="ActionLang" nsURI="http://www.eclipse.org/2008/tmf/xtext/ActionLang"/>
<rules xsi:type="xtext:ParserRule" name="Model">
- <alternatives xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="children">
- <terminal xsi:type="xtext:RuleCall" name="Element"/>
+ <alternatives xsi:type="xtext:Assignment" cardinality="*" feature="children" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Element">
<type name="Type"/>
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:RuleCall" name="Item"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.2"/>
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Action" feature="items" operator="+=">
<typeName name="Item"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="items">
- <terminal xsi:type="xtext:RuleCall" name="Item"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="items" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</abstractTokens>
</abstractTokens>
</alternatives>
@@ -31,8 +31,10 @@
<abstractTokens xsi:type="xtext:Action" feature="content" operator="=">
<typeName name="Thing"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi
new file mode 100644
index 0000000..584f8ea
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
+ <idElements>org</idElements>
+ <idElements>eclipse</idElements>
+ <idElements>xtext</idElements>
+ <idElements>testlanguages</idElements>
+ <idElements>ContentAssistTestLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="contentAssistTestLanguage" nsURI="http://www.eclipse.org/2008/xtext/tests/ContentAssist"/>
+ <rules xsi:type="xtext:ParserRule" name="Start">
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="abstract rules"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="+" feature="rules" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="end"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="AbstractRule">
+ <alternatives xsi:type="xtext:Alternatives">
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.2"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.3"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="FirstAbstractRuleChild">
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="("/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" feature="elements" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value=")"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value=";"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="SecondAbstractRuleChild">
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value="rule"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value=":"/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" feature="rule" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value=";"/>
+ </alternatives>
+ </rules>
+ <rules xsi:type="xtext:ParserRule" name="AbstractRuleCall">
+ <alternatives xsi:type="xtext:Assignment" feature="rule" operator="=">
+ <terminal xsi:type="xtext:CrossReference">
+ <type name="AbstractRule"/>
+ </terminal>
+ </alternatives>
+ </rules>
+</xtext:Grammar>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageStandaloneSetup.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageStandaloneSetup.java
new file mode 100644
index 0000000..de40116
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageStandaloneSetup.java
@@ -0,0 +1,53 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.EcoreUtil2;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xtext.resource.IResourceFactory;
+import org.eclipse.xtext.service.IServiceScope;
+import org.eclipse.xtext.service.ServiceRegistry;
+import org.eclipse.xtext.service.IServiceRegistrationFactory.IServiceRegistration;
+
+import org.eclipse.xtext.testlanguages.IContentAssistTestLanguage;
+
+public abstract class ContentAssistTestLanguageStandaloneSetup {
+
+ private static boolean isInitialized = false;
+
+ public synchronized static void doSetup() {
+ if(!isInitialized) {
+ // setup super language first
+ org.eclipse.xtext.builtin.XtextBuiltinStandaloneSetup.doSetup();
+
+ for (IServiceRegistration reg : new org.eclipse.xtext.testlanguages.ContentAssistTestLanguageRuntimeConfig().registrations()) {
+ ServiceRegistry.registerFactory(reg.scope(), reg.serviceFactory(), reg.priority());
+ }
+
+ // register resource factory to EMF
+ IResourceFactory resourceFactory = new org.eclipse.xtext.testlanguages.services.ContentAssistTestLanguageResourceFactory();
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("contentassisttestlanguage", resourceFactory);
+
+
+ // initialize EPackages
+
+ if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2008/xtext/tests/ContentAssist")) {
+ EPackage contentAssistTestLanguage = EcoreUtil2.loadEPackage(
+ "classpath:/org/eclipse/xtext/testlanguages/contentAssistTestLanguage.ecore",
+ ContentAssistTestLanguageStandaloneSetup.class.getClassLoader());
+ if (contentAssistTestLanguage == null)
+ throw new IllegalStateException(
+ "Couldn't load EPackage from 'classpath:/org/eclipse/xtext/testlanguages/contentAssistTestLanguage.ecore'");
+ EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2008/xtext/tests/ContentAssist", contentAssistTestLanguage);
+ }
+
+ isInitialized = true;
+ }
+ }
+
+ public static IServiceScope getServiceScope() {
+ return org.eclipse.xtext.testlanguages.IContentAssistTestLanguage.SCOPE;
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/FowlerDslTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/FowlerDslTestLanguage.xmi
index 397894f..71080ef 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/FowlerDslTestLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/FowlerDslTestLanguage.xmi
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="fowlerdsl" nsURI="http://example.xtext.org/FowlerDslTestLanguage"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>testlanguages</idElements>
<idElements>FowlerDslTestLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="fowlerdsl" nsURI="http://example.xtext.org/FowlerDslTestLanguage"/>
<rules xsi:type="xtext:ParserRule" name="Statemachine">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
@@ -14,47 +14,55 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="events"/>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="events">
- <terminal xsi:type="xtext:RuleCall" name="Event"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="events" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="end"/>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="commands"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="commands">
- <terminal xsi:type="xtext:RuleCall" name="Command"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="commands" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="end"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="states">
- <terminal xsi:type="xtext:RuleCall" name="State"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="states" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Event">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="?=" feature="resetting">
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" feature="resetting" operator="?=">
<terminal xsi:type="xtext:Keyword" value="resetting"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="code">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="code" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Command">
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="code">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="code" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
@@ -64,8 +72,10 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="state"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
@@ -74,7 +84,7 @@
<abstractTokens xsi:type="xtext:Keyword" value="actions"/>
<abstractTokens xsi:type="xtext:Keyword" value="{"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="+" operator="+=" feature="actions">
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="+" feature="actions" operator="+=">
<terminal xsi:type="xtext:CrossReference">
<type name="Command"/>
</terminal>
@@ -83,8 +93,8 @@
<abstractTokens xsi:type="xtext:Keyword" value="}"/>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="transitions">
- <terminal xsi:type="xtext:RuleCall" name="Transition"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="transitions" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="end"/>
@@ -93,14 +103,14 @@
<rules xsi:type="xtext:ParserRule" name="Transition">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="event">
+ <abstractTokens xsi:type="xtext:Assignment" feature="event" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="Event"/>
</terminal>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="=>"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="state">
+ <abstractTokens xsi:type="xtext:Assignment" feature="state" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="State"/>
</terminal>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/IContentAssistTestLanguage.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/IContentAssistTestLanguage.java
new file mode 100644
index 0000000..09482c4
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/IContentAssistTestLanguage.java
@@ -0,0 +1,23 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages;
+
+import org.eclipse.xtext.service.IServiceScope;
+import org.eclipse.xtext.service.ServiceScopeFactory;
+
+public interface IContentAssistTestLanguage {
+
+ /**
+ * the unique identifier of this language.
+ * To be used to get the language descriptor and related services from the registry.
+ * Within ILanguageServices it is encouraged to use dependency injection instead
+ * of directly accessing the ServiceRegistry
+ */
+ public static final String ID = "org.eclipse.xtext.testlanguages.ContentAssistTestLanguage";
+ public static final String NAME = "ContentAssistTestLanguage";
+ public static final String NAMESPACE = "org.eclipse.xtext.testlanguages";
+ public static final String[] FILE_EXTENSIONS = new String[]{"contentassisttestlanguage"};
+ public static final IServiceScope SCOPE = ServiceScopeFactory.createScope(ID, org.eclipse.xtext.builtin.IXtextBuiltin.SCOPE);
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/LexerLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/LexerLanguage.xmi
index 1e7623d..f1985b0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/LexerLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/LexerLanguage.xmi
@@ -1,23 +1,25 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="LexerLang" nsURI="http://www.eclipse.org/2008/xtext/LexerLang"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>testlanguages</idElements>
<idElements>LexerLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="LexerLang" nsURI="http://www.eclipse.org/2008/xtext/LexerLang"/>
<rules xsi:type="xtext:ParserRule" name="Model">
- <alternatives xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="children">
- <terminal xsi:type="xtext:RuleCall" name="Element"/>
+ <alternatives xsi:type="xtext:Assignment" cardinality="*" feature="children" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Element">
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="h">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="h" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</abstractTokens>
</alternatives>
</rules>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/LookaheadLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/LookaheadLanguage.xmi
index 6c259f5..688f665 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/LookaheadLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/LookaheadLanguage.xmi
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="LookaheadLang" nsURI="http://www.eclipse.org/2008/xtext/LookaheadLang"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>testlanguages</idElements>
<idElements>LookaheadLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="LookaheadLang" nsURI="http://www.eclipse.org/2008/xtext/LookaheadLang"/>
<rules xsi:type="xtext:ParserRule" name="Entry">
- <alternatives xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="contents">
- <terminal xsi:type="xtext:RuleCall" name="Alts"/>
+ <alternatives xsi:type="xtext:Assignment" cardinality="*" feature="contents" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Alts">
<alternatives xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="LookAhead0"/>
- <groups xsi:type="xtext:RuleCall" name="LookAhead1"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.2"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="LookAhead3"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.5"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="LookAhead0">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="bar"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="x">
+ <abstractTokens xsi:type="xtext:Assignment" feature="x" operator="=">
<terminal xsi:type="xtext:Keyword" value="a"/>
</abstractTokens>
</alternatives>
@@ -33,15 +33,15 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="foo"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="y">
- <terminal xsi:type="xtext:RuleCall" name="LookAhead2"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="y" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="x">
+ <abstractTokens xsi:type="xtext:Assignment" feature="x" operator="=">
<terminal xsi:type="xtext:Keyword" value="b"/>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="x">
+ <abstractTokens xsi:type="xtext:Assignment" feature="x" operator="=">
<terminal xsi:type="xtext:Keyword" value="d"/>
</abstractTokens>
</alternatives>
@@ -49,10 +49,10 @@
<rules xsi:type="xtext:ParserRule" name="LookAhead2">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:Assignment" operator="=" feature="z">
+ <groups xsi:type="xtext:Assignment" feature="z" operator="=">
<terminal xsi:type="xtext:Keyword" value="foo"/>
</groups>
- <groups xsi:type="xtext:Assignment" operator="=" feature="z">
+ <groups xsi:type="xtext:Assignment" feature="z" operator="=">
<terminal xsi:type="xtext:Keyword" value="bar"/>
</groups>
</abstractTokens>
@@ -66,21 +66,21 @@
<abstractTokens xsi:type="xtext:Keyword" value="foo"/>
<abstractTokens xsi:type="xtext:Keyword" value="bar"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="x">
+ <abstractTokens xsi:type="xtext:Assignment" feature="x" operator="=">
<terminal xsi:type="xtext:Keyword" value="b"/>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="z">
- <terminal xsi:type="xtext:RuleCall" name="LookAhead4"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="z" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.6"/>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="LookAhead4">
<alternatives xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:Assignment" operator="=" feature="x">
+ <groups xsi:type="xtext:Assignment" feature="x" operator="=">
<terminal xsi:type="xtext:Keyword" value="c"/>
</groups>
- <groups xsi:type="xtext:Assignment" operator="=" feature="x">
+ <groups xsi:type="xtext:Assignment" feature="x" operator="=">
<terminal xsi:type="xtext:Keyword" value="d"/>
</groups>
</alternatives>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/OptionalEmptyLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/OptionalEmptyLanguage.xmi
index 4d6d001..0fce7c9 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/OptionalEmptyLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/OptionalEmptyLanguage.xmi
@@ -1,21 +1,23 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="OptionalEmpty" nsURI="http://www.eclipse.org/2008/tmf/xtext/OptionalEmpty"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>testlanguages</idElements>
<idElements>OptionalEmptyLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="OptionalEmpty" nsURI="http://www.eclipse.org/2008/tmf/xtext/OptionalEmpty"/>
<rules xsi:type="xtext:ParserRule" name="Model">
- <alternatives xsi:type="xtext:Assignment" cardinality="?" operator="=" feature="child">
- <terminal xsi:type="xtext:RuleCall" name="Greeting"/>
+ <alternatives xsi:type="xtext:Assignment" cardinality="?" feature="child" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Greeting">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="hallo"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi
index c8abe0d..d438d64 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/PartialParserTestLanguage.xmi
@@ -1,29 +1,31 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="partialParserTestLanguage" nsURI="http://example.xtext.org/PartialParserTestLanguage"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>testlanguages</idElements>
<idElements>PartialParserTestLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="partialParserTestLanguage" nsURI="http://example.xtext.org/PartialParserTestLanguage"/>
<rules xsi:type="xtext:ParserRule" name="Container">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="container"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="{"/>
</abstractTokens>
<abstractTokens xsi:type="xtext:Alternatives" cardinality="*">
- <groups xsi:type="xtext:Assignment" operator="+=" feature="nested">
- <terminal xsi:type="xtext:RuleCall" name="Nested"/>
+ <groups xsi:type="xtext:Assignment" feature="nested" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</groups>
- <groups xsi:type="xtext:Assignment" operator="+=" feature="content">
- <terminal xsi:type="xtext:RuleCall" name="Content"/>
+ <groups xsi:type="xtext:Assignment" feature="content" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</groups>
</abstractTokens>
</abstractTokens>
@@ -37,8 +39,8 @@
<abstractTokens xsi:type="xtext:Keyword" value="nested"/>
<abstractTokens xsi:type="xtext:Keyword" value="{"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="+" operator="+=" feature="nested">
- <terminal xsi:type="xtext:RuleCall" name="Container"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="+" feature="nested" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.0"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="}"/>
@@ -46,8 +48,8 @@
</rules>
<rules xsi:type="xtext:ParserRule" name="Content">
<alternatives xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="Children"/>
- <groups xsi:type="xtext:RuleCall" name="AbstractChildren"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.3"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.5"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Children">
@@ -58,14 +60,14 @@
<abstractTokens xsi:type="xtext:Keyword" value="children"/>
<abstractTokens xsi:type="xtext:Keyword" value="{"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="children">
- <terminal xsi:type="xtext:RuleCall" name="Child"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="children" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Keyword" value=","/>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="children">
- <terminal xsi:type="xtext:RuleCall" name="Child"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="children" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</abstractTokens>
</abstractTokens>
</abstractTokens>
@@ -82,8 +84,8 @@
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="value">
- <terminal xsi:type="xtext:RuleCall" name="Named"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="value" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.9"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
@@ -96,8 +98,8 @@
<abstractTokens xsi:type="xtext:Keyword" value="abstract children"/>
<abstractTokens xsi:type="xtext:Keyword" value="{"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="+" operator="+=" feature="abstractChildren">
- <terminal xsi:type="xtext:RuleCall" name="AbstractChild"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="+" feature="abstractChildren" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.6"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="}"/>
@@ -105,8 +107,8 @@
</rules>
<rules xsi:type="xtext:ParserRule" name="AbstractChild">
<alternatives xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="FirstConcrete"/>
- <groups xsi:type="xtext:RuleCall" name="SecondConcrete"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.7"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.8"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="FirstConcrete">
@@ -120,11 +122,11 @@
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="value">
- <terminal xsi:type="xtext:RuleCall" name="Named"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="value" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.9"/>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="=" feature="referencedContainer">
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" feature="referencedContainer" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="Container"/>
</terminal>
@@ -147,11 +149,11 @@
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="value">
- <terminal xsi:type="xtext:RuleCall" name="Named"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="value" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.9"/>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="+=" feature="referencedChildren">
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" feature="referencedChildren" operator="+=">
<terminal xsi:type="xtext:CrossReference">
<type name="Child"/>
</terminal>
@@ -161,8 +163,10 @@
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Named">
- <alternatives xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</alternatives>
</rules>
</xtext:Grammar>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi
index f128888..cf85712 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="ReferenceGrammar" nsURI="http://eclipse.org/xtext/reference/ReferenceGrammar"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>testlanguages</idElements>
<idElements>ReferenceGrammar</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="ReferenceGrammar" nsURI="http://eclipse.org/xtext/reference/ReferenceGrammar"/>
<rules xsi:type="xtext:ParserRule" name="Spielplatz">
<alternatives xsi:type="xtext:Group" cardinality="?">
<abstractTokens xsi:type="xtext:Group">
@@ -13,12 +13,16 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="spielplatz"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="groesse">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="groesse" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="=" feature="beschreibung">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" feature="beschreibung" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="{"/>
@@ -26,19 +30,19 @@
<abstractTokens xsi:type="xtext:Alternatives" cardinality="*">
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:Assignment" operator="+=" feature="kinder">
- <terminal xsi:type="xtext:RuleCall" name="Kind"/>
+ <groups xsi:type="xtext:Assignment" feature="kinder" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</groups>
- <groups xsi:type="xtext:Assignment" operator="+=" feature="erzieher">
- <terminal xsi:type="xtext:RuleCall" name="Erwachsener"/>
+ <groups xsi:type="xtext:Assignment" feature="erzieher" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</groups>
</groups>
- <groups xsi:type="xtext:Assignment" operator="+=" feature="spielzeuge">
- <terminal xsi:type="xtext:RuleCall" name="Spielzeug"/>
+ <groups xsi:type="xtext:Assignment" feature="spielzeuge" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</groups>
</groups>
- <groups xsi:type="xtext:Assignment" operator="+=" feature="familie">
- <terminal xsi:type="xtext:RuleCall" name="Familie"/>
+ <groups xsi:type="xtext:Assignment" feature="familie" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.6"/>
</groups>
</abstractTokens>
</abstractTokens>
@@ -47,8 +51,8 @@
</rules>
<rules xsi:type="xtext:ParserRule" name="Person">
<alternatives xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="Kind"/>
- <groups xsi:type="xtext:RuleCall" name="Erwachsener"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.2"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Kind">
@@ -59,12 +63,16 @@
<abstractTokens xsi:type="xtext:Keyword" value="kind"/>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="age">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="age" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
@@ -78,12 +86,16 @@
<abstractTokens xsi:type="xtext:Keyword" value="erwachsener"/>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="age">
- <terminal xsi:type="xtext:RuleCall" name="INT"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="age" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
@@ -97,12 +109,14 @@
<abstractTokens xsi:type="xtext:Keyword" value="spielzeug"/>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="farbe">
- <terminal xsi:type="xtext:RuleCall" name="Farbe"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="farbe" operator="=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.5"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
@@ -131,29 +145,33 @@
<abstractTokens xsi:type="xtext:Keyword" value="familie"/>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
<terminal xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Keyword" value="keyword"/>
- <groups xsi:type="xtext:RuleCall" name="STRING"/>
+ <groups xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </groups>
+ </groups>
+ <groups xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="ID"/>
</terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="mutter">
+ <abstractTokens xsi:type="xtext:Assignment" feature="mutter" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="Erwachsener"/>
</terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="vater">
+ <abstractTokens xsi:type="xtext:Assignment" feature="vater" operator="=">
<terminal xsi:type="xtext:CrossReference">
<type name="Erwachsener"/>
</terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="kinder">
+ <abstractTokens xsi:type="xtext:Assignment" feature="kinder" operator="+=">
<terminal xsi:type="xtext:CrossReference">
<type name="Kind"/>
</terminal>
@@ -161,7 +179,7 @@
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Keyword" value=","/>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="kinder">
+ <abstractTokens xsi:type="xtext:Assignment" feature="kinder" operator="+=">
<terminal xsi:type="xtext:CrossReference">
<type name="Kind"/>
</terminal>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/SimpleExpressions.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/SimpleExpressions.xmi
index 3904071..61bd249 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/SimpleExpressions.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/SimpleExpressions.xmi
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="simpleExpressions" nsURI="http://www.eclipse.org/xtext/test/simpleExpressions"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>testlanguages</idElements>
<idElements>SimpleExpressions</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="simpleExpressions" nsURI="http://www.eclipse.org/xtext/test/simpleExpressions"/>
<rules xsi:type="xtext:ParserRule" name="Sequence">
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:RuleCall" name="Addition"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.1"/>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Action" feature="expressions" operator="+=">
<typeName name="Sequence"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="expressions">
- <terminal xsi:type="xtext:RuleCall" name="Addition"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="expressions" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
</abstractTokens>
</alternatives>
@@ -22,21 +22,21 @@
<rules xsi:type="xtext:ParserRule" name="Addition">
<type name="Expression"/>
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:RuleCall" name="Multiplication"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.2"/>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Action" feature="values" operator="+=">
<typeName name="Op"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="operator">
+ <abstractTokens xsi:type="xtext:Assignment" feature="operator" operator="=">
<terminal xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Keyword" value="+"/>
<groups xsi:type="xtext:Keyword" value="-"/>
</terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="values">
- <terminal xsi:type="xtext:RuleCall" name="Multiplication"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="values" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</abstractTokens>
</abstractTokens>
</alternatives>
@@ -44,21 +44,21 @@
<rules xsi:type="xtext:ParserRule" name="Multiplication">
<type name="Expression"/>
<alternatives xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:RuleCall" name="Term"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.3"/>
<abstractTokens xsi:type="xtext:Group" cardinality="*">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Action" feature="values" operator="+=">
<typeName name="Op"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="operator">
+ <abstractTokens xsi:type="xtext:Assignment" feature="operator" operator="=">
<terminal xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Keyword" value="*"/>
<groups xsi:type="xtext:Keyword" value="/"/>
</terminal>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="values">
- <terminal xsi:type="xtext:RuleCall" name="Term"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="values" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</abstractTokens>
</abstractTokens>
</alternatives>
@@ -66,13 +66,15 @@
<rules xsi:type="xtext:ParserRule" name="Term">
<type name="Expression"/>
<alternatives xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="Atom"/>
- <groups xsi:type="xtext:RuleCall" name="Parens"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.4"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.5"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Atom">
- <alternatives xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Parens">
@@ -80,7 +82,7 @@
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="("/>
- <abstractTokens xsi:type="xtext:RuleCall" name="Addition"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
</alternatives>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/TestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/TestLanguage.xmi
index ca94fa7..28ac9c0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/TestLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/TestLanguage.xmi
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="TestLang" nsURI="http://www.eclipse.org/2008/xtext/TestLang"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>testlanguages</idElements>
<idElements>TestLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="TestLang" nsURI="http://www.eclipse.org/2008/xtext/TestLang"/>
<rules xsi:type="xtext:ParserRule" name="EntryRule">
<type name="Model"/>
- <alternatives xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="multiFeature">
- <terminal xsi:type="xtext:RuleCall" name="AbstractRule"/>
+ <alternatives xsi:type="xtext:Assignment" cardinality="*" feature="multiFeature" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="AbstractRule">
<type name="AbstractElement"/>
<alternatives xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:RuleCall" name="ChoiceRule"/>
- <groups xsi:type="xtext:RuleCall" name="ReducibleRule"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.2"/>
+ <groups xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="ChoiceRule">
@@ -24,12 +24,14 @@
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="choice"/>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="?" operator="?=" feature="optionalKeyword">
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="?" feature="optionalKeyword" operator="?=">
<terminal xsi:type="xtext:Keyword" value="optional"/>
</abstractTokens>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
@@ -38,22 +40,24 @@
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="reducible"/>
- <abstractTokens xsi:type="xtext:RuleCall" name="TerminalRule"/>
+ <abstractTokens xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</abstractTokens>
<abstractTokens xsi:type="xtext:Group" cardinality="?">
<abstractTokens xsi:type="xtext:Action" feature="actionFeature" operator="+=">
<typeName name="ReducibleComposite"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="actionFeature">
- <terminal xsi:type="xtext:RuleCall" name="TerminalRule"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="actionFeature" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</abstractTokens>
</abstractTokens>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="TerminalRule">
<type name="TerminalElement"/>
- <alternatives xsi:type="xtext:Assignment" operator="=" feature="stringFeature">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <alternatives xsi:type="xtext:Assignment" feature="stringFeature" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</alternatives>
</rules>
</xtext:Grammar>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/TreeTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/TreeTestLanguage.xmi
index dc504b9..58d582b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/TreeTestLanguage.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/TreeTestLanguage.xmi
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="TreeTestLanguage" nsURI="http://www.eclipse.org/2008/tmf/xtext/TreeTestLanguage"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>testlanguages</idElements>
<idElements>TreeTestLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="TreeTestLanguage" nsURI="http://www.eclipse.org/2008/tmf/xtext/TreeTestLanguage"/>
<rules xsi:type="xtext:ParserRule" name="Model">
- <alternatives xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="children">
- <terminal xsi:type="xtext:RuleCall" name="Node"/>
+ <alternatives xsi:type="xtext:Assignment" cardinality="*" feature="children" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Node">
@@ -18,21 +18,25 @@
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Group">
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="("/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="attrib">
- <terminal xsi:type="xtext:RuleCall" name="STRING"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="attrib" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </terminal>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value=")"/>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="{"/>
</abstractTokens>
- <abstractTokens xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="children">
- <terminal xsi:type="xtext:RuleCall" name="Node"/>
+ <abstractTokens xsi:type="xtext:Assignment" cardinality="*" feature="children" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</abstractTokens>
</abstractTokens>
<abstractTokens xsi:type="xtext:Keyword" value="};"/>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/contentAssistTestLanguage.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/contentAssistTestLanguage.ecore
new file mode 100644
index 0000000..8bcc3ee
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/contentAssistTestLanguage.ecore
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ASCII"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="contentAssistTestLanguage" nsURI="http://www.eclipse.org/2008/xtext/tests/ContentAssist" nsPrefix="contentAssistTestLanguage">
+ <eClassifiers xsi:type="ecore:EClass" name="Start">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="rules" upperBound="-1" eType="//AbstractRule" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AbstractRule">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="FirstAbstractRuleChild" eSuperTypes="//AbstractRule">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1" eType="//AbstractRule" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SecondAbstractRuleChild" eSuperTypes="//AbstractRule">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="rule" eType="//AbstractRuleCall" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AbstractRuleCall">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="rule" eType="//AbstractRule"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/ContentAssistTestLanguageAntlrTokenFileProvider.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/ContentAssistTestLanguageAntlrTokenFileProvider.java
new file mode 100644
index 0000000..c7ef64a
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/ContentAssistTestLanguageAntlrTokenFileProvider.java
@@ -0,0 +1,15 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages.parser;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class ContentAssistTestLanguageAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = ContentAssistTestLanguageAntlrTokenFileProvider.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.tokens");
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/ContentAssistTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/ContentAssistTestLanguageParser.java
new file mode 100644
index 0000000..e3b65ac
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/ContentAssistTestLanguageParser.java
@@ -0,0 +1,44 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages.parser;
+
+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;
+import org.eclipse.xtext.service.Inject;
+
+import org.eclipse.xtext.testlanguages.parser.internal.InternalContentAssistTestLanguageLexer;
+import org.eclipse.xtext.testlanguages.parser.internal.InternalContentAssistTestLanguageParser;
+
+public class ContentAssistTestLanguageParser extends org.eclipse.xtext.parser.AbstractParser {
+
+ @Inject
+ protected AntlrTokenDefProvider antlrTokenDefProvider;
+
+ @Override
+ protected IParseResult parse(String ruleName, ANTLRInputStream in, IAstFactory factory) {
+ InternalContentAssistTestLanguageLexer lexer = new InternalContentAssistTestLanguageLexer(in);
+ XtextTokenStream stream = new XtextTokenStream(lexer);
+ InternalContentAssistTestLanguageParser parser = new InternalContentAssistTestLanguageParser(
+ stream, factory, grammarAccess.getGrammar());
+ parser.setTokenTypeMap(antlrTokenDefProvider.getTokenDefMap());
+ try {
+ if(ruleName != null) {
+ return parser.parse(ruleName);
+ } else {
+ return parser.parse();
+ }
+ } catch (Exception re) {
+ throw new ParseException(re.getMessage(),re);
+ }
+ }
+
+ @Override
+ protected String getDefaultRuleName() {
+ return "Start";
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageLexer.java
index 90fa354..368cbee 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguage.g 2008-11-28 10:59:07
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguage.g 2008-12-02 18:42:23
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageParser.java
index e965ec8..99689be 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguage.g 2008-11-28 10:59:07
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguage.g 2008-12-02 18:42:23
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g
new file mode 100644
index 0000000..931e53d
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g
@@ -0,0 +1,305 @@
+/*
+Generated with Xtext
+*/
+grammar InternalContentAssistTestLanguage;
+
+options {
+ superClass=AbstractAntlrParser;
+}
+
+@lexer::header {
+package org.eclipse.xtext.testlanguages.parser.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+@parser::header {
+package org.eclipse.xtext.testlanguages.parser.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.xtext.parsetree.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+}
+
+@parser::members {
+
+ public InternalContentAssistTestLanguageParser(TokenStream input, IAstFactory factory, Grammar g) {
+ this(input);
+ this.factory = factory;
+ grammar = g;
+ }
+
+ @Override
+ protected InputStream getTokenFile() {
+ ClassLoader classLoader = InternalContentAssistTestLanguageParser.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.tokens");
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Start";
+ }
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+
+
+// Entry rule entryRuleStart
+entryRuleStart returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0" /* xtext::ParserRule */, currentNode); }
+ iv_ruleStart=ruleStart
+ { $current=$iv_ruleStart.current; }
+ EOF
+;
+
+// Rule Start
+ruleStart returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(('abstract rules'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+ }
+(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_rules=ruleAbstractRule
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("Start");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.add($current, "rules", lv_rules,null);
+ }
+
+)+)'end'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+);
+
+
+
+// Entry rule entryRuleAbstractRule
+entryRuleAbstractRule returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.1" /* xtext::ParserRule */, currentNode); }
+ iv_ruleAbstractRule=ruleAbstractRule
+ { $current=$iv_ruleAbstractRule.current; }
+ EOF
+;
+
+// Rule AbstractRule
+ruleAbstractRule returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.1/@alternatives/@groups.0" /* xtext::RuleCall */, currentNode);
+ }
+ this_FirstAbstractRuleChild=ruleFirstAbstractRuleChild
+ {
+ $current = $this_FirstAbstractRuleChild.current;
+ currentNode = currentNode.getParent();
+ }
+
+ |
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.1/@alternatives/@groups.1" /* xtext::RuleCall */, currentNode);
+ }
+ this_SecondAbstractRuleChild=ruleSecondAbstractRuleChild
+ {
+ $current = $this_SecondAbstractRuleChild.current;
+ currentNode = currentNode.getParent();
+ }
+);
+
+
+
+// Entry rule entryRuleFirstAbstractRuleChild
+entryRuleFirstAbstractRuleChild returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2" /* xtext::ParserRule */, currentNode); }
+ iv_ruleFirstAbstractRuleChild=ruleFirstAbstractRuleChild
+ { $current=$iv_ruleFirstAbstractRuleChild.current; }
+ EOF
+;
+
+// Rule FirstAbstractRuleChild
+ruleFirstAbstractRuleChild returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(((((
+
+ lv_name=RULE_ID
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@terminal" /* xtext::RuleCall */, "name");
+ }
+
+ {
+ if ($current==null) {
+ $current = factory.create("FirstAbstractRuleChild");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.set($current, "name", lv_name,"ID");
+ }
+
+)'('
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_elements=ruleAbstractRule
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("FirstAbstractRuleChild");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.add($current, "elements", lv_elements,null);
+ }
+
+))')'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)';'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+);
+
+
+
+// Entry rule entryRuleSecondAbstractRuleChild
+entryRuleSecondAbstractRuleChild returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3" /* xtext::ParserRule */, currentNode); }
+ iv_ruleSecondAbstractRuleChild=ruleSecondAbstractRuleChild
+ { $current=$iv_ruleSecondAbstractRuleChild.current; }
+ EOF
+;
+
+// Rule SecondAbstractRuleChild
+ruleSecondAbstractRuleChild returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(((((
+
+ lv_name=RULE_ID
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@terminal" /* xtext::RuleCall */, "name");
+ }
+
+ {
+ if ($current==null) {
+ $current = factory.create("SecondAbstractRuleChild");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.set($current, "name", lv_name,"ID");
+ }
+
+)'rule'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)':'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_rule=ruleAbstractRuleCall
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("SecondAbstractRuleChild");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.set($current, "rule", lv_rule,null);
+ }
+
+))';'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+);
+
+
+
+// Entry rule entryRuleAbstractRuleCall
+entryRuleAbstractRuleCall returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.4" /* xtext::ParserRule */, currentNode); }
+ iv_ruleAbstractRuleCall=ruleAbstractRuleCall
+ { $current=$iv_ruleAbstractRuleCall.current; }
+ EOF
+;
+
+// Rule AbstractRuleCall
+ruleAbstractRuleCall returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+(
+
+
+ {
+ if ($current==null) {
+ $current = factory.create("AbstractRuleCall");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+ }
+(
+ RULE_ID {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.4/@alternatives/@terminal" /* xtext::CrossReference */, "rule");
+ }
+)
+
+);
+
+
+
+
+RULE_ID : ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'"') )* '"' | '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\'';
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )* '*/' {$channel=HIDDEN;};
+
+RULE_SL_COMMENT : '//' ~('\n'|'\r')* ('\r'? '\n')? {$channel=HIDDEN;};
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+ {$channel=HIDDEN;};
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.tokens b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.tokens
new file mode 100644
index 0000000..6c2c05d
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.tokens
@@ -0,0 +1,14 @@
+RULE_ML_COMMENT=7
+RULE_ID=4
+RULE_WS=9
+RULE_INT=5
+RULE_STRING=6
+RULE_ANY_OTHER=10
+RULE_SL_COMMENT=8
+'('=13
+':'=17
+'abstract rules'=11
+')'=14
+'rule'=16
+'end'=12
+';'=15
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguageLexer.java
new file mode 100644
index 0000000..eedfda7
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguageLexer.java
@@ -0,0 +1,955 @@
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g 2008-12-02 18:42:28
+
+package org.eclipse.xtext.testlanguages.parser.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class InternalContentAssistTestLanguageLexer extends Lexer {
+ public static final int RULE_ML_COMMENT=7;
+ public static final int T14=14;
+ public static final int RULE_ID=4;
+ public static final int RULE_WS=9;
+ public static final int T11=11;
+ public static final int T15=15;
+ public static final int EOF=-1;
+ public static final int RULE_INT=5;
+ public static final int RULE_STRING=6;
+ public static final int T17=17;
+ public static final int T12=12;
+ public static final int Tokens=18;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int T16=16;
+ public static final int RULE_SL_COMMENT=8;
+ public static final int T13=13;
+ public InternalContentAssistTestLanguageLexer() {;}
+ public InternalContentAssistTestLanguageLexer(CharStream input) {
+ super(input);
+ }
+ public String getGrammarFileName() { return "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g"; }
+
+ // $ANTLR start T11
+ public final void mT11() throws RecognitionException {
+ try {
+ int _type = T11;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:10:5: ( 'abstract rules' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:10:7: 'abstract rules'
+ {
+ match("abstract rules");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T11
+
+ // $ANTLR start T12
+ public final void mT12() throws RecognitionException {
+ try {
+ int _type = T12;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:11:5: ( 'end' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:11:7: 'end'
+ {
+ match("end");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T12
+
+ // $ANTLR start T13
+ public final void mT13() throws RecognitionException {
+ try {
+ int _type = T13;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:12:5: ( '(' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:12:7: '('
+ {
+ match('(');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T13
+
+ // $ANTLR start T14
+ public final void mT14() throws RecognitionException {
+ try {
+ int _type = T14;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:13:5: ( ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:13:7: ')'
+ {
+ match(')');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T14
+
+ // $ANTLR start T15
+ public final void mT15() throws RecognitionException {
+ try {
+ int _type = T15;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:14:5: ( ';' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:14:7: ';'
+ {
+ match(';');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T15
+
+ // $ANTLR start T16
+ public final void mT16() throws RecognitionException {
+ try {
+ int _type = T16;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:15:5: ( 'rule' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:15:7: 'rule'
+ {
+ match("rule");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T16
+
+ // $ANTLR start T17
+ public final void mT17() throws RecognitionException {
+ try {
+ int _type = T17;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:16:5: ( ':' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:16:7: ':'
+ {
+ match(':');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T17
+
+ // $ANTLR start RULE_ID
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:291:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:291:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:291:11: ( '^' )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0=='^') ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:291:12: '^'
+ {
+ match('^');
+
+ }
+ break;
+
+ }
+
+ if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:291:41: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')||(LA2_0>='A' && LA2_0<='Z')||LA2_0=='_'||(LA2_0>='a' && LA2_0<='z')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:
+ {
+ if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop2;
+ }
+ } while (true);
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_ID
+
+ // $ANTLR start RULE_INT
+ public final void mRULE_INT() throws RecognitionException {
+ try {
+ int _type = RULE_INT;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:293:10: ( ( '0' .. '9' )+ )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:293:12: ( '0' .. '9' )+
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:293:12: ( '0' .. '9' )+
+ int cnt3=0;
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( ((LA3_0>='0' && LA3_0<='9')) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:293:13: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt3 >= 1 ) break loop3;
+ EarlyExitException eee =
+ new EarlyExitException(3, input);
+ throw eee;
+ }
+ cnt3++;
+ } while (true);
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_INT
+
+ // $ANTLR start RULE_STRING
+ public final void mRULE_STRING() throws RecognitionException {
+ try {
+ int _type = RULE_STRING;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:295:13: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0=='\"') ) {
+ alt6=1;
+ }
+ else if ( (LA6_0=='\'') ) {
+ alt6=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("295:1: RULE_STRING : ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' );", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:295:15: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"'
+ {
+ match('\"');
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:295:19: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )*
+ loop4:
+ do {
+ int alt4=3;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0=='\\') ) {
+ alt4=1;
+ }
+ else if ( ((LA4_0>='\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='[')||(LA4_0>=']' && LA4_0<='\uFFFE')) ) {
+ alt4=2;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:295:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:295:65: ~ ( '\\\\' | '\"' )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:295:101: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\''
+ {
+ match('\'');
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:295:106: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )*
+ loop5:
+ do {
+ int alt5=3;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0=='\\') ) {
+ alt5=1;
+ }
+ else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=']' && LA5_0<='\uFFFE')) ) {
+ alt5=2;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:295:108: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ {
+ match('\\');
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:295:152: ~ ( '\\\\' | '\\'' )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop5;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+ break;
+
+ }
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_STRING
+
+ // $ANTLR start RULE_ML_COMMENT
+ public final void mRULE_ML_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_ML_COMMENT;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:297:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:297:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:297:24: ( options {greedy=false; } : . )*
+ loop7:
+ do {
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0=='*') ) {
+ int LA7_1 = input.LA(2);
+
+ if ( (LA7_1=='/') ) {
+ alt7=2;
+ }
+ else if ( ((LA7_1>='\u0000' && LA7_1<='.')||(LA7_1>='0' && LA7_1<='\uFFFE')) ) {
+ alt7=1;
+ }
+
+
+ }
+ else if ( ((LA7_0>='\u0000' && LA7_0<=')')||(LA7_0>='+' && LA7_0<='\uFFFE')) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:297:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match("*/");
+
+ channel=HIDDEN;
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_ML_COMMENT
+
+ // $ANTLR start RULE_SL_COMMENT
+ public final void mRULE_SL_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_SL_COMMENT;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:299:17: ( '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )? )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:299:19: '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:299:24: (~ ( '\\n' | '\\r' ) )*
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( ((LA8_0>='\u0000' && LA8_0<='\t')||(LA8_0>='\u000B' && LA8_0<='\f')||(LA8_0>='\u000E' && LA8_0<='\uFFFE')) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:299:24: ~ ( '\\n' | '\\r' )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop8;
+ }
+ } while (true);
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:299:38: ( ( '\\r' )? '\\n' )?
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0=='\n'||LA10_0=='\r') ) {
+ alt10=1;
+ }
+ switch (alt10) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:299:39: ( '\\r' )? '\\n'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:299:39: ( '\\r' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='\r') ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:299:39: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+ channel=HIDDEN;
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_SL_COMMENT
+
+ // $ANTLR start RULE_WS
+ public final void mRULE_WS() throws RecognitionException {
+ try {
+ int _type = RULE_WS;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:301:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:301:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:301:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ int cnt11=0;
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:
+ {
+ if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ if ( cnt11 >= 1 ) break loop11;
+ EarlyExitException eee =
+ new EarlyExitException(11, input);
+ throw eee;
+ }
+ cnt11++;
+ } while (true);
+
+ channel=HIDDEN;
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_WS
+
+ // $ANTLR start RULE_ANY_OTHER
+ public final void mRULE_ANY_OTHER() throws RecognitionException {
+ try {
+ int _type = RULE_ANY_OTHER;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:303:16: ( . )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:303:18: .
+ {
+ matchAny();
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_ANY_OTHER
+
+ public void mTokens() throws RecognitionException {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:8: ( T11 | T12 | T13 | T14 | T15 | T16 | T17 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=14;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0=='a') ) {
+ int LA12_1 = input.LA(2);
+
+ if ( (LA12_1=='b') ) {
+ int LA12_16 = input.LA(3);
+
+ if ( (LA12_16=='s') ) {
+ int LA12_29 = input.LA(4);
+
+ if ( (LA12_29=='t') ) {
+ int LA12_32 = input.LA(5);
+
+ if ( (LA12_32=='r') ) {
+ int LA12_35 = input.LA(6);
+
+ if ( (LA12_35=='a') ) {
+ int LA12_37 = input.LA(7);
+
+ if ( (LA12_37=='c') ) {
+ int LA12_38 = input.LA(8);
+
+ if ( (LA12_38=='t') ) {
+ int LA12_39 = input.LA(9);
+
+ if ( (LA12_39==' ') ) {
+ alt12=1;
+ }
+ else {
+ alt12=8;}
+ }
+ else {
+ alt12=8;}
+ }
+ else {
+ alt12=8;}
+ }
+ else {
+ alt12=8;}
+ }
+ else {
+ alt12=8;}
+ }
+ else {
+ alt12=8;}
+ }
+ else {
+ alt12=8;}
+ }
+ else {
+ alt12=8;}
+ }
+ else if ( (LA12_0=='e') ) {
+ int LA12_2 = input.LA(2);
+
+ if ( (LA12_2=='n') ) {
+ int LA12_18 = input.LA(3);
+
+ if ( (LA12_18=='d') ) {
+ int LA12_30 = input.LA(4);
+
+ if ( ((LA12_30>='0' && LA12_30<='9')||(LA12_30>='A' && LA12_30<='Z')||LA12_30=='_'||(LA12_30>='a' && LA12_30<='z')) ) {
+ alt12=8;
+ }
+ else {
+ alt12=2;}
+ }
+ else {
+ alt12=8;}
+ }
+ else {
+ alt12=8;}
+ }
+ else if ( (LA12_0=='(') ) {
+ alt12=3;
+ }
+ else if ( (LA12_0==')') ) {
+ alt12=4;
+ }
+ else if ( (LA12_0==';') ) {
+ alt12=5;
+ }
+ else if ( (LA12_0=='r') ) {
+ int LA12_6 = input.LA(2);
+
+ if ( (LA12_6=='u') ) {
+ int LA12_22 = input.LA(3);
+
+ if ( (LA12_22=='l') ) {
+ int LA12_31 = input.LA(4);
+
+ if ( (LA12_31=='e') ) {
+ int LA12_34 = input.LA(5);
+
+ if ( ((LA12_34>='0' && LA12_34<='9')||(LA12_34>='A' && LA12_34<='Z')||LA12_34=='_'||(LA12_34>='a' && LA12_34<='z')) ) {
+ alt12=8;
+ }
+ else {
+ alt12=6;}
+ }
+ else {
+ alt12=8;}
+ }
+ else {
+ alt12=8;}
+ }
+ else {
+ alt12=8;}
+ }
+ else if ( (LA12_0==':') ) {
+ alt12=7;
+ }
+ else if ( (LA12_0=='^') ) {
+ int LA12_8 = input.LA(2);
+
+ if ( ((LA12_8>='A' && LA12_8<='Z')||LA12_8=='_'||(LA12_8>='a' && LA12_8<='z')) ) {
+ alt12=8;
+ }
+ else {
+ alt12=14;}
+ }
+ else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='b' && LA12_0<='d')||(LA12_0>='f' && LA12_0<='q')||(LA12_0>='s' && LA12_0<='z')) ) {
+ alt12=8;
+ }
+ else if ( ((LA12_0>='0' && LA12_0<='9')) ) {
+ alt12=9;
+ }
+ else if ( (LA12_0=='\"') ) {
+ int LA12_11 = input.LA(2);
+
+ if ( ((LA12_11>='\u0000' && LA12_11<='\uFFFE')) ) {
+ alt12=10;
+ }
+ else {
+ alt12=14;}
+ }
+ else if ( (LA12_0=='\'') ) {
+ int LA12_12 = input.LA(2);
+
+ if ( ((LA12_12>='\u0000' && LA12_12<='\uFFFE')) ) {
+ alt12=10;
+ }
+ else {
+ alt12=14;}
+ }
+ else if ( (LA12_0=='/') ) {
+ switch ( input.LA(2) ) {
+ case '/':
+ {
+ alt12=12;
+ }
+ break;
+ case '*':
+ {
+ alt12=11;
+ }
+ break;
+ default:
+ alt12=14;}
+
+ }
+ else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {
+ alt12=13;
+ }
+ else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||LA12_0=='!'||(LA12_0>='#' && LA12_0<='&')||(LA12_0>='*' && LA12_0<='.')||(LA12_0>='<' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||(LA12_0>='{' && LA12_0<='\uFFFE')) ) {
+ alt12=14;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("1:1: Tokens : ( T11 | T12 | T13 | T14 | T15 | T16 | T17 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );", 12, 0, input);
+
+ throw nvae;
+ }
+ switch (alt12) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:10: T11
+ {
+ mT11();
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:14: T12
+ {
+ mT12();
+
+ }
+ break;
+ case 3 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:18: T13
+ {
+ mT13();
+
+ }
+ break;
+ case 4 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:22: T14
+ {
+ mT14();
+
+ }
+ break;
+ case 5 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:26: T15
+ {
+ mT15();
+
+ }
+ break;
+ case 6 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:30: T16
+ {
+ mT16();
+
+ }
+ break;
+ case 7 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:34: T17
+ {
+ mT17();
+
+ }
+ break;
+ case 8 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:38: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 9 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:46: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 10 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:55: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 11 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:67: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 12 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:83: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 13 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:99: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 14 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:1:107: RULE_ANY_OTHER
+ {
+ mRULE_ANY_OTHER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguageParser.java
new file mode 100644
index 0000000..2c9676a
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguageParser.java
@@ -0,0 +1,723 @@
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g 2008-12-02 18:42:28
+
+package org.eclipse.xtext.testlanguages.parser.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.xtext.parsetree.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class InternalContentAssistTestLanguageParser extends AbstractAntlrParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'abstract rules'", "'end'", "'('", "')'", "';'", "'rule'", "':'"
+ };
+ public static final int RULE_ML_COMMENT=7;
+ public static final int RULE_ID=4;
+ public static final int RULE_WS=9;
+ public static final int EOF=-1;
+ public static final int RULE_INT=5;
+ public static final int RULE_STRING=6;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_SL_COMMENT=8;
+
+ public InternalContentAssistTestLanguageParser(TokenStream input) {
+ super(input);
+ }
+
+
+ public String[] getTokenNames() { return tokenNames; }
+ public String getGrammarFileName() { return "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g"; }
+
+
+
+ public InternalContentAssistTestLanguageParser(TokenStream input, IAstFactory factory, Grammar g) {
+ this(input);
+ this.factory = factory;
+ grammar = g;
+ }
+
+ @Override
+ protected InputStream getTokenFile() {
+ ClassLoader classLoader = InternalContentAssistTestLanguageParser.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.tokens");
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Start";
+ }
+
+
+
+ // $ANTLR start entryRuleStart
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:62:1: entryRuleStart returns [EObject current=null] : iv_ruleStart= ruleStart EOF ;
+ public final EObject entryRuleStart() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleStart = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:62:47: (iv_ruleStart= ruleStart EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:63:2: iv_ruleStart= ruleStart EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleStart_in_entryRuleStart70);
+ iv_ruleStart=ruleStart();
+ _fsp--;
+
+ current =iv_ruleStart;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleStart80);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleStart
+
+
+ // $ANTLR start ruleStart
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:70:1: ruleStart returns [EObject current=null] : ( ( 'abstract rules' (lv_rules= ruleAbstractRule )+ ) 'end' ) ;
+ public final EObject ruleStart() throws RecognitionException {
+ EObject current = null;
+
+ EObject lv_rules = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:72:33: ( ( ( 'abstract rules' (lv_rules= ruleAbstractRule )+ ) 'end' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:73:1: ( ( 'abstract rules' (lv_rules= ruleAbstractRule )+ ) 'end' )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:73:1: ( ( 'abstract rules' (lv_rules= ruleAbstractRule )+ ) 'end' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:73:2: ( 'abstract rules' (lv_rules= ruleAbstractRule )+ ) 'end'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:73:2: ( 'abstract rules' (lv_rules= ruleAbstractRule )+ )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:73:3: 'abstract rules' (lv_rules= ruleAbstractRule )+
+ {
+ match(input,11,FOLLOW_11_in_ruleStart115);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:77:1: (lv_rules= ruleAbstractRule )+
+ int cnt1=0;
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==RULE_ID) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:80:6: lv_rules= ruleAbstractRule
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleAbstractRule_in_ruleStart149);
+ lv_rules=ruleAbstractRule();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("Start");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.add(current, "rules", lv_rules,null);
+
+
+ }
+ break;
+
+ default :
+ if ( cnt1 >= 1 ) break loop1;
+ EarlyExitException eee =
+ new EarlyExitException(1, input);
+ throw eee;
+ }
+ cnt1++;
+ } while (true);
+
+
+ }
+
+ match(input,12,FOLLOW_12_in_ruleStart164);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleStart
+
+
+ // $ANTLR start entryRuleAbstractRule
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:103:1: entryRuleAbstractRule returns [EObject current=null] : iv_ruleAbstractRule= ruleAbstractRule EOF ;
+ public final EObject entryRuleAbstractRule() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleAbstractRule = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:103:54: (iv_ruleAbstractRule= ruleAbstractRule EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:104:2: iv_ruleAbstractRule= ruleAbstractRule EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.1" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleAbstractRule_in_entryRuleAbstractRule199);
+ iv_ruleAbstractRule=ruleAbstractRule();
+ _fsp--;
+
+ current =iv_ruleAbstractRule;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleAbstractRule209);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleAbstractRule
+
+
+ // $ANTLR start ruleAbstractRule
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:111:1: ruleAbstractRule returns [EObject current=null] : (this_FirstAbstractRuleChild= ruleFirstAbstractRuleChild | this_SecondAbstractRuleChild= ruleSecondAbstractRuleChild ) ;
+ public final EObject ruleAbstractRule() throws RecognitionException {
+ EObject current = null;
+
+ EObject this_FirstAbstractRuleChild = null;
+
+ EObject this_SecondAbstractRuleChild = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:113:33: ( (this_FirstAbstractRuleChild= ruleFirstAbstractRuleChild | this_SecondAbstractRuleChild= ruleSecondAbstractRuleChild ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:114:1: (this_FirstAbstractRuleChild= ruleFirstAbstractRuleChild | this_SecondAbstractRuleChild= ruleSecondAbstractRuleChild )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:114:1: (this_FirstAbstractRuleChild= ruleFirstAbstractRuleChild | this_SecondAbstractRuleChild= ruleSecondAbstractRuleChild )
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0==RULE_ID) ) {
+ int LA2_1 = input.LA(2);
+
+ if ( (LA2_1==16) ) {
+ alt2=2;
+ }
+ else if ( (LA2_1==13) ) {
+ alt2=1;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("114:1: (this_FirstAbstractRuleChild= ruleFirstAbstractRuleChild | this_SecondAbstractRuleChild= ruleSecondAbstractRuleChild )", 2, 1, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("114:1: (this_FirstAbstractRuleChild= ruleFirstAbstractRuleChild | this_SecondAbstractRuleChild= ruleSecondAbstractRuleChild )", 2, 0, input);
+
+ throw nvae;
+ }
+ switch (alt2) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:115:5: this_FirstAbstractRuleChild= ruleFirstAbstractRuleChild
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.1/@alternatives/@groups.0" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleFirstAbstractRuleChild_in_ruleAbstractRule256);
+ this_FirstAbstractRuleChild=ruleFirstAbstractRuleChild();
+ _fsp--;
+
+
+ current = this_FirstAbstractRuleChild;
+ currentNode = currentNode.getParent();
+
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:125:5: this_SecondAbstractRuleChild= ruleSecondAbstractRuleChild
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.1/@alternatives/@groups.1" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleSecondAbstractRuleChild_in_ruleAbstractRule283);
+ this_SecondAbstractRuleChild=ruleSecondAbstractRuleChild();
+ _fsp--;
+
+
+ current = this_SecondAbstractRuleChild;
+ currentNode = currentNode.getParent();
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleAbstractRule
+
+
+ // $ANTLR start entryRuleFirstAbstractRuleChild
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:138:1: entryRuleFirstAbstractRuleChild returns [EObject current=null] : iv_ruleFirstAbstractRuleChild= ruleFirstAbstractRuleChild EOF ;
+ public final EObject entryRuleFirstAbstractRuleChild() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleFirstAbstractRuleChild = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:138:64: (iv_ruleFirstAbstractRuleChild= ruleFirstAbstractRuleChild EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:139:2: iv_ruleFirstAbstractRuleChild= ruleFirstAbstractRuleChild EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleFirstAbstractRuleChild_in_entryRuleFirstAbstractRuleChild317);
+ iv_ruleFirstAbstractRuleChild=ruleFirstAbstractRuleChild();
+ _fsp--;
+
+ current =iv_ruleFirstAbstractRuleChild;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleFirstAbstractRuleChild327);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleFirstAbstractRuleChild
+
+
+ // $ANTLR start ruleFirstAbstractRuleChild
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:146:1: ruleFirstAbstractRuleChild returns [EObject current=null] : ( ( ( ( (lv_name= RULE_ID ) '(' ) (lv_elements= ruleAbstractRule ) ) ')' ) ';' ) ;
+ public final EObject ruleFirstAbstractRuleChild() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name=null;
+ EObject lv_elements = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:148:33: ( ( ( ( ( (lv_name= RULE_ID ) '(' ) (lv_elements= ruleAbstractRule ) ) ')' ) ';' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:149:1: ( ( ( ( (lv_name= RULE_ID ) '(' ) (lv_elements= ruleAbstractRule ) ) ')' ) ';' )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:149:1: ( ( ( ( (lv_name= RULE_ID ) '(' ) (lv_elements= ruleAbstractRule ) ) ')' ) ';' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:149:2: ( ( ( (lv_name= RULE_ID ) '(' ) (lv_elements= ruleAbstractRule ) ) ')' ) ';'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:149:2: ( ( ( (lv_name= RULE_ID ) '(' ) (lv_elements= ruleAbstractRule ) ) ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:149:3: ( ( (lv_name= RULE_ID ) '(' ) (lv_elements= ruleAbstractRule ) ) ')'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:149:3: ( ( (lv_name= RULE_ID ) '(' ) (lv_elements= ruleAbstractRule ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:149:4: ( (lv_name= RULE_ID ) '(' ) (lv_elements= ruleAbstractRule )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:149:4: ( (lv_name= RULE_ID ) '(' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:149:5: (lv_name= RULE_ID ) '('
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:149:5: (lv_name= RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:151:6: lv_name= RULE_ID
+ {
+ lv_name=(Token)input.LT(1);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleFirstAbstractRuleChild376);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@terminal" /* xtext::RuleCall */, "name");
+
+
+ if (current==null) {
+ current = factory.create("FirstAbstractRuleChild");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.set(current, "name", lv_name,"ID");
+
+
+ }
+
+ match(input,13,FOLLOW_13_in_ruleFirstAbstractRuleChild396);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:169:2: (lv_elements= ruleAbstractRule )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:172:6: lv_elements= ruleAbstractRule
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleAbstractRule_in_ruleFirstAbstractRuleChild431);
+ lv_elements=ruleAbstractRule();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("FirstAbstractRuleChild");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.add(current, "elements", lv_elements,null);
+
+
+ }
+
+
+ }
+
+ match(input,14,FOLLOW_14_in_ruleFirstAbstractRuleChild445);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ match(input,15,FOLLOW_15_in_ruleFirstAbstractRuleChild455);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleFirstAbstractRuleChild
+
+
+ // $ANTLR start entryRuleSecondAbstractRuleChild
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:199:1: entryRuleSecondAbstractRuleChild returns [EObject current=null] : iv_ruleSecondAbstractRuleChild= ruleSecondAbstractRuleChild EOF ;
+ public final EObject entryRuleSecondAbstractRuleChild() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleSecondAbstractRuleChild = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:199:65: (iv_ruleSecondAbstractRuleChild= ruleSecondAbstractRuleChild EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:200:2: iv_ruleSecondAbstractRuleChild= ruleSecondAbstractRuleChild EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleSecondAbstractRuleChild_in_entryRuleSecondAbstractRuleChild490);
+ iv_ruleSecondAbstractRuleChild=ruleSecondAbstractRuleChild();
+ _fsp--;
+
+ current =iv_ruleSecondAbstractRuleChild;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleSecondAbstractRuleChild500);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleSecondAbstractRuleChild
+
+
+ // $ANTLR start ruleSecondAbstractRuleChild
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:207:1: ruleSecondAbstractRuleChild returns [EObject current=null] : ( ( ( ( (lv_name= RULE_ID ) 'rule' ) ':' ) (lv_rule= ruleAbstractRuleCall ) ) ';' ) ;
+ public final EObject ruleSecondAbstractRuleChild() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name=null;
+ EObject lv_rule = null;
+
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:209:33: ( ( ( ( ( (lv_name= RULE_ID ) 'rule' ) ':' ) (lv_rule= ruleAbstractRuleCall ) ) ';' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:210:1: ( ( ( ( (lv_name= RULE_ID ) 'rule' ) ':' ) (lv_rule= ruleAbstractRuleCall ) ) ';' )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:210:1: ( ( ( ( (lv_name= RULE_ID ) 'rule' ) ':' ) (lv_rule= ruleAbstractRuleCall ) ) ';' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:210:2: ( ( ( (lv_name= RULE_ID ) 'rule' ) ':' ) (lv_rule= ruleAbstractRuleCall ) ) ';'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:210:2: ( ( ( (lv_name= RULE_ID ) 'rule' ) ':' ) (lv_rule= ruleAbstractRuleCall ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:210:3: ( ( (lv_name= RULE_ID ) 'rule' ) ':' ) (lv_rule= ruleAbstractRuleCall )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:210:3: ( ( (lv_name= RULE_ID ) 'rule' ) ':' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:210:4: ( (lv_name= RULE_ID ) 'rule' ) ':'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:210:4: ( (lv_name= RULE_ID ) 'rule' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:210:5: (lv_name= RULE_ID ) 'rule'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:210:5: (lv_name= RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:212:6: lv_name= RULE_ID
+ {
+ lv_name=(Token)input.LT(1);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSecondAbstractRuleChild549);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@terminal" /* xtext::RuleCall */, "name");
+
+
+ if (current==null) {
+ current = factory.create("SecondAbstractRuleChild");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.set(current, "name", lv_name,"ID");
+
+
+ }
+
+ match(input,16,FOLLOW_16_in_ruleSecondAbstractRuleChild569);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ match(input,17,FOLLOW_17_in_ruleSecondAbstractRuleChild579);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:234:2: (lv_rule= ruleAbstractRuleCall )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:237:6: lv_rule= ruleAbstractRuleCall
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleAbstractRuleCall_in_ruleSecondAbstractRuleChild614);
+ lv_rule=ruleAbstractRuleCall();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("SecondAbstractRuleChild");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.set(current, "rule", lv_rule,null);
+
+
+ }
+
+
+ }
+
+ match(input,15,FOLLOW_15_in_ruleSecondAbstractRuleChild628);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleSecondAbstractRuleChild
+
+
+ // $ANTLR start entryRuleAbstractRuleCall
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:260:1: entryRuleAbstractRuleCall returns [EObject current=null] : iv_ruleAbstractRuleCall= ruleAbstractRuleCall EOF ;
+ public final EObject entryRuleAbstractRuleCall() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleAbstractRuleCall = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:260:58: (iv_ruleAbstractRuleCall= ruleAbstractRuleCall EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:261:2: iv_ruleAbstractRuleCall= ruleAbstractRuleCall EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.4" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleAbstractRuleCall_in_entryRuleAbstractRuleCall663);
+ iv_ruleAbstractRuleCall=ruleAbstractRuleCall();
+ _fsp--;
+
+ current =iv_ruleAbstractRuleCall;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleAbstractRuleCall673);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleAbstractRuleCall
+
+
+ // $ANTLR start ruleAbstractRuleCall
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:268:1: ruleAbstractRuleCall returns [EObject current=null] : ( ( RULE_ID ) ) ;
+ public final EObject ruleAbstractRuleCall() throws RecognitionException {
+ EObject current = null;
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:270:33: ( ( ( RULE_ID ) ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:271:1: ( ( RULE_ID ) )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:271:1: ( ( RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:274:3: ( RULE_ID )
+ {
+
+ if (current==null) {
+ current = factory.create("AbstractRuleCall");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:280:1: ( RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g:281:2: RULE_ID
+ {
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleAbstractRuleCall721);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.4/@alternatives/@terminal" /* xtext::CrossReference */, "rule");
+
+
+ }
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleAbstractRuleCall
+
+
+
+
+ public static final BitSet FOLLOW_ruleStart_in_entryRuleStart70 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleStart80 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_11_in_ruleStart115 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ruleAbstractRule_in_ruleStart149 = new BitSet(new long[]{0x0000000000001010L});
+ public static final BitSet FOLLOW_12_in_ruleStart164 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleAbstractRule_in_entryRuleAbstractRule199 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleAbstractRule209 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleFirstAbstractRuleChild_in_ruleAbstractRule256 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleSecondAbstractRuleChild_in_ruleAbstractRule283 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleFirstAbstractRuleChild_in_entryRuleFirstAbstractRuleChild317 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleFirstAbstractRuleChild327 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleFirstAbstractRuleChild376 = new BitSet(new long[]{0x0000000000002000L});
+ public static final BitSet FOLLOW_13_in_ruleFirstAbstractRuleChild396 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ruleAbstractRule_in_ruleFirstAbstractRuleChild431 = new BitSet(new long[]{0x0000000000004000L});
+ public static final BitSet FOLLOW_14_in_ruleFirstAbstractRuleChild445 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_15_in_ruleFirstAbstractRuleChild455 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleSecondAbstractRuleChild_in_entryRuleSecondAbstractRuleChild490 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleSecondAbstractRuleChild500 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleSecondAbstractRuleChild549 = new BitSet(new long[]{0x0000000000010000L});
+ public static final BitSet FOLLOW_16_in_ruleSecondAbstractRuleChild569 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_17_in_ruleSecondAbstractRuleChild579 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ruleAbstractRuleCall_in_ruleSecondAbstractRuleChild614 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_15_in_ruleSecondAbstractRuleChild628 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleAbstractRuleCall_in_entryRuleAbstractRuleCall663 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleAbstractRuleCall673 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleAbstractRuleCall721 = new BitSet(new long[]{0x0000000000000002L});
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage__.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage__.g
new file mode 100644
index 0000000..0a5825d
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage__.g
@@ -0,0 +1,39 @@
+lexer grammar InternalContentAssistTestLanguage;
+@header {
+package org.eclipse.xtext.testlanguages.parser.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+T11 : 'abstract rules' ;
+T12 : 'end' ;
+T13 : '(' ;
+T14 : ')' ;
+T15 : ';' ;
+T16 : 'rule' ;
+T17 : ':' ;
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g" 291
+RULE_ID : ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g" 293
+RULE_INT : ('0'..'9')+;
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g" 295
+RULE_STRING : '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'"') )* '"' | '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\'';
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g" 297
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )* '*/' {$channel=HIDDEN;};
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g" 299
+RULE_SL_COMMENT : '//' ~('\n'|'\r')* ('\r'? '\n')? {$channel=HIDDEN;};
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g" 301
+RULE_WS : (' '|'\t'|'\r'|'\n')+ {$channel=HIDDEN;};
+
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalContentAssistTestLanguage.g" 303
+RULE_ANY_OTHER : .;
+
+
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguageLexer.java
index e8f05c0..bb90d4d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguage.g 2008-11-28 10:59:10
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguage.g 2008-12-02 18:42:26
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguageParser.java
index d607586..d0966e9 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguage.g 2008-11-28 10:59:09
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalFowlerDslTestLanguage.g 2008-12-02 18:42:25
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageLexer.java
index ed24ef1..b436c7f 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguage.g 2008-11-28 10:59:06
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguage.g 2008-12-02 18:42:22
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageParser.java
index 365bc1a..f6ae473 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguage.g 2008-11-28 10:59:06
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguage.g 2008-12-02 18:42:22
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageLexer.java
index d0bd3c7..192fe09 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguage.g 2008-11-28 10:59:09
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguage.g 2008-12-02 18:42:25
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageParser.java
index 556fed8..9270375 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguage.g 2008-11-28 10:59:09
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguage.g 2008-12-02 18:42:24
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageLexer.java
index f264d42..227ce64 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguage.g 2008-11-28 10:59:08
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguage.g 2008-12-02 18:42:23
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageParser.java
index c7214af..6e6d4aa 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguage.g 2008-11-28 10:59:07
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguage.g 2008-12-02 18:42:23
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageLexer.java
index e4735da..871dc21 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g 2008-11-28 17:29:28
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g 2008-12-02 18:42:27
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageParser.java
index 337c848..5103f86 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g 2008-11-28 17:29:28
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalPartialParserTestLanguage.g 2008-12-02 18:42:27
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarLexer.java
index 6db0382..2ef3a2c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g 2008-11-28 10:59:08
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g 2008-12-02 18:42:24
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarParser.java
index fca0ef3..92bfb84 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g 2008-11-28 10:59:08
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g 2008-12-02 18:42:24
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsLexer.java
index baacfbd..305f084 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressions.g 2008-11-28 10:59:07
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressions.g 2008-12-02 18:42:23
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsParser.java
index 8b672dd..7ab287d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressions.g 2008-11-28 10:59:07
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressions.g 2008-12-02 18:42:23
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageLexer.java
index 787d4b4..fbeebcb 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguage.g 2008-11-28 10:59:04
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguage.g 2008-12-02 18:42:20
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageParser.java
index b65327e..7052785 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguage.g 2008-11-28 10:59:04
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguage.g 2008-12-02 18:42:20
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguageLexer.java
index 2e4ee38..da5dfe9 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguage.g 2008-11-28 10:59:10
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguage.g 2008-12-02 18:42:26
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguageParser.java
index 5b92675..7469681 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguage.g 2008-11-28 10:59:10
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTreeTestLanguage.g 2008-12-02 18:42:26
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/ContentAssistTestLanguageParseTreeConstructor.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/ContentAssistTestLanguageParseTreeConstructor.java
new file mode 100644
index 0000000..3ef2084
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/ContentAssistTestLanguageParseTreeConstructor.java
@@ -0,0 +1,678 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages.parsetree.reconstr;
+
+//import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parsetree.reconstr.*;
+import org.eclipse.xtext.parsetree.reconstr.impl.*;
+import org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor.AbstractToken.Solution;
+
+
+public class ContentAssistTestLanguageParseTreeConstructor extends AbstractParseTreeConstructor {
+
+ public IAbstractToken serialize(EObject object) {
+ Solution t = internalSerialize(object);
+ if(t == null) throw new XtextSerializationException(getDescr(object), "No rule found for serialization");
+ return t.getPredecessor();
+ }
+
+ protected Solution internalSerialize(EObject obj) {
+ IInstanceDescription inst = getDescr(obj);
+ Solution s;
+ if(inst.isInstanceOf("Start") && (s = new Start_Group(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("AbstractRule") && (s = new AbstractRule_Alternatives(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("FirstAbstractRuleChild") && (s = new FirstAbstractRuleChild_Group(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("SecondAbstractRuleChild") && (s = new SecondAbstractRuleChild_Group(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("AbstractRuleCall") && (s = new AbstractRuleCall_Assignment_rule(inst, null).firstSolution()) != null) return s;
+ return null;
+ }
+
+/************ begin Rule Start ****************
+ *
+ * Start : 'abstract rules' ( rules += AbstractRule ) + 'end' ;
+ *
+ **/
+
+
+// 'abstract rules' ( rules += AbstractRule ) + 'end'
+protected class Start_Group extends GroupToken {
+
+ public Start_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Start_1_Keyword_end(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Start_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'abstract rules' ( rules += AbstractRule ) +
+protected class Start_0_Group extends GroupToken {
+
+ public Start_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Start_0_1_Assignment_rules(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Start_0_0_Keyword_abstractrules(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'abstract rules'
+protected class Start_0_0_Keyword_abstractrules extends KeywordToken {
+
+ public Start_0_0_Keyword_abstractrules(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0");
+ }
+}
+
+// ( rules += AbstractRule ) +
+protected class Start_0_1_Assignment_rules extends AssignmentToken {
+
+ public Start_0_1_Assignment_rules(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("rules",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("rules");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("AbstractRule")) {
+ Solution s = new AbstractRule_Alternatives(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
+// 'end'
+protected class Start_1_Keyword_end extends KeywordToken {
+
+ public Start_1_Keyword_end(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0/@alternatives/@abstractTokens.1");
+ }
+}
+
+
+/************ end Rule Start ****************/
+
+/************ begin Rule AbstractRule ****************
+ *
+ * AbstractRule : FirstAbstractRuleChild | SecondAbstractRuleChild ;
+ *
+ **/
+
+
+// FirstAbstractRuleChild | SecondAbstractRuleChild
+protected class AbstractRule_Alternatives extends AlternativesToken {
+
+ public AbstractRule_Alternatives(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Alternatives getGrammarElement() {
+ return (Alternatives)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.1/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ AbstractToken t = (first) ? new AbstractRule_1_RuleCall_SecondAbstractRuleChild(current, this) : new AbstractRule_0_RuleCall_FirstAbstractRuleChild(current, this);
+ Solution s = t.firstSolution();
+ if(s == null && activateNextSolution()) s = createSolution();
+ if(s == null) return null;
+ last = s.getPredecessor();
+ return s;
+ }
+}
+
+// FirstAbstractRuleChild
+protected class AbstractRule_0_RuleCall_FirstAbstractRuleChild extends RuleCallToken {
+
+ public AbstractRule_0_RuleCall_FirstAbstractRuleChild(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public RuleCall getGrammarElement() {
+ return (RuleCall)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.1/@alternatives/@groups.0");
+ }
+
+ protected Solution createSolution() {
+ if(checkForRecursion(FirstAbstractRuleChild_Group.class, current)) return null;
+ if(!current.isInstanceOf("FirstAbstractRuleChild")) return null;
+ return new FirstAbstractRuleChild_Group(current, this).firstSolution();
+ }
+}
+
+// SecondAbstractRuleChild
+protected class AbstractRule_1_RuleCall_SecondAbstractRuleChild extends RuleCallToken {
+
+ public AbstractRule_1_RuleCall_SecondAbstractRuleChild(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public RuleCall getGrammarElement() {
+ return (RuleCall)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.1/@alternatives/@groups.1");
+ }
+
+ protected Solution createSolution() {
+ if(checkForRecursion(SecondAbstractRuleChild_Group.class, current)) return null;
+ if(!current.isInstanceOf("SecondAbstractRuleChild")) return null;
+ return new SecondAbstractRuleChild_Group(current, this).firstSolution();
+ }
+}
+
+
+/************ end Rule AbstractRule ****************/
+
+/************ begin Rule FirstAbstractRuleChild ****************
+ *
+ * FirstAbstractRuleChild : name = ID '(' elements += AbstractRule ')' ';' ;
+ *
+ **/
+
+
+// name = ID '(' elements += AbstractRule ')' ';'
+protected class FirstAbstractRuleChild_Group extends GroupToken {
+
+ public FirstAbstractRuleChild_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new FirstAbstractRuleChild_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new FirstAbstractRuleChild_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// name = ID '(' elements += AbstractRule ')'
+protected class FirstAbstractRuleChild_0_Group extends GroupToken {
+
+ public FirstAbstractRuleChild_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new FirstAbstractRuleChild_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new FirstAbstractRuleChild_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// name = ID '(' elements += AbstractRule
+protected class FirstAbstractRuleChild_0_0_Group extends GroupToken {
+
+ public FirstAbstractRuleChild_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new FirstAbstractRuleChild_0_0_1_Assignment_elements(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new FirstAbstractRuleChild_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// name = ID '('
+protected class FirstAbstractRuleChild_0_0_0_Group extends GroupToken {
+
+ public FirstAbstractRuleChild_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new FirstAbstractRuleChild_0_0_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new FirstAbstractRuleChild_0_0_0_0_Assignment_name(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// name = ID
+protected class FirstAbstractRuleChild_0_0_0_0_Assignment_name extends AssignmentToken {
+
+ public FirstAbstractRuleChild_0_0_0_0_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("name",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("name");
+ if(true) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
+ type = AssignmentType.LRC;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@terminal");
+ return new Solution(obj);
+ }
+ return null;
+ }
+}
+
+// '('
+protected class FirstAbstractRuleChild_0_0_0_1_Keyword extends KeywordToken {
+
+ public FirstAbstractRuleChild_0_0_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// elements += AbstractRule
+protected class FirstAbstractRuleChild_0_0_1_Assignment_elements extends AssignmentToken {
+
+ public FirstAbstractRuleChild_0_0_1_Assignment_elements(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("elements",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("elements");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("AbstractRule")) {
+ Solution s = new AbstractRule_Alternatives(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
+// ')'
+protected class FirstAbstractRuleChild_0_1_Keyword extends KeywordToken {
+
+ public FirstAbstractRuleChild_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// ';'
+protected class FirstAbstractRuleChild_1_Keyword extends KeywordToken {
+
+ public FirstAbstractRuleChild_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2/@alternatives/@abstractTokens.1");
+ }
+}
+
+
+/************ end Rule FirstAbstractRuleChild ****************/
+
+/************ begin Rule SecondAbstractRuleChild ****************
+ *
+ * SecondAbstractRuleChild : name = ID 'rule' ':' rule = AbstractRuleCall ';' ;
+ *
+ **/
+
+
+// name = ID 'rule' ':' rule = AbstractRuleCall ';'
+protected class SecondAbstractRuleChild_Group extends GroupToken {
+
+ public SecondAbstractRuleChild_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new SecondAbstractRuleChild_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new SecondAbstractRuleChild_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// name = ID 'rule' ':' rule = AbstractRuleCall
+protected class SecondAbstractRuleChild_0_Group extends GroupToken {
+
+ public SecondAbstractRuleChild_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new SecondAbstractRuleChild_0_1_Assignment_rule(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new SecondAbstractRuleChild_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// name = ID 'rule' ':'
+protected class SecondAbstractRuleChild_0_0_Group extends GroupToken {
+
+ public SecondAbstractRuleChild_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new SecondAbstractRuleChild_0_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new SecondAbstractRuleChild_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// name = ID 'rule'
+protected class SecondAbstractRuleChild_0_0_0_Group extends GroupToken {
+
+ public SecondAbstractRuleChild_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new SecondAbstractRuleChild_0_0_0_1_Keyword_rule(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new SecondAbstractRuleChild_0_0_0_0_Assignment_name(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// name = ID
+protected class SecondAbstractRuleChild_0_0_0_0_Assignment_name extends AssignmentToken {
+
+ public SecondAbstractRuleChild_0_0_0_0_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("name",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("name");
+ if(true) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
+ type = AssignmentType.LRC;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@terminal");
+ return new Solution(obj);
+ }
+ return null;
+ }
+}
+
+// 'rule'
+protected class SecondAbstractRuleChild_0_0_0_1_Keyword_rule extends KeywordToken {
+
+ public SecondAbstractRuleChild_0_0_0_1_Keyword_rule(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// ':'
+protected class SecondAbstractRuleChild_0_0_1_Keyword extends KeywordToken {
+
+ public SecondAbstractRuleChild_0_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// rule = AbstractRuleCall
+protected class SecondAbstractRuleChild_0_1_Assignment_rule extends AssignmentToken {
+
+ public SecondAbstractRuleChild_0_1_Assignment_rule(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("rule",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("rule");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("AbstractRuleCall")) {
+ Solution s = new AbstractRuleCall_Assignment_rule(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
+// ';'
+protected class SecondAbstractRuleChild_1_Keyword extends KeywordToken {
+
+ public SecondAbstractRuleChild_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3/@alternatives/@abstractTokens.1");
+ }
+}
+
+
+/************ end Rule SecondAbstractRuleChild ****************/
+
+/************ begin Rule AbstractRuleCall ****************
+ *
+ * AbstractRuleCall : rule = [ AbstractRule ] ;
+ *
+ **/
+
+
+// rule = [ AbstractRule ]
+protected class AbstractRuleCall_Assignment_rule extends AssignmentToken {
+
+ public AbstractRuleCall_Assignment_rule(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.4/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("rule",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("rule");
+ if(value instanceof EObject) { // xtext::CrossReference
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("AbstractRule")) {
+ type = AssignmentType.CR;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.4/@alternatives/@terminal");
+ return new Solution(obj);
+ }
+ }
+ return null;
+ }
+}
+
+/************ end Rule AbstractRuleCall ****************/
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageGrammarAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageGrammarAccess.java
new file mode 100644
index 0000000..3635013
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageGrammarAccess.java
@@ -0,0 +1,77 @@
+/*
+Generated with Xtext
+*/
+
+package org.eclipse.xtext.testlanguages.services;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.BaseEPackageAccess;
+
+public class ContentAssistTestLanguageGrammarAccess extends BaseEPackageAccess implements IGrammarAccess {
+
+ private static final String CONTENTASSISTTESTLANGUAGE_GRAMMAR_CP_URI = "classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi";
+ private static Grammar GRAMMAR = null;
+
+ @SuppressWarnings("unused")
+ public synchronized Grammar getGrammar() {
+ if (GRAMMAR==null) {
+ // assert the XtextPackage implementation is loaded
+ XtextPackage xtextPackage = XtextPackage.eINSTANCE;
+ GRAMMAR = (Grammar) loadGrammarFile(ContentAssistTestLanguageGrammarAccess.class.getClassLoader(),CONTENTASSISTTESTLANGUAGE_GRAMMAR_CP_URI);
+ }
+ return GRAMMAR;
+ }
+
+
+ public ParserRule pr_Start() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.0"),true);
+ }
+
+ public ParserRule pr_AbstractRule() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.1"),true);
+ }
+
+ public ParserRule pr_FirstAbstractRuleChild() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.2"),true);
+ }
+
+ public ParserRule pr_SecondAbstractRuleChild() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.3"),true);
+ }
+
+ public ParserRule pr_AbstractRuleCall() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xmi#//@rules.4"),true);
+ }
+
+
+ public LexerRule lr_ID() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"),true);
+ }
+
+ public LexerRule lr_INT() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.1"),true);
+ }
+
+ public LexerRule lr_STRING() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"),true);
+ }
+
+ public LexerRule lr_ML_COMMENT() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.3"),true);
+ }
+
+ public LexerRule lr_SL_COMMENT() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.4"),true);
+ }
+
+ public LexerRule lr_WS() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.5"),true);
+ }
+
+ public LexerRule lr_ANY_OTHER() {
+ return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.6"),true);
+ }
+
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageMetamodelAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageMetamodelAccess.java
new file mode 100644
index 0000000..26a3231
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageMetamodelAccess.java
@@ -0,0 +1,51 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages.services;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.IMetamodelAccess;
+import org.eclipse.xtext.parser.BaseEPackageAccess;
+
+public class ContentAssistTestLanguageMetamodelAccess extends BaseEPackageAccess implements IMetamodelAccess {
+
+{
+
+ if (!EPackage.Registry.INSTANCE.containsKey(CONTENTASSISTTESTLANGUAGE_NS_URI))
+ EPackage.Registry.INSTANCE.put(CONTENTASSISTTESTLANGUAGE_NS_URI, loadEcoreFile(getClass().getClassLoader(), "classpath:/org/eclipse/xtext/testlanguages/contentAssistTestLanguage.ecore"));
+
+}
+
+ private EPackage[] generated = new EPackage[] {
+
+ getContentAssistTestLanguageEPackage()
+
+ };
+
+ public EPackage[] getGeneratedEPackages() {
+ return generated;
+ }
+
+ private EPackage[] referenced = new EPackage[] {
+
+ };
+ public EPackage[] getReferencedEPackages() {
+ return referenced;
+ }
+
+ private EPackage[] all = new EPackage[] {
+ getContentAssistTestLanguageEPackage()
+ };
+
+ public EPackage[] getAllEPackages() {
+ return all;
+ }
+
+
+ protected static final String CONTENTASSISTTESTLANGUAGE_NS_URI = "http://www.eclipse.org/2008/xtext/tests/ContentAssist";
+
+ protected EPackage getContentAssistTestLanguageEPackage() {
+ return EPackage.Registry.INSTANCE.getEPackage(CONTENTASSISTTESTLANGUAGE_NS_URI);
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageResourceFactory.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageResourceFactory.java
new file mode 100644
index 0000000..29e8ecc
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ContentAssistTestLanguageResourceFactory.java
@@ -0,0 +1,28 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.testlanguages.services;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xtext.resource.IResourceFactory;
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.service.ServiceRegistry;
+import org.eclipse.xtext.service.ServiceScopeFactory;
+
+public class ContentAssistTestLanguageResourceFactory implements IResourceFactory {
+
+ public String[] getModelFileExtensions() {
+ return new String[] { "contentassisttestlanguage" };
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.resource.Resource.Factory#createResource(org.eclipse.emf.common.util.URI)
+ */
+ public Resource createResource(URI uri) {
+ XtextResource resource = new XtextResource(uri);
+ ServiceRegistry.injectServices(ServiceScopeFactory.get("org.eclipse.xtext.testlanguages.ContentAssistTestLanguage"), resource);
+ return resource;
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/Bug250313.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/Bug250313.xmi
index 5c9a86c..db79801 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/Bug250313.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/Bug250313.xmi
@@ -1,21 +1,25 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="bug250313" nsURI="http://org.eclipse.xtext.valueconverter.Bug250313"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>valueconverter</idElements>
<idElements>Bug250313</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="bug250313" nsURI="http://org.eclipse.xtext.valueconverter.Bug250313"/>
<rules xsi:type="xtext:ParserRule" name="Ref2">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="#2"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="ref2">
+ <abstractTokens xsi:type="xtext:Assignment" feature="ref2" operator="=">
<terminal xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Alternatives">
<groups xsi:type="xtext:Keyword" value="mykeyword1"/>
- <groups xsi:type="xtext:RuleCall" name="STRING"/>
+ <groups xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.2"/>
+ </groups>
+ </groups>
+ <groups xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
</groups>
- <groups xsi:type="xtext:RuleCall" name="ID"/>
</terminal>
</abstractTokens>
</alternatives>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Lexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Lexer.java
index a69bee0..a1436f3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Lexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Lexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313.g 2008-11-28 10:59:09
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313.g 2008-12-02 18:42:25
package org.eclipse.xtext.valueconverter.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Parser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Parser.java
index a60c7c0..be2c2af 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Parser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Parser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313.g 2008-11-28 10:59:09
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313.g 2008-12-02 18:42:25
package org.eclipse.xtext.valueconverter.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java
index c851d6f..c41cec5 100755
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java
@@ -22,6 +22,7 @@ import org.eclipse.xtext.parsetree.reconstr.ComplexReconstrTest;
import org.eclipse.xtext.parsetree.reconstr.SimpleReconstrTest;
import org.eclipse.xtext.resource.XtextResourceSet;
import org.eclipse.xtext.testlanguages.ActionTestLanguage;
+import org.eclipse.xtext.testlanguages.ContentAssistTestLanguage;
import org.eclipse.xtext.testlanguages.FowlerDslTestLanguage;
import org.eclipse.xtext.testlanguages.LexerLanguage;
import org.eclipse.xtext.testlanguages.LookaheadLanguage;
@@ -43,12 +44,18 @@ public class GenerateAllTestGrammars {
private static Logger log = Logger.getLogger(GenerateAllTestGrammars.class);
public final static Class<?>[] testclasses = new Class[] {
- LangA.class, AbstractTestLanguage.class,
- ConcreteTestLanguage.class, XtextGrammarTest.class, MetamodelRefTest.class, DummyLanguage.class,
- TestLanguage.class, SimpleReconstrTest.class, ComplexReconstrTest.class, LexerLanguage.class,
+ LangA.class,
+ AbstractTestLanguage.class,
+ ConcreteTestLanguage.class,
+ XtextGrammarTest.class,
+ MetamodelRefTest.class,
+ DummyLanguage.class,
+ TestLanguage.class,
+ SimpleReconstrTest.class, ComplexReconstrTest.class, LexerLanguage.class,
SimpleExpressions.class, ActionTestLanguage.class, OptionalEmptyLanguage.class, ReferenceGrammar.class,
LookaheadLanguage.class, Bug250313.class, FowlerDslTestLanguage.class, TreeTestLanguage.class, ImportUriTestLanguage.class,
- PartialParserTestLanguage.class };
+ PartialParserTestLanguage.class, ContentAssistTestLanguage.class
+ };
public static void main(String[] args) throws Exception {
try {
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.java
index fdfda97..c164f26 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.java
@@ -22,7 +22,7 @@ public class MetamodelRefTest extends AbstractGeneratorTest {
}
public void testStuff() throws Exception {
- Object parse = getModel("foo 'bar'");
+ Object parse = getModel("foo bar");
assertWithXtend("'SimpleTest::Foo'", "metaType.name", parse);
assertWithXtend("'xtext::RuleCall'", "nameRefs.first().metaType.name", parse);
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xtext
index d80d308..7f504e8 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTest.xtext
@@ -15,4 +15,7 @@ Foo :
name=ID (nameRefs+=NameRef)*;
NameRef returns xtext::RuleCall :
- name=STRING; \ No newline at end of file
+ rule=[MyRule];
+
+MyRule returns xtext::ParserRule :
+ name=ID; \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MultiGenMMTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MultiGenMMTest.java
index 996391a..90eddcb 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MultiGenMMTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MultiGenMMTest.java
@@ -21,7 +21,7 @@ public class MultiGenMMTest extends AbstractGeneratorTest {
}
public void testStuff() throws Exception {
- Object parse = getModel("foo 'bar'");
+ Object parse = getModel("foo bar");
assertWithXtend("'SimpleTest::Foo'", "metaType.name", parse);
assertWithXtend("'xtext::RuleCall'", "nameRefs.first().metaType.name", parse);
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParsingPointerTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParsingPointerTest.java
index 5993733..bb441b5 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParsingPointerTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/PartialParsingPointerTest.java
@@ -36,22 +36,22 @@ public class PartialParsingPointerTest extends AbstractPartialParserTest {
PartialParsingPointers parsingPointers;
parsingPointers = calculatePartialParsingPointers(model, 1, 1);
- checkParseRegionPointers(parsingPointers, "(a+b+c)", "Parens", "Parens", "Op", "Op", "values");
+ checkParseRegionPointers(parsingPointers, "(a+b+c)", "RuleCallImpl", "Parens", "Op", "Op", "values");
parsingPointers = calculatePartialParsingPointers(model, 3, 1);
- checkParseRegionPointers(parsingPointers, "b", "Multiplication", "Multiplication", "Atom", "Op", "values");
+ checkParseRegionPointers(parsingPointers, "b", "RuleCallImpl", "Multiplication", "Atom", "Op", "values");
parsingPointers = calculatePartialParsingPointers(model, 5, 2);
- checkParseRegionPointers(parsingPointers, "(a+b+c)", "Parens", "Parens", "Op", "Op", "values");
+ checkParseRegionPointers(parsingPointers, "(a+b+c)", "RuleCallImpl", "Parens", "Op", "Op", "values");
parsingPointers = calculatePartialParsingPointers(model, 6, 1);
- checkParseRegionPointers(parsingPointers, "(a+b+c)", "Parens", "Parens", "Op", "Op", "values");
+ checkParseRegionPointers(parsingPointers, "(a+b+c)", "RuleCallImpl", "Parens", "Op", "Op", "values");
parsingPointers = calculatePartialParsingPointers(model, 8, 2);
- checkParseRegionPointers(parsingPointers, "(c/d)", "Term", "Term", "Op", "Op", "values");
+ checkParseRegionPointers(parsingPointers, "(c/d)", "RuleCallImpl", "Term", "Op", "Op", "values");
parsingPointers = calculatePartialParsingPointers(model, 9, 2);
- checkParseRegionPointers(parsingPointers, "(c/d)", "Parens", "Parens", "Op", "Op", "values");
+ checkParseRegionPointers(parsingPointers, "(c/d)", "RuleCallImpl", "Parens", "Op", "Op", "values");
model = "a b";
parsingPointers = calculatePartialParsingPointers(model, 1, 1);
@@ -68,29 +68,29 @@ public class PartialParsingPointerTest extends AbstractPartialParserTest {
checkParseRegionPointers(parsingPointers, model, "Entry", "Entry", "Entry", null, null);
}
else if (i < 5) {
- checkParseRegionPointers(parsingPointers, "bar a", "LookAhead0", "LookAhead0", "LookAhead0", "Entry",
+ checkParseRegionPointers(parsingPointers, "bar a", "RuleCallImpl", "LookAhead0", "LookAhead0", "Entry",
"contents");
}
else if (i < 9) {
checkParseRegionPointers(parsingPointers, model, "Entry", "Entry", "Entry", null, null);
}
else if (i < 15) {
- checkParseRegionPointers(parsingPointers, " foo bar c b d", "Alts", "Alts", "LookAhead1", "Entry",
+ checkParseRegionPointers(parsingPointers, " foo bar c b d", "RuleCallImpl", "Alts", "LookAhead1", "Entry",
"contents");
}
else if (i < 19) {
- checkParseRegionPointers(parsingPointers, " foo bar c b d", "LookAhead1", "LookAhead1", "LookAhead1",
+ checkParseRegionPointers(parsingPointers, " foo bar c b d", "RuleCallImpl", "LookAhead1", "LookAhead1",
"Entry", "contents");
}
else if (i < 23) {
checkParseRegionPointers(parsingPointers, model, "Entry", "Entry", "Entry", null, null);
}
else if (i < 29) {
- checkParseRegionPointers(parsingPointers, " foo bar b c", "Alts", "Alts", "LookAhead3", "Entry",
+ checkParseRegionPointers(parsingPointers, " foo bar b c", "RuleCallImpl", "Alts", "LookAhead3", "Entry",
"contents");
}
else {
- checkParseRegionPointers(parsingPointers, " foo bar b c", "LookAhead3", "LookAhead3", "LookAhead3", "Entry",
+ checkParseRegionPointers(parsingPointers, " foo bar b c", "RuleCallImpl", "LookAhead3", "LookAhead3", "Entry",
"contents");
}
}
@@ -100,7 +100,7 @@ public class PartialParsingPointerTest extends AbstractPartialParserTest {
with(ReferenceGrammarStandaloneSetup.class);
String model = "spielplatz 17 { kind ( Dennis 6 ) kind ( Sven 7 ) }";
PartialParsingPointers parsingPointers = calculatePartialParsingPointers(model, model.indexOf("Sven"), 4);
- checkParseRegionPointers(parsingPointers, " kind ( Sven 7 )", "Kind", "Kind", "Kind", "Spielplatz", "kinder");
+ checkParseRegionPointers(parsingPointers, " kind ( Sven 7 )", "RuleCallImpl", "Kind", "Kind", "Spielplatz", "kinder");
}
private PartialParsingPointers calculatePartialParsingPointers(String model, int changeRegionStart,
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.java
new file mode 100644
index 0000000..e34cc10
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * 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.testlanguages;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public class ContentAssistTestLanguage {
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xtext
new file mode 100644
index 0000000..d99a96e
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguage.xtext
@@ -0,0 +1,27 @@
+/*******************************************************************************
+* Copyright (c) 2008 itemis AG 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
+*******************************************************************************/
+language org.eclipse.xtext.testlanguages.ContentAssistTestLanguage
+
+generate contentAssistTestLanguage "http://www.eclipse.org/2008/xtext/tests/ContentAssist"
+
+Start :
+ "abstract rules"
+ (rules += AbstractRule)+
+ "end"
+;
+
+AbstractRule : FirstAbstractRuleChild | SecondAbstractRuleChild;
+
+FirstAbstractRuleChild :
+ name=ID '(' elements+=AbstractRule ')' ';';
+
+SecondAbstractRuleChild:
+ name=ID 'rule' ':' rule=AbstractRuleCall ';';
+
+AbstractRuleCall:
+ rule=[AbstractRule];
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageChecks.chk
new file mode 100644
index 0000000..c22d9f1
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageChecks.chk
@@ -0,0 +1,7 @@
+import contentAssistTestLanguage;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageRuntimeConfig.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageRuntimeConfig.java
new file mode 100644
index 0000000..c4c3e2c
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageRuntimeConfig.java
@@ -0,0 +1,19 @@
+package org.eclipse.xtext.testlanguages;
+
+import java.util.Set;
+
+import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
+
+/**
+ * used to register components to be used at runtime.
+ */
+public class ContentAssistTestLanguageRuntimeConfig extends AbstractContentAssistTestLanguageRuntimeConfig {
+
+ public Set<IServiceRegistration> registrations() {
+ Set<IServiceRegistration> generated = super.registrations();
+ // do stuff
+ return generated;
+ }
+
+}
+
diff --git a/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/TestLanguage.xmi b/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/TestLanguage.xmi
index d3392ef..deae47e 100644
--- a/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/TestLanguage.xmi
+++ b/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/TestLanguage.xmi
@@ -1,22 +1,24 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
- <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="foo" nsURI="http://foo"/>
<idElements>org</idElements>
<idElements>eclipse</idElements>
<idElements>xtext</idElements>
<idElements>ui</idElements>
<idElements>core</idElements>
<idElements>TestLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="foo" nsURI="http://foo"/>
<rules xsi:type="xtext:ParserRule" name="File">
- <alternatives xsi:type="xtext:Assignment" cardinality="*" operator="+=" feature="stuff">
- <terminal xsi:type="xtext:RuleCall" name="Stuff"/>
+ <alternatives xsi:type="xtext:Assignment" cardinality="*" feature="stuff" operator="+=">
+ <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="Stuff">
<alternatives xsi:type="xtext:Group">
<abstractTokens xsi:type="xtext:Keyword" value="stuff"/>
- <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
- <terminal xsi:type="xtext:RuleCall" name="ID"/>
+ <abstractTokens xsi:type="xtext:Assignment" feature="name" operator="=">
+ <terminal xsi:type="xtext:RuleCall">
+ <rule href="classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"/>
+ </terminal>
</abstractTokens>
</alternatives>
</rules>
diff --git a/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguageLexer.java b/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguageLexer.java
index 4fc5966..9b059c7 100644
--- a/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguageLexer.java
+++ b/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguage.g 2008-11-24 19:32:02
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguage.g 2008-12-02 18:51:28
package org.eclipse.xtext.ui.core.parser.internal;
diff --git a/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguageParser.java b/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguageParser.java
index e89e5bc..58c2f49 100644
--- a/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.ui.core.tests/src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguage.g 2008-11-24 19:32:02
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/ui/core/parser/internal/InternalTestLanguage.g 2008-12-02 18:51:28
package org.eclipse.xtext.ui.core.parser.internal;