summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-02-05 06:08:11 (EST)
committer sefftinge2009-02-05 06:08:11 (EST)
commit7594c5c32dae6e404561c076c2a0a08eb8d90c8d (patch)
tree5c227791edddfcb4e0c0285dbc04209bd7686f6b
parent61abb53f1ad46a46fe4a251a62baff67b9d2423b (diff)
downloadorg.eclipse.xtext-7594c5c32dae6e404561c076c2a0a08eb8d90c8d.zip
org.eclipse.xtext-7594c5c32dae6e404561c076c2a0a08eb8d90c8d.tar.gz
org.eclipse.xtext-7594c5c32dae6e404561c076c2a0a08eb8d90c8d.tar.bz2
Fixed some issues with lowercase languages in generator and wizard
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.ecore6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/AbstractLowerCaseNamedTestLanguageRuntimeModule.java72
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/ILowerCaseNamedTestLanguage.java24
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/LowerCaseNamedTestLanguageStandaloneSetup.java59
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.ecore8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xmi21
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/LowerCaseNamedTestLanguageAntlrTokenFileProvider.java15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/LowerCaseNamedTestLanguageParser.java44
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g125
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.tokens7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguageLexer.java657
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguageParser.java160
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage__.g31
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageDelimiters.java18
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguagePackratParser.java16
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageParserConfiguration.java91
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/consumers/LowerCaseNamedTestLanguageModelConsumer.java75
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parsetree/reconstr/LowerCaseNamedTestLanguageParseTreeConstructor.java58
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageGrammarAccess.java53
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageMetamodelAccess.java51
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageResourceFactory.java27
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.ecore2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.ecore6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore6
-rwxr-xr-xtests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java24
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GrammarUtilTest.java1
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/LowerCaseNamedTestLanguage.java18
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/LowerCaseNamedTestLanguageChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/LowerCaseNamedTestLanguageRuntimeModule.java18
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/ParserTest.java23
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/PluginTestSuite.java1
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xtext14
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/valueconverter/Bug250313.java1
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/xtext/ResourceLoadTest.java1
35 files changed, 1728 insertions, 14 deletions
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.ecore b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.ecore
index e234417..c70d0ae 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.ecore
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.ecore
@@ -16,12 +16,12 @@
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Person">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Kind" eSuperTypes="//Person"/>
<eClassifiers xsi:type="ecore:EClass" name="Erwachsener" eSuperTypes="//Person"/>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
index 30c6432..6edbed4 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
@@ -14,10 +14,10 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="rules" unique="false" upperBound="-1" eType="//AbstractRule" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractRule">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="//TypeRef" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="//TypeRef" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractMetamodelDeclaration">
<eStructuralFeatures xsi:type="ecore:EReference" name="ePackage">
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/AbstractLowerCaseNamedTestLanguageRuntimeModule.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/AbstractLowerCaseNamedTestLanguageRuntimeModule.java
new file mode 100644
index 0000000..04a8229
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/AbstractLowerCaseNamedTestLanguageRuntimeModule.java
@@ -0,0 +1,72 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator;
+
+import org.eclipse.xtext.service.DefaultRuntimeModule;
+import org.eclipse.xtext.service.IServiceScope;
+
+import com.google.inject.Binder;
+
+/**
+ * GENERATED! Manual modification goes to LowerCaseNamedTestLanguageRuntimeModule
+ */
+public abstract class AbstractLowerCaseNamedTestLanguageRuntimeModule extends DefaultRuntimeModule {
+
+ @Override
+ public void configure(Binder binder) {
+ super.configure(binder);
+ binder.bind(IServiceScope.class).toInstance(org.eclipse.xtext.generator.ILowerCaseNamedTestLanguage.SCOPE);
+ }
+
+ public Class<? extends org.eclipse.xtext.IMetamodelAccess> bindIMetamodelAccess() {
+ return org.eclipse.xtext.generator.services.LowerCaseNamedTestLanguageMetamodelAccess.class;
+ }
+ public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
+ return org.eclipse.xtext.generator.services.LowerCaseNamedTestLanguageGrammarAccess.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.IAstFactory> bindIAstFactory() {
+ return org.eclipse.xtext.parser.DefaultEcoreElementFactory.class;
+ }
+ public Class<? extends org.eclipse.xtext.resource.IResourceFactory> bindIResourceFactory() {
+ return org.eclipse.xtext.generator.services.LowerCaseNamedTestLanguageResourceFactory.class;
+ }
+ public Class<? extends org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor> bindIParseTreeConstructor() {
+ return org.eclipse.xtext.generator.parsetree.reconstr.LowerCaseNamedTestLanguageParseTreeConstructor.class;
+ }
+ public Class<? extends org.eclipse.xtext.parsetree.reconstr.ITokenSerializer> bindITokenSerializer() {
+ return org.eclipse.xtext.parsetree.reconstr.impl.WhitespacePreservingTokenSerializer.class;
+ }
+ public Class<? extends org.eclipse.xtext.parsetree.reconstr.ICrossReferenceSerializer> bindICrossReferenceSerializer() {
+ return org.eclipse.xtext.parsetree.reconstr.impl.SimpleCrossReferenceSerializer.class;
+ }
+ public Class<? extends org.eclipse.xtext.parsetree.reconstr.ITransientValueService> bindITransientValueService() {
+ return org.eclipse.xtext.parsetree.reconstr.impl.SimpleTransientValueService.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> bindIAntlrParser() {
+ return org.eclipse.xtext.generator.parser.antlr.LowerCaseNamedTestLanguageParser.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
+ return org.eclipse.xtext.generator.parser.antlr.LowerCaseNamedTestLanguageAntlrTokenFileProvider.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
+ return org.eclipse.xtext.generator.parser.antlr.internal.InternalLowerCaseNamedTestLanguageLexer.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() {
+ return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.packrat.IPackratParser> bindIPackratParser() {
+ return org.eclipse.xtext.generator.parser.packrat.LowerCaseNamedTestLanguagePackratParser.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.packrat.IParseResultFactory> bindIParseResultFactory() {
+ return org.eclipse.xtext.parser.packrat.ParseResultFactory.class;
+ }
+ public Class<? extends org.eclipse.xtext.parser.ISwitchingParser> bindISwitchingParser() {
+ return org.eclipse.xtext.parser.SwitchingParser.class;
+ }
+
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/ILowerCaseNamedTestLanguage.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/ILowerCaseNamedTestLanguage.java
new file mode 100644
index 0000000..c30b520
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/ILowerCaseNamedTestLanguage.java
@@ -0,0 +1,24 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator;
+
+import org.eclipse.xtext.service.IServiceScope;
+import org.eclipse.xtext.service.ServiceScopeFactory;
+import org.eclipse.xtext.ILanguage;
+
+public interface ILowerCaseNamedTestLanguage extends ILanguage {
+
+ /**
+ * 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.generator.lowerCaseNamedTestLanguage";
+ public static final String NAME = "LowerCaseNamedTestLanguage";
+ public static final String NAMESPACE = "org.eclipse.xtext.generator";
+ public static final String[] FILE_EXTENSIONS = new String[]{"lowercasenamedtestlanguage"};
+ public static final IServiceScope SCOPE = ServiceScopeFactory.createScope(ID);
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/LowerCaseNamedTestLanguageStandaloneSetup.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/LowerCaseNamedTestLanguageStandaloneSetup.java
new file mode 100644
index 0000000..26fb185
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/LowerCaseNamedTestLanguageStandaloneSetup.java
@@ -0,0 +1,59 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator;
+
+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 com.google.inject.Guice;
+import com.google.inject.Injector;
+
+import org.eclipse.xtext.generator.ILowerCaseNamedTestLanguage;
+
+public abstract class LowerCaseNamedTestLanguageStandaloneSetup {
+
+ private static boolean isInitialized = false;
+
+ public synchronized static void doSetup() {
+ if(!isInitialized) {
+
+ Injector injector = Guice.createInjector(new org.eclipse.xtext.generator.LowerCaseNamedTestLanguageRuntimeModule());
+ ServiceRegistry.registerInjector(org.eclipse.xtext.generator.ILowerCaseNamedTestLanguage.SCOPE, injector);
+
+
+
+ org.eclipse.xtext.builtin.XtextBuiltinStandaloneSetup.doSetup();
+
+
+ // register resource factory to EMF
+ IResourceFactory resourceFactory = new org.eclipse.xtext.generator.services.LowerCaseNamedTestLanguageResourceFactory();
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("lowercasenamedtestlanguage", resourceFactory);
+
+
+ // initialize EPackages
+
+ if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/tmf/xtext/lowerCaseNamedTestLanguage")) {
+ EPackage lowerCaseNamedTestLanguage = EcoreUtil2.loadEPackage(
+ "classpath:/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.ecore",
+ LowerCaseNamedTestLanguageStandaloneSetup.class.getClassLoader());
+ if (lowerCaseNamedTestLanguage == null)
+ throw new IllegalStateException(
+ "Couldn't load EPackage from 'classpath:/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.ecore'");
+ EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/tmf/xtext/lowerCaseNamedTestLanguage", lowerCaseNamedTestLanguage);
+ }
+
+ isInitialized = true;
+ }
+ }
+
+ public static IServiceScope getServiceScope() {
+ doSetup();
+ return org.eclipse.xtext.generator.ILowerCaseNamedTestLanguage.SCOPE;
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.ecore
new file mode 100644
index 0000000..1138e3f
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.ecore
@@ -0,0 +1,8 @@
+<?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="lowerCaseNamedTestLanguage" nsURI="http://www.eclipse.org/2009/tmf/xtext/lowerCaseNamedTestLanguage" nsPrefix="lowerCaseNamedTestLanguage">
+ <eClassifiers xsi:type="ecore:EClass" name="Model">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xmi
new file mode 100644
index 0000000..f80845f
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xmi
@@ -0,0 +1,21 @@
+<?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:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
+ <idElements>org</idElements>
+ <idElements>eclipse</idElements>
+ <idElements>xtext</idElements>
+ <idElements>generator</idElements>
+ <idElements>lowerCaseNamedTestLanguage</idElements>
+ <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="lowerCaseNamedTestLanguage">
+ <ePackage href="http://www.eclipse.org/2009/tmf/xtext/lowerCaseNamedTestLanguage#/"/>
+ </metamodelDeclarations>
+ <rules xsi:type="xtext:ParserRule" name="Model">
+ <type metamodel="//@metamodelDeclarations.0">
+ <type xsi:type="ecore:EClass" href="http://www.eclipse.org/2009/tmf/xtext/lowerCaseNamedTestLanguage#//Model"/>
+ </type>
+ <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/generator/parser/antlr/LowerCaseNamedTestLanguageAntlrTokenFileProvider.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/LowerCaseNamedTestLanguageAntlrTokenFileProvider.java
new file mode 100644
index 0000000..78ae138
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/LowerCaseNamedTestLanguageAntlrTokenFileProvider.java
@@ -0,0 +1,15 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator.parser.antlr;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class LowerCaseNamedTestLanguageAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = LowerCaseNamedTestLanguageAntlrTokenFileProvider.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.tokens");
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/LowerCaseNamedTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/LowerCaseNamedTestLanguageParser.java
new file mode 100644
index 0000000..541e3a5
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/LowerCaseNamedTestLanguageParser.java
@@ -0,0 +1,44 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator.parser.antlr;
+
+import org.antlr.runtime.ANTLRInputStream;
+import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
+import org.eclipse.xtext.parser.IParseResult;
+import org.eclipse.xtext.parser.ParseException;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+
+import com.google.inject.Inject;
+
+import org.eclipse.xtext.generator.parser.antlr.internal.InternalLowerCaseNamedTestLanguageLexer;
+import org.eclipse.xtext.generator.parser.antlr.internal.InternalLowerCaseNamedTestLanguageParser;
+
+public class LowerCaseNamedTestLanguageParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
+
+ @Inject
+ protected ITokenDefProvider antlrTokenDefProvider;
+
+ @Override
+ protected IParseResult parse(String ruleName, ANTLRInputStream in) {
+ InternalLowerCaseNamedTestLanguageLexer lexer = new InternalLowerCaseNamedTestLanguageLexer(in);
+ XtextTokenStream stream = new XtextTokenStream(lexer, antlrTokenDefProvider);
+ InternalLowerCaseNamedTestLanguageParser parser = new InternalLowerCaseNamedTestLanguageParser(
+ stream, getElementFactory(), 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 "Model";
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g
new file mode 100644
index 0000000..1fcb7aa
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g
@@ -0,0 +1,125 @@
+/*
+Generated with Xtext
+*/
+grammar InternalLowerCaseNamedTestLanguage;
+
+options {
+ superClass=AbstractInternalAntlrParser;
+}
+
+@lexer::header {
+package org.eclipse.xtext.generator.parser.antlr.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.generator.parser.antlr.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.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.xtext.conversion.ValueConverterException;
+
+}
+
+@parser::members {
+
+ public InternalLowerCaseNamedTestLanguageParser(TokenStream input, IAstFactory factory, Grammar g) {
+ this(input);
+ this.factory = factory;
+ grammar = g;
+ }
+
+ @Override
+ protected InputStream getTokenFile() {
+ ClassLoader classLoader = InternalLowerCaseNamedTestLanguageParser.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.tokens");
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Model";
+ }
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+
+
+
+
+// Entry rule entryRuleModel
+entryRuleModel returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xmi#//@rules.0" /* xtext::ParserRule */, currentNode); }
+ iv_ruleModel=ruleModel
+ { $current=$iv_ruleModel.current; }
+ EOF
+;
+
+// Rule Model
+ruleModel returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead();
+ }
+ @after { resetLookahead();
+ }:
+(
+
+ lv_name=RULE_ID
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xmi#//@rules.0/@alternatives/@terminal" /* xtext::RuleCall */, "name");
+ }
+
+ {
+ if ($current==null) {
+ $current = factory.create("Model");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ try {
+ factory.set($current, "name", lv_name, "ID", currentNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+ }
+
+);
+
+
+
+
+
+
+
+
+
+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/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.tokens b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.tokens
new file mode 100644
index 0000000..37fd4f8
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.tokens
@@ -0,0 +1,7 @@
+RULE_ML_COMMENT=7
+RULE_ID=4
+RULE_WS=9
+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/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguageLexer.java
new file mode 100644
index 0000000..c601b2e
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguageLexer.java
@@ -0,0 +1,657 @@
+package org.eclipse.xtext.generator.parser.antlr.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 InternalLowerCaseNamedTestLanguageLexer extends Lexer {
+ 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 Tokens=11;
+ public static final int RULE_ANY_OTHER=10;
+ public static final int RULE_SL_COMMENT=8;
+ public InternalLowerCaseNamedTestLanguageLexer() {;}
+ public InternalLowerCaseNamedTestLanguageLexer(CharStream input) {
+ super(input);
+ }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g"; }
+
+ // $ANTLR start RULE_ID
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:111:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:111:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:111:11: ( '^' )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0=='^') ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:111: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;
+ }
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:111: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:113:10: ( ( '0' .. '9' )+ )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:113:12: ( '0' .. '9' )+
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:113: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:113: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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:115: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("115:1: RULE_STRING : ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' );", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:115:15: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"'
+ {
+ match('\"');
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:115: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:115: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:115: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:115:101: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\''
+ {
+ match('\'');
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:115: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:115: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:115: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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:117:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:117:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:117: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:117: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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:119:17: ( '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )? )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:119:19: '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:119: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:119: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);
+
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:119: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:119:39: ( '\\r' )? '\\n'
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:119:39: ( '\\r' )?
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='\r') ) {
+ alt9=1;
+ }
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:119: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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:121:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:121:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:121: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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.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;
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:123:16: ( . )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:123:18: .
+ {
+ matchAny();
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end RULE_ANY_OTHER
+
+ public void mTokens() throws RecognitionException {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:1:8: ( RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=7;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0=='^') ) {
+ int LA12_1 = input.LA(2);
+
+ if ( ((LA12_1>='A' && LA12_1<='Z')||LA12_1=='_'||(LA12_1>='a' && LA12_1<='z')) ) {
+ alt12=1;
+ }
+ else {
+ alt12=7;}
+ }
+ else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='z')) ) {
+ alt12=1;
+ }
+ else if ( ((LA12_0>='0' && LA12_0<='9')) ) {
+ alt12=2;
+ }
+ else if ( (LA12_0=='\"') ) {
+ int LA12_4 = input.LA(2);
+
+ if ( ((LA12_4>='\u0000' && LA12_4<='\uFFFE')) ) {
+ alt12=3;
+ }
+ else {
+ alt12=7;}
+ }
+ else if ( (LA12_0=='\'') ) {
+ int LA12_5 = input.LA(2);
+
+ if ( ((LA12_5>='\u0000' && LA12_5<='\uFFFE')) ) {
+ alt12=3;
+ }
+ else {
+ alt12=7;}
+ }
+ else if ( (LA12_0=='/') ) {
+ switch ( input.LA(2) ) {
+ case '*':
+ {
+ alt12=4;
+ }
+ break;
+ case '/':
+ {
+ alt12=5;
+ }
+ break;
+ default:
+ alt12=7;}
+
+ }
+ else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {
+ alt12=6;
+ }
+ 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=7;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("1:1: Tokens : ( 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 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:1:10: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:1:18: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:1:27: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 4 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:1:39: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 5 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:1:55: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 6 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:1:71: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 7 :
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:1:79: 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/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguageParser.java
new file mode 100644
index 0000000..17a6de5
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguageParser.java
@@ -0,0 +1,160 @@
+package org.eclipse.xtext.generator.parser.antlr.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.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.xtext.conversion.ValueConverterException;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class InternalLowerCaseNamedTestLanguageParser extends AbstractInternalAntlrParser {
+ 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"
+ };
+ 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 InternalLowerCaseNamedTestLanguageParser(TokenStream input) {
+ super(input);
+ }
+
+
+ public String[] getTokenNames() { return tokenNames; }
+ public String getGrammarFileName() { return "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g"; }
+
+
+
+ public InternalLowerCaseNamedTestLanguageParser(TokenStream input, IAstFactory factory, Grammar g) {
+ this(input);
+ this.factory = factory;
+ grammar = g;
+ }
+
+ @Override
+ protected InputStream getTokenFile() {
+ ClassLoader classLoader = InternalLowerCaseNamedTestLanguageParser.class.getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.tokens");
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Model";
+ }
+
+
+
+ // $ANTLR start entryRuleModel
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:68:1: entryRuleModel returns [EObject current=null] : iv_ruleModel= ruleModel EOF ;
+ public final EObject entryRuleModel() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleModel = null;
+
+
+ try {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:68:47: (iv_ruleModel= ruleModel EOF )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:69:2: iv_ruleModel= ruleModel EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xmi#//@rules.0" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleModel_in_entryRuleModel72);
+ iv_ruleModel=ruleModel();
+ _fsp--;
+
+ current =iv_ruleModel;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleModel82);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleModel
+
+
+ // $ANTLR start ruleModel
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:76:1: ruleModel returns [EObject current=null] : (lv_name= RULE_ID ) ;
+ public final EObject ruleModel() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name=null;
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+
+ try {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:80:6: ( (lv_name= RULE_ID ) )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:81:1: (lv_name= RULE_ID )
+ {
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:81:1: (lv_name= RULE_ID )
+ // ../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g:83:6: lv_name= RULE_ID
+ {
+ lv_name=(Token)input.LT(1);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleModel127);
+
+ createLeafNode("classpath:/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xmi#//@rules.0/@alternatives/@terminal" /* xtext::RuleCall */, "name");
+
+
+ if (current==null) {
+ current = factory.create("Model");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ try {
+ factory.set(current, "name", lv_name, "ID", currentNode);
+ } catch (ValueConverterException vce) {
+ handleValueConverterException(vce);
+ }
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleModel
+
+
+
+
+ public static final BitSet FOLLOW_ruleModel_in_entryRuleModel72 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleModel82 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleModel127 = 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/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage__.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage__.g
new file mode 100644
index 0000000..406c9c1
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage__.g
@@ -0,0 +1,31 @@
+lexer grammar InternalLowerCaseNamedTestLanguage;
+@header {
+package org.eclipse.xtext.generator.parser.antlr.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;
+}
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g" 111
+RULE_ID : ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g" 113
+RULE_INT : ('0'..'9')+;
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g" 115
+RULE_STRING : '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'"') )* '"' | '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\'';
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g" 117
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )* '*/' {$channel=HIDDEN;};
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g" 119
+RULE_SL_COMMENT : '//' ~('\n'|'\r')* ('\r'? '\n')? {$channel=HIDDEN;};
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g" 121
+RULE_WS : (' '|'\t'|'\r'|'\n')+ {$channel=HIDDEN;};
+
+// $ANTLR src "../org.eclipse.xtext.generator.tests//src-gen/org/eclipse/xtext/generator/parser/antlr/internal/InternalLowerCaseNamedTestLanguage.g" 123
+RULE_ANY_OTHER : .;
+
+
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageDelimiters.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageDelimiters.java
new file mode 100644
index 0000000..4b273e9
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageDelimiters.java
@@ -0,0 +1,18 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator.parser.packrat;
+
+import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
+import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
+import org.eclipse.xtext.parser.packrat.matching.SetBasedKeywordMatcher;
+
+public final class LowerCaseNamedTestLanguageDelimiters {
+
+ private LowerCaseNamedTestLanguageDelimiters() {
+ throw new UnsupportedOperationException("Utility classes may not be initialized");
+ }
+
+ public static ISequenceMatcher ruleCall$4$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguagePackratParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguagePackratParser.java
new file mode 100644
index 0000000..bddabd9
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguagePackratParser.java
@@ -0,0 +1,16 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator.parser.packrat;
+
+import org.eclipse.xtext.parser.packrat.AbstractPackratParser;
+import org.eclipse.xtext.parser.packrat.AbstractParserConfiguration.IInternalParserConfiguration;
+
+public class LowerCaseNamedTestLanguagePackratParser extends AbstractPackratParser {
+
+ @Override
+ protected LowerCaseNamedTestLanguageParserConfiguration createParserConfiguration(IInternalParserConfiguration configuration) {
+ return new LowerCaseNamedTestLanguageParserConfiguration(configuration);
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageParserConfiguration.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageParserConfiguration.java
new file mode 100644
index 0000000..5bee5b3
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/LowerCaseNamedTestLanguageParserConfiguration.java
@@ -0,0 +1,91 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator.parser.packrat;
+
+import org.eclipse.xtext.parser.packrat.AbstractParserConfiguration;
+import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+
+import org.eclipse.xtext.builtin.parser.packrat.XtextBuiltinParserConfiguration;
+
+import org.eclipse.xtext.generator.parser.packrat.consumers.LowerCaseNamedTestLanguageModelConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinINTConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSTRINGConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinML_COMMENTConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinSL_COMMENTConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinWSConsumer;
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinANY_OTHERConsumer;
+
+@SuppressWarnings("unused")
+public class LowerCaseNamedTestLanguageParserConfiguration extends AbstractParserConfiguration {
+
+ private XtextBuiltinParserConfiguration xtextBuiltinConfiguration;
+
+ private LowerCaseNamedTestLanguageModelConsumer modelConsumer;
+
+ public LowerCaseNamedTestLanguageParserConfiguration(IInternalParserConfiguration configuration) {
+ super(configuration);
+ this.xtextBuiltinConfiguration = new XtextBuiltinParserConfiguration(configuration);
+ }
+
+ public LowerCaseNamedTestLanguageModelConsumer getRootConsumer() {
+ return modelConsumer;
+ }
+
+ public void createNonTerminalConsumers() {
+ getXtextBuiltinConfiguration().createNonTerminalConsumers();
+ modelConsumer = new LowerCaseNamedTestLanguageModelConsumer(
+ this, null
+ );
+ }
+
+ public void createTerminalConsumers() {
+ getXtextBuiltinConfiguration().createTerminalConsumers();
+ }
+
+ public void configureConsumers() {
+ getModelConsumer().setIdConsumer(getIdConsumer());
+
+ getModelConsumer().setRuleCall$2$Delimiter(LowerCaseNamedTestLanguageDelimiters.ruleCall$4$Delimiter);
+ }
+
+ // TODO collect superGrammars transitive
+ public XtextBuiltinParserConfiguration getXtextBuiltinConfiguration() {
+ return xtextBuiltinConfiguration;
+ }
+
+ public LowerCaseNamedTestLanguageModelConsumer getModelConsumer() {
+ return modelConsumer;
+ }
+
+ public XtextBuiltinIDConsumer getIdConsumer() {
+ return getXtextBuiltinConfiguration().getIdConsumer();
+ }
+
+ public XtextBuiltinINTConsumer getIntConsumer() {
+ return getXtextBuiltinConfiguration().getIntConsumer();
+ }
+
+ public XtextBuiltinSTRINGConsumer getStringConsumer() {
+ return getXtextBuiltinConfiguration().getStringConsumer();
+ }
+
+ public XtextBuiltinML_COMMENTConsumer getMlCommentConsumer() {
+ return getXtextBuiltinConfiguration().getMlCommentConsumer();
+ }
+
+ public XtextBuiltinSL_COMMENTConsumer getSlCommentConsumer() {
+ return getXtextBuiltinConfiguration().getSlCommentConsumer();
+ }
+
+ public XtextBuiltinWSConsumer getWsConsumer() {
+ return getXtextBuiltinConfiguration().getWsConsumer();
+ }
+
+ public XtextBuiltinANY_OTHERConsumer getAnyOtherConsumer() {
+ return getXtextBuiltinConfiguration().getAnyOtherConsumer();
+ }
+
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/consumers/LowerCaseNamedTestLanguageModelConsumer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/consumers/LowerCaseNamedTestLanguageModelConsumer.java
new file mode 100644
index 0000000..654cf3a
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parser/packrat/consumers/LowerCaseNamedTestLanguageModelConsumer.java
@@ -0,0 +1,75 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator.parser.packrat.consumers;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.packrat.IMarkerFactory.IMarker;
+import org.eclipse.xtext.parser.packrat.consumers.ITerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.NonTerminalConsumer;
+import org.eclipse.xtext.parser.packrat.consumers.INonTerminalConsumerConfiguration;
+import org.eclipse.xtext.parser.packrat.consumers.ConsumeResult;
+import org.eclipse.xtext.parser.packrat.matching.ICharacterClass;
+import org.eclipse.xtext.parser.packrat.matching.ISequenceMatcher;
+
+import org.eclipse.xtext.generator.services.LowerCaseNamedTestLanguageGrammarAccess;
+import org.eclipse.xtext.generator.services.LowerCaseNamedTestLanguageGrammarAccess.ModelElements;
+
+import org.eclipse.xtext.builtin.parser.packrat.consumers.XtextBuiltinIDConsumer;
+
+@SuppressWarnings("unused")
+public final class LowerCaseNamedTestLanguageModelConsumer extends NonTerminalConsumer {
+
+ private XtextBuiltinIDConsumer idConsumer;
+
+ private ISequenceMatcher ruleCall$2$Delimiter;
+
+ public LowerCaseNamedTestLanguageModelConsumer(INonTerminalConsumerConfiguration configuration, ITerminalConsumer[] hiddenTokens) {
+ super(configuration, hiddenTokens);
+ ruleCall$2$Delimiter = ISequenceMatcher.Factory.nullMatcher();
+ }
+
+ protected int doConsume(int entryPoint) throws Exception {
+ return consumeAssignment$1(entryPoint);
+ }
+
+ protected int consumeAssignment$1(int entryPoint) throws Exception {
+ int result = ConsumeResult.EMPTY_MATCH;
+ int tempResult;
+ announceNextLevel();
+ tempResult = consumeTerminal(idConsumer, "name", false, false, getRule().ele0LexerRuleCallID(), getRuleCall$2$Delimiter());
+ if (tempResult == ConsumeResult.SUCCESS) {
+ announceLevelFinished();
+ return tempResult;
+ }
+ result = tempResult >= result ? tempResult : result;
+ announceLevelFinished();
+ return result;
+ }
+
+ public ModelElements getRule() {
+ return LowerCaseNamedTestLanguageGrammarAccess.INSTANCE.prModel();
+ }
+
+ protected EObject getGrammarElement() {
+ return getRule().getRule();
+ }
+
+ @Override
+ protected String getDefaultTypeName() {
+ return "Model";
+ }
+
+ public void setIdConsumer(XtextBuiltinIDConsumer idConsumer) {
+ this.idConsumer = idConsumer;
+ }
+
+ public ISequenceMatcher getRuleCall$2$Delimiter() {
+ return ruleCall$2$Delimiter;
+ }
+
+ public void setRuleCall$2$Delimiter(ISequenceMatcher matcher) {
+ ruleCall$2$Delimiter = matcher != null ? matcher : ISequenceMatcher.Factory.nullMatcher();
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parsetree/reconstr/LowerCaseNamedTestLanguageParseTreeConstructor.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parsetree/reconstr/LowerCaseNamedTestLanguageParseTreeConstructor.java
new file mode 100644
index 0000000..27f387b
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/parsetree/reconstr/LowerCaseNamedTestLanguageParseTreeConstructor.java
@@ -0,0 +1,58 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator.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;
+import org.eclipse.xtext.builtin.XtextBuiltinGrammarAccess;
+import org.eclipse.xtext.generator.services.LowerCaseNamedTestLanguageGrammarAccess;
+
+
+public class LowerCaseNamedTestLanguageParseTreeConstructor extends AbstractParseTreeConstructor {
+
+ protected Solution internalSerialize(EObject obj) {
+ IInstanceDescription inst = getDescr(obj);
+ Solution s;
+ if(inst.isInstanceOf("Model") && (s = new Model_Assignment_name(inst, null).firstSolution()) != null && isConsumed(s,null)) return s;
+ return null;
+ }
+
+
+/************ begin Rule Model ****************
+ *
+ * Model : name = ID ;
+ *
+ **/
+
+
+// name = ID
+protected class Model_Assignment_name extends AssignmentToken {
+
+ public Model_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return LowerCaseNamedTestLanguageGrammarAccess.INSTANCE.prModel().eleAssignmentName();
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("name",IS_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 = LowerCaseNamedTestLanguageGrammarAccess.INSTANCE.prModel().ele0LexerRuleCallID();
+ return new Solution(obj);
+ }
+ return null;
+ }
+}
+
+/************ end Rule Model ****************/
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageGrammarAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageGrammarAccess.java
new file mode 100644
index 0000000..e7ec160
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageGrammarAccess.java
@@ -0,0 +1,53 @@
+/*
+Generated with Xtext
+*/
+
+package org.eclipse.xtext.generator.services;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.BaseEPackageAccess;
+import org.eclipse.xtext.builtin.XtextBuiltinGrammarAccess;
+
+public class LowerCaseNamedTestLanguageGrammarAccess extends BaseEPackageAccess implements IGrammarAccess {
+
+ public class ModelElements implements IParserRuleAccess {
+ private final ParserRule rule = (ParserRule) getGrammar().eContents().get(1);
+ private final Assignment cAssignmentName = (Assignment)rule.eContents().get(1);
+ private final RuleCall c0LexerRuleCallID = (RuleCall)cAssignmentName.eContents().get(0);
+
+ // Model : name = ID ;
+ public ParserRule getRule() { return rule; }
+
+ // name = ID
+ public Assignment eleAssignmentName() { return cAssignmentName; }
+
+ // ID
+ public RuleCall ele0LexerRuleCallID() { return c0LexerRuleCallID; }
+ }
+
+ public final static LowerCaseNamedTestLanguageGrammarAccess INSTANCE = new LowerCaseNamedTestLanguageGrammarAccess();
+
+ private static final String LOWERCASENAMEDTESTLANGUAGE_GRAMMAR_CP_URI = "classpath:/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xmi";
+ private static Grammar GRAMMAR = null;
+ private static ModelElements pModel;
+
+ @SuppressWarnings("unused")
+ public synchronized Grammar getGrammar() {
+ if (GRAMMAR==null) {
+ // assert the XtextPackage implementation is loaded
+ XtextPackage xtextPackage = XtextPackage.eINSTANCE;
+ GRAMMAR = (Grammar) loadGrammarFile(LowerCaseNamedTestLanguageGrammarAccess.class.getClassLoader(),LOWERCASENAMEDTESTLANGUAGE_GRAMMAR_CP_URI);
+ }
+ return GRAMMAR;
+ }
+
+ public XtextBuiltinGrammarAccess getSuperGrammar() {
+ return XtextBuiltinGrammarAccess.INSTANCE;
+ }
+
+
+ // Model : name = ID ;
+ public ModelElements prModel() {
+ return (pModel != null) ? pModel : (pModel = new ModelElements());
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageMetamodelAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageMetamodelAccess.java
new file mode 100644
index 0000000..77b61a4
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageMetamodelAccess.java
@@ -0,0 +1,51 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator.services;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.IMetamodelAccess;
+import org.eclipse.xtext.parser.BaseEPackageAccess;
+
+public class LowerCaseNamedTestLanguageMetamodelAccess extends BaseEPackageAccess implements IMetamodelAccess {
+
+{
+
+ if (!EPackage.Registry.INSTANCE.containsKey(LOWERCASENAMEDTESTLANGUAGE_NS_URI))
+ EPackage.Registry.INSTANCE.put(LOWERCASENAMEDTESTLANGUAGE_NS_URI, loadEcoreFile(getClass().getClassLoader(), "classpath:/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.ecore"));
+
+}
+
+ private EPackage[] generated = new EPackage[] {
+
+ getLowerCaseNamedTestLanguageEPackage()
+
+ };
+
+ public EPackage[] getGeneratedEPackages() {
+ return generated;
+ }
+
+ private EPackage[] referenced = new EPackage[] {
+
+ };
+ public EPackage[] getReferencedEPackages() {
+ return referenced;
+ }
+
+ private EPackage[] all = new EPackage[] {
+ getLowerCaseNamedTestLanguageEPackage()
+ };
+
+ public EPackage[] getAllEPackages() {
+ return all;
+ }
+
+
+ protected static final String LOWERCASENAMEDTESTLANGUAGE_NS_URI = "http://www.eclipse.org/2009/tmf/xtext/lowerCaseNamedTestLanguage";
+
+ protected EPackage getLowerCaseNamedTestLanguageEPackage() {
+ return EPackage.Registry.INSTANCE.getEPackage(LOWERCASENAMEDTESTLANGUAGE_NS_URI);
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageResourceFactory.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageResourceFactory.java
new file mode 100644
index 0000000..8215963
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/generator/services/LowerCaseNamedTestLanguageResourceFactory.java
@@ -0,0 +1,27 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator.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;
+
+public class LowerCaseNamedTestLanguageResourceFactory implements IResourceFactory {
+
+ public String[] getModelFileExtensions() {
+ return new String[] { "lowercasenamedtestlanguage" };
+ }
+
+ /* (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.getInjector(org.eclipse.xtext.generator.ILowerCaseNamedTestLanguage.SCOPE).injectMembers(resource);
+ return resource;
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.ecore
index e5bdf15..dc92726 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.ecore
@@ -49,10 +49,10 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="NamedObject">
<eStructuralFeatures xsi:type="ecore:EReference" name="leftMig" eType="//Migration" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="assignments" unique="false" upperBound="-1" eType="//Assignment" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="assignments" unique="false" upperBound="-1" eType="//Assignment" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ObjectRef" eSuperTypes="//NamedObject">
<eStructuralFeatures xsi:type="ecore:EReference" name="leftRes" eType="//NamedResource"/>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.ecore
index 3b7c01d..f03a642 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.ecore
@@ -20,12 +20,12 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="//TypeRef" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractMetamodelDeclaration">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="alias">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="ePackage">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="alias">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GeneratedMetamodel" eSuperTypes="//AbstractMetamodelDeclaration">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
index d0d0a55..8d02c8e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
@@ -13,12 +13,12 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="familie" unique="false" upperBound="-1" eType="//Familie" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Person">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Kind" eSuperTypes="//Person"/>
<eClassifiers xsi:type="ecore:EClass" name="Erwachsener" eSuperTypes="//Person"/>
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GenerateAllTestGrammars.java
index 64adbe6..74fe811 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
@@ -8,6 +8,9 @@
*******************************************************************************/
package org.eclipse.xtext;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
import org.apache.log4j.Logger;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
@@ -15,6 +18,7 @@ import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.xtext.crossrefs.ImportUriTestLanguage;
import org.eclipse.xtext.crossrefs.LangATestLanguage;
import org.eclipse.xtext.dummy.DummyTestLanguage;
+import org.eclipse.xtext.generator.LowerCaseNamedTestLanguage;
import org.eclipse.xtext.grammarinheritance.AbstractTestLanguage;
import org.eclipse.xtext.grammarinheritance.ConcreteTestLanguage;
import org.eclipse.xtext.metamodelreferencing.tests.MetamodelRefTestLanguage;
@@ -84,7 +88,8 @@ public class GenerateAllTestGrammars {
XtextTerminalsTestLanguage.class,
HiddenTerminalsTestLanguage.class,
EpatchTestLanguage.class,
- KeywordsTestLanguage.class
+ KeywordsTestLanguage.class,
+ LowerCaseNamedTestLanguage.class
};
public static void main(String... args) throws Exception {
@@ -95,7 +100,7 @@ public class GenerateAllTestGrammars {
}
GeneratorFacade.cleanFolder(path + "/src-gen");
for (Class<?> c : testclasses) {
- String filename = "classpath:/" + c.getName().replace('.', '/') + ".xtext";
+ String filename = "classpath:/" + getGrammarFileName(c);
log.info("loading " + filename);
ResourceSetImpl rs = new XtextResourceSet();
URI uri = URI.createURI(filename);
@@ -108,4 +113,19 @@ public class GenerateAllTestGrammars {
e.printStackTrace();
}
}
+
+ private static String getGrammarFileName(Class<?> c) {
+ try {
+ Method m = c.getMethod("getGrammarFileName");
+ if (m != null && Modifier.isStatic(m.getModifiers()) && String.class.equals(m.getReturnType()))
+ try {
+ return ((String) m.invoke(null)).replace('.', '/') + ".xtext";
+ }
+ catch (Exception e) {
+ log.error("Cannot invoke 'getGrammarFileName'", e);
+ }
+ } catch (NoSuchMethodException e) {
+ }
+ return c.getName().replace('.', '/') + ".xtext";
+ }
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GrammarUtilTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GrammarUtilTest.java
index 7fa804c..91c83d8 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GrammarUtilTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GrammarUtilTest.java
@@ -12,7 +12,6 @@ import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.xtext.crossrefs.ILangATestLanguage;
import org.eclipse.xtext.crossrefs.LangATestLanguageStandaloneSetup;
import org.eclipse.xtext.crossrefs.services.LangATestLanguageGrammarAccess;
import org.eclipse.xtext.resource.XtextResource;
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/LowerCaseNamedTestLanguage.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/LowerCaseNamedTestLanguage.java
new file mode 100644
index 0000000..c98098d
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/LowerCaseNamedTestLanguage.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.generator;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public class LowerCaseNamedTestLanguage {
+
+ public static String getGrammarFileName() {
+ return LowerCaseNamedTestLanguage.class.getPackage().getName() + ".lowerCaseNamedTestLanguage";
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/LowerCaseNamedTestLanguageChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/LowerCaseNamedTestLanguageChecks.chk
new file mode 100644
index 0000000..6143a43
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/LowerCaseNamedTestLanguageChecks.chk
@@ -0,0 +1,7 @@
+import lowerCaseNamedTestLanguage;
+/*
+ * 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/generator/LowerCaseNamedTestLanguageRuntimeModule.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/LowerCaseNamedTestLanguageRuntimeModule.java
new file mode 100644
index 0000000..4a86fd1
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/LowerCaseNamedTestLanguageRuntimeModule.java
@@ -0,0 +1,18 @@
+/*
+Generated with Xtext
+*/
+package org.eclipse.xtext.generator;
+
+import com.google.inject.Binder;
+
+/**
+ * used to register components to be used within the IDE.
+ */
+public class LowerCaseNamedTestLanguageRuntimeModule extends AbstractLowerCaseNamedTestLanguageRuntimeModule {
+
+ @Override
+ public void configure(Binder binder) {
+ super.configure(binder);
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/ParserTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/ParserTest.java
new file mode 100644
index 0000000..fcacb76
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/ParserTest.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.xtext.generator;
+
+import org.eclipse.xtext.resource.XtextResource;
+import org.eclipse.xtext.tests.AbstractGeneratorTest;
+
+/**
+ * @author Sebastian Zarnekow - Initial contribution and API
+ */
+public class ParserTest extends AbstractGeneratorTest {
+
+ public void testSimpleParse() throws Exception {
+ with(LowerCaseNamedTestLanguageStandaloneSetup.class);
+ XtextResource resource = getResourceFromString("myID");
+ assertTrue(resource.getErrors().isEmpty());
+ }
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/PluginTestSuite.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/PluginTestSuite.java
index 2a7c49f..67680bd 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/PluginTestSuite.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/PluginTestSuite.java
@@ -19,6 +19,7 @@ public class PluginTestSuite {
suite.addTestSuite(org.eclipse.xtext.crossrefs.CrossRefTest.class);
suite.addTestSuite(org.eclipse.xtext.crossrefs.DefaultScopeProviderTest.class);
suite.addTestSuite(org.eclipse.xtext.crossrefs.LinkingErrorTest.class);
+ suite.addTestSuite(org.eclipse.xtext.generator.ParserTest.class);
suite.addTestSuite(org.eclipse.xtext.generator.resource.ResourceTest.class);
suite.addTestSuite(org.eclipse.xtext.grammarinheritance.InheritanceTest.class);
suite.addTestSuite(org.eclipse.xtext.grammarinheritance.ToEcoreTrafoTest.class);
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xtext
new file mode 100644
index 0000000..d7fd3db
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/lowerCaseNamedTestLanguage.xtext
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *******************************************************************************/
+language org.eclipse.xtext.generator.lowerCaseNamedTestLanguage
+
+generate lowerCaseNamedTestLanguage "http://www.eclipse.org/2009/tmf/xtext/lowerCaseNamedTestLanguage"
+
+Model:
+ name=ID; \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/valueconverter/Bug250313.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/valueconverter/Bug250313.java
index d7332a8..c656938 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/valueconverter/Bug250313.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/valueconverter/Bug250313.java
@@ -3,6 +3,7 @@ package org.eclipse.xtext.valueconverter;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.tests.AbstractGeneratorTest;
+@SuppressWarnings("unused")
public class Bug250313 extends AbstractGeneratorTest {
@Override
protected void setUp() throws Exception {
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/xtext/ResourceLoadTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/xtext/ResourceLoadTest.java
index 5a35e28..75ba7a1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/xtext/ResourceLoadTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/xtext/ResourceLoadTest.java
@@ -31,6 +31,7 @@ import org.eclipse.xtext.util.Pair;
*
* @author Sebastian Zarnekow - Initial contribution and API
*/
+@SuppressWarnings("unused")
public class ResourceLoadTest extends AbstractGeneratorTest {
private Class<?> clazz;