mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 16:28:56 +00:00
Generated EncodingTestLanguage
This commit is contained in:
parent
69c1e29a7c
commit
522897c192
48 changed files with 329 additions and 326 deletions
|
@ -3,18 +3,38 @@
|
|||
*/
|
||||
package org.eclipse.xtext.parser.encoding;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.xtext.Constants;
|
||||
|
||||
import com.google.inject.Binder;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.name.Names;
|
||||
import java.util.Properties;
|
||||
import org.eclipse.xtext.Constants;
|
||||
import org.eclipse.xtext.IGrammarAccess;
|
||||
import org.eclipse.xtext.parser.IParser;
|
||||
import org.eclipse.xtext.parser.ITokenToStringConverter;
|
||||
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
|
||||
import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter;
|
||||
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
|
||||
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
|
||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||
import org.eclipse.xtext.parser.antlr.LexerBindings;
|
||||
import org.eclipse.xtext.parser.antlr.LexerProvider;
|
||||
import org.eclipse.xtext.parser.encoding.parser.antlr.EncodingTestLanguageAntlrTokenFileProvider;
|
||||
import org.eclipse.xtext.parser.encoding.parser.antlr.EncodingTestLanguageParser;
|
||||
import org.eclipse.xtext.parser.encoding.parser.antlr.internal.InternalEncodingTestLanguageLexer;
|
||||
import org.eclipse.xtext.parser.encoding.serializer.EncodingTestLanguageSemanticSequencer;
|
||||
import org.eclipse.xtext.parser.encoding.serializer.EncodingTestLanguageSyntacticSequencer;
|
||||
import org.eclipse.xtext.parser.encoding.services.EncodingTestLanguageGrammarAccess;
|
||||
import org.eclipse.xtext.serializer.ISerializer;
|
||||
import org.eclipse.xtext.serializer.impl.Serializer;
|
||||
import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
|
||||
import org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer;
|
||||
import org.eclipse.xtext.service.DefaultRuntimeModule;
|
||||
|
||||
/**
|
||||
* Manual modifications go to {org.eclipse.xtext.parser.encoding.EncodingTestLanguageRuntimeModule}
|
||||
* Manual modifications go to {@link EncodingTestLanguageRuntimeModule}.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public abstract class AbstractEncodingTestLanguageRuntimeModule extends org.eclipse.xtext.service.DefaultRuntimeModule {
|
||||
public abstract class AbstractEncodingTestLanguageRuntimeModule extends DefaultRuntimeModule {
|
||||
|
||||
protected Properties properties = null;
|
||||
|
||||
|
@ -33,64 +53,66 @@ public abstract class AbstractEncodingTestLanguageRuntimeModule extends org.ecli
|
|||
binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("encodingtestlanguage");
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.IParser> bindIParser() {
|
||||
return org.eclipse.xtext.parser.encoding.parser.antlr.EncodingTestLanguageParser.class;
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends IParser> bindIParser() {
|
||||
return EncodingTestLanguageParser.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() {
|
||||
return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class;
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends ITokenToStringConverter> bindITokenToStringConverter() {
|
||||
return AntlrTokenToStringConverter.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
|
||||
return org.eclipse.xtext.parser.encoding.parser.antlr.EncodingTestLanguageAntlrTokenFileProvider.class;
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
|
||||
return EncodingTestLanguageAntlrTokenFileProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
|
||||
return org.eclipse.xtext.parser.encoding.parser.antlr.internal.InternalEncodingTestLanguageLexer.class;
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends Lexer> bindLexer() {
|
||||
return InternalEncodingTestLanguageLexer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public com.google.inject.Provider<org.eclipse.xtext.parser.encoding.parser.antlr.internal.InternalEncodingTestLanguageLexer> provideInternalEncodingTestLanguageLexer() {
|
||||
return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.xtext.parser.encoding.parser.antlr.internal.InternalEncodingTestLanguageLexer.class);
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
|
||||
return AntlrTokenDefProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public void configureRuntimeLexer(com.google.inject.Binder binder) {
|
||||
binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME)).to(org.eclipse.xtext.parser.encoding.parser.antlr.internal.InternalEncodingTestLanguageLexer.class);
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Provider<InternalEncodingTestLanguageLexer> provideInternalEncodingTestLanguageLexer() {
|
||||
return LexerProvider.create(InternalEncodingTestLanguageLexer.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() {
|
||||
return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public void configureRuntimeLexer(Binder binder) {
|
||||
binder.bind(Lexer.class)
|
||||
.annotatedWith(Names.named(LexerBindings.RUNTIME))
|
||||
.to(InternalEncodingTestLanguageLexer.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
|
||||
public java.lang.ClassLoader bindClassLoaderToInstance() {
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2
|
||||
public ClassLoader bindClassLoaderToInstance() {
|
||||
return getClass().getClassLoader();
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
|
||||
public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
|
||||
return org.eclipse.xtext.parser.encoding.services.EncodingTestLanguageGrammarAccess.class;
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2
|
||||
public Class<? extends IGrammarAccess> bindIGrammarAccess() {
|
||||
return EncodingTestLanguageGrammarAccess.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
|
||||
public Class<? extends org.eclipse.xtext.serializer.sequencer.ISemanticSequencer> bindISemanticSequencer() {
|
||||
return org.eclipse.xtext.parser.encoding.serializer.EncodingTestLanguageSemanticSequencer.class;
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
|
||||
public Class<? extends ISemanticSequencer> bindISemanticSequencer() {
|
||||
return EncodingTestLanguageSemanticSequencer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
|
||||
public Class<? extends org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer> bindISyntacticSequencer() {
|
||||
return org.eclipse.xtext.parser.encoding.serializer.EncodingTestLanguageSyntacticSequencer.class;
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
|
||||
public Class<? extends ISyntacticSequencer> bindISyntacticSequencer() {
|
||||
return EncodingTestLanguageSyntacticSequencer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
|
||||
public Class<? extends org.eclipse.xtext.serializer.ISerializer> bindISerializer() {
|
||||
return org.eclipse.xtext.serializer.impl.Serializer.class;
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
|
||||
public Class<? extends ISerializer> bindISerializer() {
|
||||
return Serializer.class;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
eType="#//Word" containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Word">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
</ecore:EPackage>
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
|
||||
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.xtext.tests/src-gen" editDirectory="/org.eclipse.xtext.tests.edit/src"
|
||||
editorDirectory="/org.eclipse.xtext.tests.editor/src" modelPluginID="org.eclipse.xtext.tests"
|
||||
forceOverwrite="true" modelName="EncodingTestLanguage" updateClasspath="false"
|
||||
rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" complianceLevel="6.0"
|
||||
copyrightFields="false" editPluginID="org.eclipse.xtext.tests.edit" editorPluginID="org.eclipse.xtext.tests.editor"
|
||||
runtimeVersion="2.9" usedGenPackages="platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
|
||||
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="generated by Xtext" modelDirectory="/org.eclipse.xtext.tests/src-gen"
|
||||
modelPluginID="org.eclipse.xtext.tests" forceOverwrite="true" modelName="EncodingTestLanguage"
|
||||
updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
|
||||
complianceLevel="6.0" copyrightFields="false" runtimeVersion="2.9">
|
||||
<genPackages prefix="EncodingTest" basePackage="org.eclipse.xtext.parser.encoding"
|
||||
disposableProviderFactory="true" ecorePackage="EncodingTestLanguage.ecore#/">
|
||||
disposableProviderFactory="true" fileExtensions="encodingtestlanguage" ecorePackage="EncodingTestLanguage.ecore#/">
|
||||
<genClasses ecoreClass="EncodingTestLanguage.ecore#//Model">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference EncodingTestLanguage.ecore#//Model/words"/>
|
||||
</genClasses>
|
||||
|
|
|
@ -3,16 +3,19 @@
|
|||
*/
|
||||
package org.eclipse.xtext.parser.encoding;
|
||||
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
import org.eclipse.xtext.ISetup;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
|
||||
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
|
||||
import org.eclipse.xtext.ISetup;
|
||||
import org.eclipse.xtext.XtextPackage;
|
||||
import org.eclipse.xtext.parser.encoding.encodingTest.EncodingTestPackage;
|
||||
import org.eclipse.xtext.resource.IResourceFactory;
|
||||
import org.eclipse.xtext.resource.IResourceServiceProvider;
|
||||
import org.eclipse.xtext.resource.impl.BinaryGrammarResourceFactoryImpl;
|
||||
|
||||
/**
|
||||
* Generated from StandaloneSetup.xpt!
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class EncodingTestLanguageStandaloneSetupGenerated implements ISetup {
|
||||
|
||||
|
@ -21,15 +24,15 @@ public class EncodingTestLanguageStandaloneSetupGenerated implements ISetup {
|
|||
// register default ePackages
|
||||
if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
|
||||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
|
||||
"ecore", new org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl());
|
||||
"ecore", new EcoreResourceFactoryImpl());
|
||||
if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
|
||||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
|
||||
"xmi", new org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl());
|
||||
"xmi", new XMIResourceFactoryImpl());
|
||||
if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xtextbin"))
|
||||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
|
||||
"xtextbin", new org.eclipse.xtext.resource.impl.BinaryGrammarResourceFactoryImpl());
|
||||
if (!EPackage.Registry.INSTANCE.containsKey(org.eclipse.xtext.XtextPackage.eNS_URI))
|
||||
EPackage.Registry.INSTANCE.put(org.eclipse.xtext.XtextPackage.eNS_URI, org.eclipse.xtext.XtextPackage.eINSTANCE);
|
||||
"xtextbin", new BinaryGrammarResourceFactoryImpl());
|
||||
if (!EPackage.Registry.INSTANCE.containsKey(XtextPackage.eNS_URI))
|
||||
EPackage.Registry.INSTANCE.put(XtextPackage.eNS_URI, XtextPackage.eINSTANCE);
|
||||
|
||||
Injector injector = createInjector();
|
||||
register(injector);
|
||||
|
@ -37,19 +40,17 @@ public class EncodingTestLanguageStandaloneSetupGenerated implements ISetup {
|
|||
}
|
||||
|
||||
public Injector createInjector() {
|
||||
return Guice.createInjector(new org.eclipse.xtext.parser.encoding.EncodingTestLanguageRuntimeModule());
|
||||
return Guice.createInjector(new EncodingTestLanguageRuntimeModule());
|
||||
}
|
||||
|
||||
public void register(Injector injector) {
|
||||
|
||||
org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class);
|
||||
org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class);
|
||||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("encodingtestlanguage", resourceFactory);
|
||||
org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("encodingtestlanguage", serviceProvider);
|
||||
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
|
||||
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
|
||||
|
||||
if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2010/tmf/xtext/parser/EncodingTest")) {
|
||||
EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2010/tmf/xtext/parser/EncodingTest", org.eclipse.xtext.parser.encoding.encodingTest.EncodingTestPackage.eINSTANCE);
|
||||
}
|
||||
|
||||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("encodingtestlanguage", resourceFactory);
|
||||
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("encodingtestlanguage", serviceProvider);
|
||||
if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2010/tmf/xtext/parser/EncodingTest")) {
|
||||
EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2010/tmf/xtext/parser/EncodingTest", EncodingTestPackage.eINSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/**
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.eclipse.xtext.parser.encoding.encodingTest;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/**
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.eclipse.xtext.parser.encoding.encodingTest;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/**
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.eclipse.xtext.parser.encoding.encodingTest;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/**
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.eclipse.xtext.parser.encoding.encodingTest;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/**
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.eclipse.xtext.parser.encoding.encodingTest.impl;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/**
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.eclipse.xtext.parser.encoding.encodingTest.impl;
|
||||
|
||||
|
@ -6,7 +7,6 @@ import org.eclipse.emf.ecore.EAttribute;
|
|||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.emf.ecore.EReference;
|
||||
import org.eclipse.emf.ecore.EcorePackage;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.EPackageImpl;
|
||||
|
||||
|
@ -85,9 +85,6 @@ public class EncodingTestPackageImpl extends EPackageImpl implements EncodingTes
|
|||
|
||||
isInited = true;
|
||||
|
||||
// Initialize simple dependencies
|
||||
EcorePackage.eINSTANCE.eClass();
|
||||
|
||||
// Create package meta-data objects
|
||||
theEncodingTestPackage.createPackageContents();
|
||||
|
||||
|
@ -204,9 +201,6 @@ public class EncodingTestPackageImpl extends EPackageImpl implements EncodingTes
|
|||
setNsPrefix(eNS_PREFIX);
|
||||
setNsURI(eNS_URI);
|
||||
|
||||
// Obtain other dependent packages
|
||||
EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
|
||||
|
||||
// Create type parameters
|
||||
|
||||
// Set bounds for type parameters
|
||||
|
@ -218,7 +212,7 @@ public class EncodingTestPackageImpl extends EPackageImpl implements EncodingTes
|
|||
initEReference(getModel_Words(), this.getWord(), null, "words", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(wordEClass, Word.class, "Word", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getWord_Value(), theEcorePackage.getEString(), "value", null, 0, 1, Word.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWord_Value(), ecorePackage.getEString(), "value", null, 0, 1, Word.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
// Create resource
|
||||
createResource(eNS_URI);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/**
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.eclipse.xtext.parser.encoding.encodingTest.impl;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/**
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.eclipse.xtext.parser.encoding.encodingTest.impl;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/**
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.eclipse.xtext.parser.encoding.encodingTest.util;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/**
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.eclipse.xtext.parser.encoding.encodingTest.util;
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ import java.io.InputStream;
|
|||
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
|
||||
|
||||
public class EncodingTestLanguageAntlrTokenFileProvider implements IAntlrTokenFileProvider {
|
||||
|
||||
|
||||
@Override
|
||||
public InputStream getAntlrTokenFile() {
|
||||
ClassLoader classLoader = getClass().getClassLoader();
|
||||
return classLoader.getResourceAsStream("org/eclipse/xtext/parser/encoding/parser/antlr/internal/InternalEncodingTestLanguage.tokens");
|
||||
return classLoader.getResourceAsStream("org/eclipse/xtext/parser/encoding/parser/antlr/internal/InternalEncodingTestLanguage.tokens");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,36 +4,37 @@
|
|||
package org.eclipse.xtext.parser.encoding.parser.antlr;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import org.eclipse.xtext.parser.antlr.AbstractAntlrParser;
|
||||
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
|
||||
import org.eclipse.xtext.parser.encoding.parser.antlr.internal.InternalEncodingTestLanguageParser;
|
||||
import org.eclipse.xtext.parser.encoding.services.EncodingTestLanguageGrammarAccess;
|
||||
|
||||
public class EncodingTestLanguageParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
|
||||
|
||||
public class EncodingTestLanguageParser extends AbstractAntlrParser {
|
||||
|
||||
@Inject
|
||||
private EncodingTestLanguageGrammarAccess grammarAccess;
|
||||
|
||||
|
||||
@Override
|
||||
protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
|
||||
tokenStream.setInitialHiddenTokens("RULE_WS");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected org.eclipse.xtext.parser.encoding.parser.antlr.internal.InternalEncodingTestLanguageParser createParser(XtextTokenStream stream) {
|
||||
return new org.eclipse.xtext.parser.encoding.parser.antlr.internal.InternalEncodingTestLanguageParser(stream, getGrammarAccess());
|
||||
protected InternalEncodingTestLanguageParser createParser(XtextTokenStream stream) {
|
||||
return new InternalEncodingTestLanguageParser(stream, getGrammarAccess());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String getDefaultRuleName() {
|
||||
return "Model";
|
||||
}
|
||||
|
||||
|
||||
public EncodingTestLanguageGrammarAccess getGrammarAccess() {
|
||||
return this.grammarAccess;
|
||||
}
|
||||
|
||||
|
||||
public void setGrammarAccess(EncodingTestLanguageGrammarAccess grammarAccess) {
|
||||
this.grammarAccess = grammarAccess;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* generated by Xtext
|
||||
*/
|
||||
grammar DebugInternalEncodingTestLanguage ;
|
||||
|
||||
// Rule Model
|
||||
ruleModel :
|
||||
ruleWord*
|
||||
;
|
||||
|
||||
// Rule Word
|
||||
ruleWord :
|
||||
RULE_LEXEME
|
||||
;
|
||||
|
||||
RULE_LEXEME :
|
||||
(
|
||||
'a' .. 'z' |
|
||||
'A' .. 'Z' |
|
||||
'0' .. '9' |
|
||||
'\u00E4' |
|
||||
'\u00F6' |
|
||||
'\u00FC' |
|
||||
'\u00DF' |
|
||||
'\u00C4' |
|
||||
'\u00D6' |
|
||||
'\u00DC'
|
||||
)*
|
||||
;
|
||||
|
||||
RULE_WS :
|
||||
(
|
||||
' ' |
|
||||
'\t' |
|
||||
'\r' |
|
||||
'\n'
|
||||
)+ { skip(); }
|
||||
;
|
||||
|
||||
RULE_ANY_OTHER :
|
||||
.
|
||||
;
|
|
@ -5,7 +5,6 @@ grammar InternalEncodingTestLanguage;
|
|||
|
||||
options {
|
||||
superClass=AbstractInternalAntlrParser;
|
||||
|
||||
}
|
||||
|
||||
@lexer::header {
|
||||
|
@ -17,7 +16,7 @@ import org.eclipse.xtext.parser.antlr.Lexer;
|
|||
}
|
||||
|
||||
@parser::header {
|
||||
package org.eclipse.xtext.parser.encoding.parser.antlr.internal;
|
||||
package org.eclipse.xtext.parser.encoding.parser.antlr.internal;
|
||||
|
||||
import org.eclipse.xtext.*;
|
||||
import org.eclipse.xtext.parser.*;
|
||||
|
@ -35,116 +34,105 @@ import org.eclipse.xtext.parser.encoding.services.EncodingTestLanguageGrammarAcc
|
|||
@parser::members {
|
||||
|
||||
private EncodingTestLanguageGrammarAccess grammarAccess;
|
||||
|
||||
|
||||
public InternalEncodingTestLanguageParser(TokenStream input, EncodingTestLanguageGrammarAccess grammarAccess) {
|
||||
this(input);
|
||||
this.grammarAccess = grammarAccess;
|
||||
registerRules(grammarAccess.getGrammar());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String getFirstRuleName() {
|
||||
return "Model";
|
||||
return "Model";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected EncodingTestLanguageGrammarAccess getGrammarAccess() {
|
||||
return grammarAccess;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@rulecatch {
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
@rulecatch {
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
appendSkippedTokens();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Entry rule entryRuleModel
|
||||
entryRuleModel returns [EObject current=null]
|
||||
:
|
||||
entryRuleModel returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getModelRule()); }
|
||||
iv_ruleModel=ruleModel
|
||||
{ $current=$iv_ruleModel.current; }
|
||||
EOF
|
||||
;
|
||||
iv_ruleModel=ruleModel
|
||||
{ $current=$iv_ruleModel.current; }
|
||||
EOF;
|
||||
|
||||
// Rule Model
|
||||
ruleModel returns [EObject current=null]
|
||||
@init { enterRule();
|
||||
}
|
||||
@after { leaveRule(); }:
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getModelAccess().getWordsWordParserRuleCall_0());
|
||||
}
|
||||
lv_words_0_0=ruleWord {
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getModelRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"words",
|
||||
lv_words_0_0,
|
||||
"org.eclipse.xtext.parser.encoding.EncodingTestLanguage.Word");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
|
||||
)
|
||||
)*
|
||||
ruleModel returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getModelAccess().getWordsWordParserRuleCall_0());
|
||||
}
|
||||
lv_words_0_0=ruleWord
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getModelRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"words",
|
||||
lv_words_0_0,
|
||||
"org.eclipse.xtext.parser.encoding.EncodingTestLanguage.Word");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)*
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Entry rule entryRuleWord
|
||||
entryRuleWord returns [EObject current=null]
|
||||
:
|
||||
entryRuleWord returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getWordRule()); }
|
||||
iv_ruleWord=ruleWord
|
||||
{ $current=$iv_ruleWord.current; }
|
||||
EOF
|
||||
;
|
||||
iv_ruleWord=ruleWord
|
||||
{ $current=$iv_ruleWord.current; }
|
||||
EOF;
|
||||
|
||||
// Rule Word
|
||||
ruleWord returns [EObject current=null]
|
||||
@init { enterRule();
|
||||
}
|
||||
@after { leaveRule(); }:
|
||||
(
|
||||
(
|
||||
lv_value_0_0=RULE_LEXEME
|
||||
{
|
||||
newLeafNode(lv_value_0_0, grammarAccess.getWordAccess().getValueLEXEMETerminalRuleCall_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getWordRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"value",
|
||||
lv_value_0_0,
|
||||
"org.eclipse.xtext.parser.encoding.EncodingTestLanguage.LEXEME");
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
ruleWord returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
lv_value_0_0=RULE_LEXEME
|
||||
{
|
||||
newLeafNode(lv_value_0_0, grammarAccess.getWordAccess().getValueLEXEMETerminalRuleCall_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getWordRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"value",
|
||||
lv_value_0_0,
|
||||
"org.eclipse.xtext.parser.encoding.EncodingTestLanguage.LEXEME");
|
||||
}
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RULE_LEXEME : ('a'..'z'|'A'..'Z'|'0'..'9'|'\u00E4'|'\u00F6'|'\u00FC'|'\u00DF'|'\u00C4'|'\u00D6'|'\u00DC')*;
|
||||
|
||||
RULE_WS : (' '|'\t'|'\r'|'\n')+;
|
||||
|
||||
RULE_ANY_OTHER : .;
|
||||
|
||||
|
||||
|
|
|
@ -35,10 +35,10 @@ public class InternalEncodingTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_LEXEME;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalEncodingTestLanguage.g:144:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '\\u00E4' | '\\u00F6' | '\\u00FC' | '\\u00DF' | '\\u00C4' | '\\u00D6' | '\\u00DC' )* )
|
||||
// InternalEncodingTestLanguage.g:144:15: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '\\u00E4' | '\\u00F6' | '\\u00FC' | '\\u00DF' | '\\u00C4' | '\\u00D6' | '\\u00DC' )*
|
||||
// InternalEncodingTestLanguage.g:134:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '\\u00E4' | '\\u00F6' | '\\u00FC' | '\\u00DF' | '\\u00C4' | '\\u00D6' | '\\u00DC' )* )
|
||||
// InternalEncodingTestLanguage.g:134:15: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '\\u00E4' | '\\u00F6' | '\\u00FC' | '\\u00DF' | '\\u00C4' | '\\u00D6' | '\\u00DC' )*
|
||||
{
|
||||
// InternalEncodingTestLanguage.g:144:15: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '\\u00E4' | '\\u00F6' | '\\u00FC' | '\\u00DF' | '\\u00C4' | '\\u00D6' | '\\u00DC' )*
|
||||
// InternalEncodingTestLanguage.g:134:15: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '\\u00E4' | '\\u00F6' | '\\u00FC' | '\\u00DF' | '\\u00C4' | '\\u00D6' | '\\u00DC' )*
|
||||
loop1:
|
||||
do {
|
||||
int alt1=2;
|
||||
|
@ -87,10 +87,10 @@ public class InternalEncodingTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_WS;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalEncodingTestLanguage.g:146:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
|
||||
// InternalEncodingTestLanguage.g:146:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
// InternalEncodingTestLanguage.g:136:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
|
||||
// InternalEncodingTestLanguage.g:136:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
{
|
||||
// InternalEncodingTestLanguage.g:146:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
// InternalEncodingTestLanguage.g:136:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
int cnt2=0;
|
||||
loop2:
|
||||
do {
|
||||
|
@ -144,8 +144,8 @@ public class InternalEncodingTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_ANY_OTHER;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalEncodingTestLanguage.g:148:16: ( . )
|
||||
// InternalEncodingTestLanguage.g:148:18: .
|
||||
// InternalEncodingTestLanguage.g:138:16: ( . )
|
||||
// InternalEncodingTestLanguage.g:138:18: .
|
||||
{
|
||||
matchAny();
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.xtext.parser.encoding.parser.antlr.internal;
|
||||
package org.eclipse.xtext.parser.encoding.parser.antlr.internal;
|
||||
|
||||
import org.eclipse.xtext.*;
|
||||
import org.eclipse.xtext.parser.*;
|
||||
|
@ -47,18 +47,18 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
|
||||
|
||||
private EncodingTestLanguageGrammarAccess grammarAccess;
|
||||
|
||||
|
||||
public InternalEncodingTestLanguageParser(TokenStream input, EncodingTestLanguageGrammarAccess grammarAccess) {
|
||||
this(input);
|
||||
this.grammarAccess = grammarAccess;
|
||||
registerRules(grammarAccess.getGrammar());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String getFirstRuleName() {
|
||||
return "Model";
|
||||
return "Model";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected EncodingTestLanguageGrammarAccess getGrammarAccess() {
|
||||
return grammarAccess;
|
||||
|
@ -66,8 +66,9 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
|
||||
|
||||
|
||||
|
||||
// $ANTLR start "entryRuleModel"
|
||||
// InternalEncodingTestLanguage.g:67:1: entryRuleModel returns [EObject current=null] : iv_ruleModel= ruleModel EOF ;
|
||||
// InternalEncodingTestLanguage.g:64:1: entryRuleModel returns [EObject current=null] : iv_ruleModel= ruleModel EOF ;
|
||||
public final EObject entryRuleModel() throws RecognitionException {
|
||||
EObject current = null;
|
||||
|
||||
|
@ -75,8 +76,8 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
|
||||
|
||||
try {
|
||||
// InternalEncodingTestLanguage.g:68:2: (iv_ruleModel= ruleModel EOF )
|
||||
// InternalEncodingTestLanguage.g:69:2: iv_ruleModel= ruleModel EOF
|
||||
// InternalEncodingTestLanguage.g:64:46: (iv_ruleModel= ruleModel EOF )
|
||||
// InternalEncodingTestLanguage.g:65:2: iv_ruleModel= ruleModel EOF
|
||||
{
|
||||
newCompositeNode(grammarAccess.getModelRule());
|
||||
pushFollow(FollowSets000.FOLLOW_1);
|
||||
|
@ -90,11 +91,11 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
appendSkippedTokens();
|
||||
}
|
||||
}
|
||||
finally {
|
||||
}
|
||||
return current;
|
||||
|
@ -103,20 +104,21 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
|
||||
|
||||
// $ANTLR start "ruleModel"
|
||||
// InternalEncodingTestLanguage.g:76:1: ruleModel returns [EObject current=null] : ( (lv_words_0_0= ruleWord ) )* ;
|
||||
// InternalEncodingTestLanguage.g:71:1: ruleModel returns [EObject current=null] : ( (lv_words_0_0= ruleWord ) )* ;
|
||||
public final EObject ruleModel() throws RecognitionException {
|
||||
EObject current = null;
|
||||
|
||||
EObject lv_words_0_0 = null;
|
||||
|
||||
|
||||
enterRule();
|
||||
|
||||
|
||||
enterRule();
|
||||
|
||||
try {
|
||||
// InternalEncodingTestLanguage.g:79:28: ( ( (lv_words_0_0= ruleWord ) )* )
|
||||
// InternalEncodingTestLanguage.g:80:1: ( (lv_words_0_0= ruleWord ) )*
|
||||
// InternalEncodingTestLanguage.g:77:2: ( ( (lv_words_0_0= ruleWord ) )* )
|
||||
// InternalEncodingTestLanguage.g:78:2: ( (lv_words_0_0= ruleWord ) )*
|
||||
{
|
||||
// InternalEncodingTestLanguage.g:80:1: ( (lv_words_0_0= ruleWord ) )*
|
||||
// InternalEncodingTestLanguage.g:78:2: ( (lv_words_0_0= ruleWord ) )*
|
||||
loop1:
|
||||
do {
|
||||
int alt1=2;
|
||||
|
@ -129,30 +131,30 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
|
||||
switch (alt1) {
|
||||
case 1 :
|
||||
// InternalEncodingTestLanguage.g:81:1: (lv_words_0_0= ruleWord )
|
||||
// InternalEncodingTestLanguage.g:79:3: (lv_words_0_0= ruleWord )
|
||||
{
|
||||
// InternalEncodingTestLanguage.g:81:1: (lv_words_0_0= ruleWord )
|
||||
// InternalEncodingTestLanguage.g:82:3: lv_words_0_0= ruleWord
|
||||
// InternalEncodingTestLanguage.g:79:3: (lv_words_0_0= ruleWord )
|
||||
// InternalEncodingTestLanguage.g:80:4: lv_words_0_0= ruleWord
|
||||
{
|
||||
|
||||
newCompositeNode(grammarAccess.getModelAccess().getWordsWordParserRuleCall_0());
|
||||
|
||||
|
||||
newCompositeNode(grammarAccess.getModelAccess().getWordsWordParserRuleCall_0());
|
||||
|
||||
pushFollow(FollowSets000.FOLLOW_3);
|
||||
lv_words_0_0=ruleWord();
|
||||
|
||||
state._fsp--;
|
||||
|
||||
|
||||
if (current==null) {
|
||||
current = createModelElementForParent(grammarAccess.getModelRule());
|
||||
}
|
||||
add(
|
||||
current,
|
||||
"words",
|
||||
lv_words_0_0,
|
||||
"org.eclipse.xtext.parser.encoding.EncodingTestLanguage.Word");
|
||||
afterParserOrEnumRuleCall();
|
||||
|
||||
if (current==null) {
|
||||
current = createModelElementForParent(grammarAccess.getModelRule());
|
||||
}
|
||||
add(
|
||||
current,
|
||||
"words",
|
||||
lv_words_0_0,
|
||||
"org.eclipse.xtext.parser.encoding.EncodingTestLanguage.Word");
|
||||
afterParserOrEnumRuleCall();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -168,13 +170,15 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
|
||||
}
|
||||
|
||||
leaveRule();
|
||||
|
||||
leaveRule();
|
||||
|
||||
}
|
||||
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
appendSkippedTokens();
|
||||
}
|
||||
}
|
||||
finally {
|
||||
}
|
||||
return current;
|
||||
|
@ -183,7 +187,7 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
|
||||
|
||||
// $ANTLR start "entryRuleWord"
|
||||
// InternalEncodingTestLanguage.g:106:1: entryRuleWord returns [EObject current=null] : iv_ruleWord= ruleWord EOF ;
|
||||
// InternalEncodingTestLanguage.g:100:1: entryRuleWord returns [EObject current=null] : iv_ruleWord= ruleWord EOF ;
|
||||
public final EObject entryRuleWord() throws RecognitionException {
|
||||
EObject current = null;
|
||||
|
||||
|
@ -191,8 +195,8 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
|
||||
|
||||
try {
|
||||
// InternalEncodingTestLanguage.g:107:2: (iv_ruleWord= ruleWord EOF )
|
||||
// InternalEncodingTestLanguage.g:108:2: iv_ruleWord= ruleWord EOF
|
||||
// InternalEncodingTestLanguage.g:100:45: (iv_ruleWord= ruleWord EOF )
|
||||
// InternalEncodingTestLanguage.g:101:2: iv_ruleWord= ruleWord EOF
|
||||
{
|
||||
newCompositeNode(grammarAccess.getWordRule());
|
||||
pushFollow(FollowSets000.FOLLOW_1);
|
||||
|
@ -206,11 +210,11 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
appendSkippedTokens();
|
||||
}
|
||||
}
|
||||
finally {
|
||||
}
|
||||
return current;
|
||||
|
@ -219,38 +223,39 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
|
||||
|
||||
// $ANTLR start "ruleWord"
|
||||
// InternalEncodingTestLanguage.g:115:1: ruleWord returns [EObject current=null] : ( (lv_value_0_0= RULE_LEXEME ) ) ;
|
||||
// InternalEncodingTestLanguage.g:107:1: ruleWord returns [EObject current=null] : ( (lv_value_0_0= RULE_LEXEME ) ) ;
|
||||
public final EObject ruleWord() throws RecognitionException {
|
||||
EObject current = null;
|
||||
|
||||
Token lv_value_0_0=null;
|
||||
|
||||
enterRule();
|
||||
|
||||
|
||||
enterRule();
|
||||
|
||||
try {
|
||||
// InternalEncodingTestLanguage.g:118:28: ( ( (lv_value_0_0= RULE_LEXEME ) ) )
|
||||
// InternalEncodingTestLanguage.g:119:1: ( (lv_value_0_0= RULE_LEXEME ) )
|
||||
// InternalEncodingTestLanguage.g:113:2: ( ( (lv_value_0_0= RULE_LEXEME ) ) )
|
||||
// InternalEncodingTestLanguage.g:114:2: ( (lv_value_0_0= RULE_LEXEME ) )
|
||||
{
|
||||
// InternalEncodingTestLanguage.g:119:1: ( (lv_value_0_0= RULE_LEXEME ) )
|
||||
// InternalEncodingTestLanguage.g:120:1: (lv_value_0_0= RULE_LEXEME )
|
||||
// InternalEncodingTestLanguage.g:114:2: ( (lv_value_0_0= RULE_LEXEME ) )
|
||||
// InternalEncodingTestLanguage.g:115:3: (lv_value_0_0= RULE_LEXEME )
|
||||
{
|
||||
// InternalEncodingTestLanguage.g:120:1: (lv_value_0_0= RULE_LEXEME )
|
||||
// InternalEncodingTestLanguage.g:121:3: lv_value_0_0= RULE_LEXEME
|
||||
// InternalEncodingTestLanguage.g:115:3: (lv_value_0_0= RULE_LEXEME )
|
||||
// InternalEncodingTestLanguage.g:116:4: lv_value_0_0= RULE_LEXEME
|
||||
{
|
||||
lv_value_0_0=(Token)match(input,RULE_LEXEME,FollowSets000.FOLLOW_2);
|
||||
|
||||
newLeafNode(lv_value_0_0, grammarAccess.getWordAccess().getValueLEXEMETerminalRuleCall_0());
|
||||
|
||||
newLeafNode(lv_value_0_0, grammarAccess.getWordAccess().getValueLEXEMETerminalRuleCall_0());
|
||||
|
||||
|
||||
if (current==null) {
|
||||
current = createModelElement(grammarAccess.getWordRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
current,
|
||||
"value",
|
||||
lv_value_0_0,
|
||||
"org.eclipse.xtext.parser.encoding.EncodingTestLanguage.LEXEME");
|
||||
|
||||
if (current==null) {
|
||||
current = createModelElement(grammarAccess.getWordRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
current,
|
||||
"value",
|
||||
lv_value_0_0,
|
||||
"org.eclipse.xtext.parser.encoding.EncodingTestLanguage.LEXEME");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -260,13 +265,15 @@ public class InternalEncodingTestLanguageParser extends AbstractInternalAntlrPar
|
|||
|
||||
}
|
||||
|
||||
leaveRule();
|
||||
|
||||
leaveRule();
|
||||
|
||||
}
|
||||
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
appendSkippedTokens();
|
||||
}
|
||||
}
|
||||
finally {
|
||||
}
|
||||
return current;
|
||||
|
|
|
@ -3,20 +3,21 @@
|
|||
*/
|
||||
package org.eclipse.xtext.parser.encoding.services;
|
||||
|
||||
import com.google.inject.Singleton;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import com.google.inject.Singleton;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.xtext.*;
|
||||
import org.eclipse.xtext.Assignment;
|
||||
import org.eclipse.xtext.Grammar;
|
||||
import org.eclipse.xtext.GrammarUtil;
|
||||
import org.eclipse.xtext.ParserRule;
|
||||
import org.eclipse.xtext.RuleCall;
|
||||
import org.eclipse.xtext.TerminalRule;
|
||||
import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder;
|
||||
import org.eclipse.xtext.service.GrammarProvider;
|
||||
import org.eclipse.xtext.service.AbstractElementFinder.*;
|
||||
|
||||
|
||||
@Singleton
|
||||
public class EncodingTestLanguageGrammarAccess extends AbstractGrammarElementFinder {
|
||||
|
||||
|
||||
public class ModelElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.parser.encoding.EncodingTestLanguage.Model");
|
||||
private final Assignment cWordsAssignment = (Assignment)rule.eContents().get(1);
|
||||
|
@ -25,14 +26,13 @@ public class EncodingTestLanguageGrammarAccess extends AbstractGrammarElementFin
|
|||
//Model:
|
||||
// words+=Word*;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
|
||||
//words+=Word*
|
||||
public Assignment getWordsAssignment() { return cWordsAssignment; }
|
||||
|
||||
|
||||
//Word
|
||||
public RuleCall getWordsWordParserRuleCall_0() { return cWordsWordParserRuleCall_0; }
|
||||
}
|
||||
|
||||
public class WordElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.parser.encoding.EncodingTestLanguage.Word");
|
||||
private final Assignment cValueAssignment = (Assignment)rule.eContents().get(1);
|
||||
|
@ -41,10 +41,10 @@ public class EncodingTestLanguageGrammarAccess extends AbstractGrammarElementFin
|
|||
//Word:
|
||||
// value=LEXEME;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
|
||||
//value=LEXEME
|
||||
public Assignment getValueAssignment() { return cValueAssignment; }
|
||||
|
||||
|
||||
//LEXEME
|
||||
public RuleCall getValueLEXEMETerminalRuleCall_0() { return cValueLEXEMETerminalRuleCall_0; }
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public class EncodingTestLanguageGrammarAccess extends AbstractGrammarElementFin
|
|||
public ParserRule getModelRule() {
|
||||
return getModelAccess().getRule();
|
||||
}
|
||||
|
||||
|
||||
//Word:
|
||||
// value=LEXEME;
|
||||
public WordElements getWordAccess() {
|
||||
|
@ -110,22 +110,22 @@ public class EncodingTestLanguageGrammarAccess extends AbstractGrammarElementFin
|
|||
public ParserRule getWordRule() {
|
||||
return getWordAccess().getRule();
|
||||
}
|
||||
|
||||
|
||||
//terminal LEXEME:
|
||||
// 'a'..'z' | 'A'..'Z' | '0'..'9' | 'ä' | 'ö' | 'ü' | 'ß' | 'Ä' | 'Ö' | 'Ü'*;
|
||||
public TerminalRule getLEXEMERule() {
|
||||
return tLEXEME;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//terminal WS:
|
||||
// ' ' | '\t' | '\r' | '\n'+;
|
||||
public TerminalRule getWSRule() {
|
||||
return tWS;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//terminal ANY_OTHER:
|
||||
// .;
|
||||
public TerminalRule getANY_OTHERRule() {
|
||||
return tANY_OTHER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ Workflow {
|
|||
}
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ Workflow {
|
|||
}
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import org.eclipse.xtext.xtext.generator.*
|
|||
var projectName = "org.eclipse.xtext.tests"
|
||||
var runtimeProject = "../${projectName}"
|
||||
var lineDelimiter = '\n'
|
||||
var encoding = 'ISO-8859-1'
|
||||
|
||||
Workflow {
|
||||
bean = StandaloneSetup {
|
||||
|
@ -52,8 +51,8 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
encoding = encoding
|
||||
preferXtendStubs = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ Workflow {
|
|||
}
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ Workflow {
|
|||
}
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ Workflow {
|
|||
}
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ Workflow {
|
|||
}
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ Workflow {
|
|||
}
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Workflow {
|
|||
rootPath = ".."
|
||||
}
|
||||
code = {
|
||||
encoding = 'ISO-8859-1'
|
||||
lineDelimiter = lineDelimiter
|
||||
preferXtendStubs = false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue