Generated IndentationTestLanguages

This commit is contained in:
Miro Spönemann 2016-07-12 11:49:33 +02:00
parent 35dc492128
commit 5465c5b41c
26 changed files with 469 additions and 447 deletions

View file

@ -3,18 +3,38 @@
*/
package org.eclipse.xtext.parser.indentation;
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.indentation.parser.antlr.IndentationAwareTestLanguageAntlrTokenFileProvider;
import org.eclipse.xtext.parser.indentation.parser.antlr.IndentationAwareTestLanguageParser;
import org.eclipse.xtext.parser.indentation.parser.antlr.lexer.InternalIndentationAwareTestLanguageLexer;
import org.eclipse.xtext.parser.indentation.serializer.IndentationAwareTestLanguageSemanticSequencer;
import org.eclipse.xtext.parser.indentation.serializer.IndentationAwareTestLanguageSyntacticSequencer;
import org.eclipse.xtext.parser.indentation.services.IndentationAwareTestLanguageGrammarAccess;
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.indentation.IndentationAwareTestLanguageRuntimeModule}
* Manual modifications go to {@link IndentationAwareTestLanguageRuntimeModule}.
*/
@SuppressWarnings("all")
public abstract class AbstractIndentationAwareTestLanguageRuntimeModule extends org.eclipse.xtext.service.DefaultRuntimeModule {
public abstract class AbstractIndentationAwareTestLanguageRuntimeModule extends DefaultRuntimeModule {
protected Properties properties = null;
@ -33,64 +53,66 @@ public abstract class AbstractIndentationAwareTestLanguageRuntimeModule extends
binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("indentationawaretestlanguage");
}
// contributed by org.eclipse.xtext.generator.parser.antlr.ex.rt.AntlrGeneratorFragment
public Class<? extends org.eclipse.xtext.parser.IParser> bindIParser() {
return org.eclipse.xtext.parser.indentation.parser.antlr.IndentationAwareTestLanguageParser.class;
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IParser> bindIParser() {
return IndentationAwareTestLanguageParser.class;
}
// contributed by org.eclipse.xtext.generator.parser.antlr.ex.rt.AntlrGeneratorFragment
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.ex.rt.AntlrGeneratorFragment
public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
return org.eclipse.xtext.parser.indentation.parser.antlr.IndentationAwareTestLanguageAntlrTokenFileProvider.class;
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
return IndentationAwareTestLanguageAntlrTokenFileProvider.class;
}
// contributed by org.eclipse.xtext.generator.parser.antlr.ex.rt.AntlrGeneratorFragment
public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
return org.eclipse.xtext.parser.indentation.parser.antlr.lexer.InternalIndentationAwareTestLanguageLexer.class;
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends Lexer> bindLexer() {
return InternalIndentationAwareTestLanguageLexer.class;
}
// contributed by org.eclipse.xtext.generator.parser.antlr.ex.rt.AntlrGeneratorFragment
public com.google.inject.Provider<org.eclipse.xtext.parser.indentation.parser.antlr.lexer.InternalIndentationAwareTestLanguageLexer> provideInternalIndentationAwareTestLanguageLexer() {
return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.xtext.parser.indentation.parser.antlr.lexer.InternalIndentationAwareTestLanguageLexer.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.ex.rt.AntlrGeneratorFragment
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.indentation.parser.antlr.lexer.InternalIndentationAwareTestLanguageLexer.class);
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Provider<InternalIndentationAwareTestLanguageLexer> provideInternalIndentationAwareTestLanguageLexer() {
return LexerProvider.create(InternalIndentationAwareTestLanguageLexer.class);
}
// contributed by org.eclipse.xtext.generator.parser.antlr.ex.rt.AntlrGeneratorFragment
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(InternalIndentationAwareTestLanguageLexer.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.indentation.services.IndentationAwareTestLanguageGrammarAccess.class;
// contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2
public Class<? extends IGrammarAccess> bindIGrammarAccess() {
return IndentationAwareTestLanguageGrammarAccess.class;
}
// contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
public Class<? extends org.eclipse.xtext.serializer.sequencer.ISemanticSequencer> bindISemanticSequencer() {
return org.eclipse.xtext.parser.indentation.serializer.IndentationAwareTestLanguageSemanticSequencer.class;
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
public Class<? extends ISemanticSequencer> bindISemanticSequencer() {
return IndentationAwareTestLanguageSemanticSequencer.class;
}
// contributed by org.eclipse.xtext.generator.serializer.SerializerFragment
public Class<? extends org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer> bindISyntacticSequencer() {
return org.eclipse.xtext.parser.indentation.serializer.IndentationAwareTestLanguageSyntacticSequencer.class;
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
public Class<? extends ISyntacticSequencer> bindISyntacticSequencer() {
return IndentationAwareTestLanguageSyntacticSequencer.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;
}
}

View file

@ -7,7 +7,7 @@
eType="#//TreeNode" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="TreeNode">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
eType="#//TreeNode" containment="true"/>
</eClassifiers>

View file

@ -1,13 +1,12 @@
<?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="IndentationAwareTestLanguage" 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="IndentationAwareTestLanguage"
updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
complianceLevel="6.0" copyrightFields="false" runtimeVersion="2.9">
<genPackages prefix="IndentationAwareTestLanguage" basePackage="org.eclipse.xtext.parser.indentation"
disposableProviderFactory="true" ecorePackage="IndentationAwareTestLanguage.ecore#/">
disposableProviderFactory="true" fileExtensions="indentationawaretestlanguage"
ecorePackage="IndentationAwareTestLanguage.ecore#/">
<genClasses ecoreClass="IndentationAwareTestLanguage.ecore#//Tree">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference IndentationAwareTestLanguage.ecore#//Tree/nodes"/>
</genClasses>

View file

@ -3,22 +3,22 @@
*/
package org.eclipse.xtext.parser.indentation;
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.xtext.ISetup;
import org.eclipse.xtext.common.TerminalsStandaloneSetup;
import org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.IndentationAwareTestLanguagePackage;
import org.eclipse.xtext.resource.IResourceFactory;
import org.eclipse.xtext.resource.IResourceServiceProvider;
import com.google.inject.Guice;
import com.google.inject.Injector;
/**
* Generated from StandaloneSetup.xpt!
*/
@SuppressWarnings("all")
public class IndentationAwareTestLanguageStandaloneSetupGenerated implements ISetup {
@Override
public Injector createInjectorAndDoEMFRegistration() {
org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
TerminalsStandaloneSetup.doSetup();
Injector injector = createInjector();
register(injector);
@ -26,19 +26,17 @@ public class IndentationAwareTestLanguageStandaloneSetupGenerated implements ISe
}
public Injector createInjector() {
return Guice.createInjector(new org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguageRuntimeModule());
return Guice.createInjector(new IndentationAwareTestLanguageRuntimeModule());
}
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("indentationawaretestlanguage", resourceFactory);
org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("indentationawaretestlanguage", serviceProvider);
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2015/tmf/xtext/indentation")) {
EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2015/tmf/xtext/indentation", org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.IndentationAwareTestLanguagePackage.eINSTANCE);
}
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("indentationawaretestlanguage", resourceFactory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("indentationawaretestlanguage", serviceProvider);
if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2015/tmf/xtext/indentation")) {
EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2015/tmf/xtext/indentation", IndentationAwareTestLanguagePackage.eINSTANCE);
}
}
}

View file

@ -1,4 +1,5 @@
/**
* generated by Xtext
*/
package org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage;

View file

@ -1,4 +1,5 @@
/**
* generated by Xtext
*/
package org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage;

View file

@ -1,4 +1,5 @@
/**
* generated by Xtext
*/
package org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage;

View file

@ -1,4 +1,5 @@
/**
* generated by Xtext
*/
package org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage;

View file

@ -1,4 +1,5 @@
/**
* generated by Xtext
*/
package org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.impl;

View file

@ -1,4 +1,5 @@
/**
* generated by Xtext
*/
package org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.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 IndentationAwareTestLanguagePackageImpl extends EPackageImpl implem
isInited = true;
// Initialize simple dependencies
EcorePackage.eINSTANCE.eClass();
// Create package meta-data objects
theIndentationAwareTestLanguagePackage.createPackageContents();
@ -215,9 +212,6 @@ public class IndentationAwareTestLanguagePackageImpl extends EPackageImpl implem
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
@ -229,7 +223,7 @@ public class IndentationAwareTestLanguagePackageImpl extends EPackageImpl implem
initEReference(getTree_Nodes(), this.getTreeNode(), null, "nodes", null, 0, -1, Tree.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(treeNodeEClass, TreeNode.class, "TreeNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getTreeNode_Name(), theEcorePackage.getEString(), "name", null, 0, 1, TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getTreeNode_Name(), ecorePackage.getEString(), "name", null, 0, 1, TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getTreeNode_Children(), this.getTreeNode(), null, "children", null, 0, -1, TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource

View file

@ -1,4 +1,5 @@
/**
* generated by Xtext
*/
package org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.impl;

View file

@ -1,4 +1,5 @@
/**
* generated by Xtext
*/
package org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.impl;

View file

@ -1,4 +1,5 @@
/**
* generated by Xtext
*/
package org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.util;

View file

@ -1,4 +1,5 @@
/**
* generated by Xtext
*/
package org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.util;

View file

@ -7,10 +7,10 @@ import java.io.InputStream;
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
public class IndentationAwareTestLanguageAntlrTokenFileProvider implements IAntlrTokenFileProvider {
@Override
public InputStream getAntlrTokenFile() {
ClassLoader classLoader = getClass().getClassLoader();
return classLoader.getResourceAsStream("org/eclipse/xtext/parser/indentation/parser/antlr/internal/InternalIndentationAwareTestLanguageParser.tokens");
return classLoader.getResourceAsStream("org/eclipse/xtext/parser/indentation/parser/antlr/internal/InternalIndentationAwareTestLanguageParser.tokens");
}
}

View file

@ -4,25 +4,28 @@
package org.eclipse.xtext.parser.indentation.parser.antlr;
import com.google.inject.Inject;
import org.antlr.runtime.CharStream;
import org.antlr.runtime.TokenSource;
import org.eclipse.xtext.parser.antlr.AbstractAntlrParser;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.parser.indentation.parser.antlr.internal.InternalIndentationAwareTestLanguageParser;
import org.eclipse.xtext.parser.indentation.services.IndentationAwareTestLanguageGrammarAccess;
public class IndentationAwareTestLanguageParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
public class IndentationAwareTestLanguageParser extends AbstractAntlrParser {
@Inject
private IndentationAwareTestLanguageGrammarAccess grammarAccess;
@Override
protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
}
@Override
protected org.antlr.runtime.TokenSource createLexer(org.antlr.runtime.CharStream stream) {
return new org.eclipse.xtext.parser.indentation.parser.antlr.IndentationAwareTestLanguageTokenSource(super.createLexer(stream));
protected TokenSource createLexer(CharStream stream) {
return new IndentationAwareTestLanguageTokenSource(super.createLexer(stream));
}
/**
* Indentation aware languages do not support partial parsing since the lexer is inherently stateful.
* Override and return {@code true} if your terminal splitting is stateless.
@ -33,21 +36,20 @@ public class IndentationAwareTestLanguageParser extends org.eclipse.xtext.parser
}
@Override
protected org.eclipse.xtext.parser.indentation.parser.antlr.internal.InternalIndentationAwareTestLanguageParser createParser(XtextTokenStream stream) {
return new org.eclipse.xtext.parser.indentation.parser.antlr.internal.InternalIndentationAwareTestLanguageParser(stream, getGrammarAccess());
protected InternalIndentationAwareTestLanguageParser createParser(XtextTokenStream stream) {
return new InternalIndentationAwareTestLanguageParser(stream, getGrammarAccess());
}
@Override
protected String getDefaultRuleName() {
return "Tree";
}
public IndentationAwareTestLanguageGrammarAccess getGrammarAccess() {
return this.grammarAccess;
}
public void setGrammarAccess(IndentationAwareTestLanguageGrammarAccess grammarAccess) {
this.grammarAccess = grammarAccess;
}
}

View file

@ -6,11 +6,10 @@ parser grammar InternalIndentationAwareTestLanguageParser;
options {
tokenVocab=InternalIndentationAwareTestLanguageLexer;
superClass=AbstractInternalAntlrParser;
}
@header {
package org.eclipse.xtext.parser.indentation.parser.antlr.internal;
package org.eclipse.xtext.parser.indentation.parser.antlr.internal;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
@ -27,143 +26,140 @@ import org.eclipse.xtext.parser.indentation.services.IndentationAwareTestLanguag
@members {
private IndentationAwareTestLanguageGrammarAccess grammarAccess;
public InternalIndentationAwareTestLanguageParser(TokenStream input, IndentationAwareTestLanguageGrammarAccess grammarAccess) {
this(input);
this.grammarAccess = grammarAccess;
registerRules(grammarAccess.getGrammar());
}
@Override
protected String getFirstRuleName() {
return "Tree";
}
@Override
protected IndentationAwareTestLanguageGrammarAccess getGrammarAccess() {
return grammarAccess;
}
private IndentationAwareTestLanguageGrammarAccess grammarAccess;
public InternalIndentationAwareTestLanguageParser(TokenStream input, IndentationAwareTestLanguageGrammarAccess grammarAccess) {
this(input);
this.grammarAccess = grammarAccess;
registerRules(grammarAccess.getGrammar());
}
@Override
protected String getFirstRuleName() {
return "Tree";
}
@Override
protected IndentationAwareTestLanguageGrammarAccess getGrammarAccess() {
return grammarAccess;
}
}
@rulecatch {
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
@rulecatch {
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
}
// Entry rule entryRuleTree
entryRuleTree returns [EObject current=null]
:
entryRuleTree returns [EObject current=null]:
{ newCompositeNode(grammarAccess.getTreeRule()); }
iv_ruleTree=ruleTree
{ $current=$iv_ruleTree.current; }
EOF
;
iv_ruleTree=ruleTree
{ $current=$iv_ruleTree.current; }
EOF;
// Rule Tree
ruleTree returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
{
$current = forceCreateModelElement(
grammarAccess.getTreeAccess().getTreeAction_0(),
$current);
}
)(
(
{
newCompositeNode(grammarAccess.getTreeAccess().getNodesTreeNodeParserRuleCall_1_0());
}
lv_nodes_1_0=ruleTreeNode {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getTreeRule());
}
add(
$current,
"nodes",
lv_nodes_1_0,
"org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguage.TreeNode");
afterParserOrEnumRuleCall();
}
)
)*)
ruleTree returns [EObject current=null]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
(
{
$current = forceCreateModelElement(
grammarAccess.getTreeAccess().getTreeAction_0(),
$current);
}
)
(
(
{
newCompositeNode(grammarAccess.getTreeAccess().getNodesTreeNodeParserRuleCall_1_0());
}
lv_nodes_1_0=ruleTreeNode
{
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getTreeRule());
}
add(
$current,
"nodes",
lv_nodes_1_0,
"org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguage.TreeNode");
afterParserOrEnumRuleCall();
}
)
)*
)
;
// Entry rule entryRuleTreeNode
entryRuleTreeNode returns [EObject current=null]
:
entryRuleTreeNode returns [EObject current=null]:
{ newCompositeNode(grammarAccess.getTreeNodeRule()); }
iv_ruleTreeNode=ruleTreeNode
{ $current=$iv_ruleTreeNode.current; }
EOF
;
iv_ruleTreeNode=ruleTreeNode
{ $current=$iv_ruleTreeNode.current; }
EOF;
// Rule TreeNode
ruleTreeNode returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
((
(
lv_name_0_0=RULE_ID
{
newLeafNode(lv_name_0_0, grammarAccess.getTreeNodeAccess().getNameIDTerminalRuleCall_0_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getTreeNodeRule());
}
setWithLastConsumed(
$current,
"name",
lv_name_0_0,
"org.eclipse.xtext.common.Terminals.ID");
}
)
)(this_INDENT_1=RULE_INDENT
{
newLeafNode(this_INDENT_1, grammarAccess.getTreeNodeAccess().getINDENTTerminalRuleCall_1_0());
}
(
(
{
newCompositeNode(grammarAccess.getTreeNodeAccess().getChildrenTreeNodeParserRuleCall_1_1_0());
}
lv_children_2_0=ruleTreeNode {
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getTreeNodeRule());
}
add(
$current,
"children",
lv_children_2_0,
"org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguage.TreeNode");
afterParserOrEnumRuleCall();
}
)
)*this_DEDENT_3=RULE_DEDENT
{
newLeafNode(this_DEDENT_3, grammarAccess.getTreeNodeAccess().getDEDENTTerminalRuleCall_1_2());
}
)?)
ruleTreeNode returns [EObject current=null]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
(
(
lv_name_0_0=RULE_ID
{
newLeafNode(lv_name_0_0, grammarAccess.getTreeNodeAccess().getNameIDTerminalRuleCall_0_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getTreeNodeRule());
}
setWithLastConsumed(
$current,
"name",
lv_name_0_0,
"org.eclipse.xtext.common.Terminals.ID");
}
)
)
(
this_INDENT_1=RULE_INDENT
{
newLeafNode(this_INDENT_1, grammarAccess.getTreeNodeAccess().getINDENTTerminalRuleCall_1_0());
}
(
(
{
newCompositeNode(grammarAccess.getTreeNodeAccess().getChildrenTreeNodeParserRuleCall_1_1_0());
}
lv_children_2_0=ruleTreeNode
{
if ($current==null) {
$current = createModelElementForParent(grammarAccess.getTreeNodeRule());
}
add(
$current,
"children",
lv_children_2_0,
"org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguage.TreeNode");
afterParserOrEnumRuleCall();
}
)
)*
this_DEDENT_3=RULE_DEDENT
{
newLeafNode(this_DEDENT_3, grammarAccess.getTreeNodeAccess().getDEDENTTerminalRuleCall_1_2());
}
)?
)
;

View file

@ -1,4 +1,4 @@
package org.eclipse.xtext.parser.indentation.parser.antlr.internal;
package org.eclipse.xtext.parser.indentation.parser.antlr.internal;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
@ -52,29 +52,29 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
private IndentationAwareTestLanguageGrammarAccess grammarAccess;
public InternalIndentationAwareTestLanguageParser(TokenStream input, IndentationAwareTestLanguageGrammarAccess grammarAccess) {
this(input);
this.grammarAccess = grammarAccess;
registerRules(grammarAccess.getGrammar());
}
@Override
protected String getFirstRuleName() {
return "Tree";
}
@Override
protected IndentationAwareTestLanguageGrammarAccess getGrammarAccess() {
return grammarAccess;
}
private IndentationAwareTestLanguageGrammarAccess grammarAccess;
public InternalIndentationAwareTestLanguageParser(TokenStream input, IndentationAwareTestLanguageGrammarAccess grammarAccess) {
this(input);
this.grammarAccess = grammarAccess;
registerRules(grammarAccess.getGrammar());
}
@Override
protected String getFirstRuleName() {
return "Tree";
}
@Override
protected IndentationAwareTestLanguageGrammarAccess getGrammarAccess() {
return grammarAccess;
}
// $ANTLR start "entryRuleTree"
// InternalIndentationAwareTestLanguageParser.g:61:1: entryRuleTree returns [EObject current=null] : iv_ruleTree= ruleTree EOF ;
// InternalIndentationAwareTestLanguageParser.g:57:1: entryRuleTree returns [EObject current=null] : iv_ruleTree= ruleTree EOF ;
public final EObject entryRuleTree() throws RecognitionException {
EObject current = null;
@ -82,8 +82,8 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
try {
// InternalIndentationAwareTestLanguageParser.g:62:2: (iv_ruleTree= ruleTree EOF )
// InternalIndentationAwareTestLanguageParser.g:63:2: iv_ruleTree= ruleTree EOF
// InternalIndentationAwareTestLanguageParser.g:57:45: (iv_ruleTree= ruleTree EOF )
// InternalIndentationAwareTestLanguageParser.g:58:2: iv_ruleTree= ruleTree EOF
{
newCompositeNode(grammarAccess.getTreeRule());
pushFollow(FollowSets000.FOLLOW_1);
@ -97,11 +97,11 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
@ -110,34 +110,35 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
// $ANTLR start "ruleTree"
// InternalIndentationAwareTestLanguageParser.g:70:1: ruleTree returns [EObject current=null] : ( () ( (lv_nodes_1_0= ruleTreeNode ) )* ) ;
// InternalIndentationAwareTestLanguageParser.g:64:1: ruleTree returns [EObject current=null] : ( () ( (lv_nodes_1_0= ruleTreeNode ) )* ) ;
public final EObject ruleTree() throws RecognitionException {
EObject current = null;
EObject lv_nodes_1_0 = null;
enterRule();
enterRule();
try {
// InternalIndentationAwareTestLanguageParser.g:73:28: ( ( () ( (lv_nodes_1_0= ruleTreeNode ) )* ) )
// InternalIndentationAwareTestLanguageParser.g:74:1: ( () ( (lv_nodes_1_0= ruleTreeNode ) )* )
// InternalIndentationAwareTestLanguageParser.g:70:2: ( ( () ( (lv_nodes_1_0= ruleTreeNode ) )* ) )
// InternalIndentationAwareTestLanguageParser.g:71:2: ( () ( (lv_nodes_1_0= ruleTreeNode ) )* )
{
// InternalIndentationAwareTestLanguageParser.g:74:1: ( () ( (lv_nodes_1_0= ruleTreeNode ) )* )
// InternalIndentationAwareTestLanguageParser.g:74:2: () ( (lv_nodes_1_0= ruleTreeNode ) )*
// InternalIndentationAwareTestLanguageParser.g:71:2: ( () ( (lv_nodes_1_0= ruleTreeNode ) )* )
// InternalIndentationAwareTestLanguageParser.g:72:3: () ( (lv_nodes_1_0= ruleTreeNode ) )*
{
// InternalIndentationAwareTestLanguageParser.g:74:2: ()
// InternalIndentationAwareTestLanguageParser.g:75:5:
// InternalIndentationAwareTestLanguageParser.g:72:3: ()
// InternalIndentationAwareTestLanguageParser.g:73:4:
{
current = forceCreateModelElement(
grammarAccess.getTreeAccess().getTreeAction_0(),
current);
current = forceCreateModelElement(
grammarAccess.getTreeAccess().getTreeAction_0(),
current);
}
// InternalIndentationAwareTestLanguageParser.g:80:2: ( (lv_nodes_1_0= ruleTreeNode ) )*
// InternalIndentationAwareTestLanguageParser.g:79:3: ( (lv_nodes_1_0= ruleTreeNode ) )*
loop1:
do {
int alt1=2;
@ -150,30 +151,30 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
switch (alt1) {
case 1 :
// InternalIndentationAwareTestLanguageParser.g:81:1: (lv_nodes_1_0= ruleTreeNode )
// InternalIndentationAwareTestLanguageParser.g:80:4: (lv_nodes_1_0= ruleTreeNode )
{
// InternalIndentationAwareTestLanguageParser.g:81:1: (lv_nodes_1_0= ruleTreeNode )
// InternalIndentationAwareTestLanguageParser.g:82:3: lv_nodes_1_0= ruleTreeNode
// InternalIndentationAwareTestLanguageParser.g:80:4: (lv_nodes_1_0= ruleTreeNode )
// InternalIndentationAwareTestLanguageParser.g:81:5: lv_nodes_1_0= ruleTreeNode
{
newCompositeNode(grammarAccess.getTreeAccess().getNodesTreeNodeParserRuleCall_1_0());
newCompositeNode(grammarAccess.getTreeAccess().getNodesTreeNodeParserRuleCall_1_0());
pushFollow(FollowSets000.FOLLOW_3);
lv_nodes_1_0=ruleTreeNode();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getTreeRule());
}
add(
current,
"nodes",
lv_nodes_1_0,
"org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguage.TreeNode");
afterParserOrEnumRuleCall();
if (current==null) {
current = createModelElementForParent(grammarAccess.getTreeRule());
}
add(
current,
"nodes",
lv_nodes_1_0,
"org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguage.TreeNode");
afterParserOrEnumRuleCall();
}
@ -192,13 +193,15 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
}
leaveRule();
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
@ -207,7 +210,7 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
// $ANTLR start "entryRuleTreeNode"
// InternalIndentationAwareTestLanguageParser.g:106:1: entryRuleTreeNode returns [EObject current=null] : iv_ruleTreeNode= ruleTreeNode EOF ;
// InternalIndentationAwareTestLanguageParser.g:102:1: entryRuleTreeNode returns [EObject current=null] : iv_ruleTreeNode= ruleTreeNode EOF ;
public final EObject entryRuleTreeNode() throws RecognitionException {
EObject current = null;
@ -215,8 +218,8 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
try {
// InternalIndentationAwareTestLanguageParser.g:107:2: (iv_ruleTreeNode= ruleTreeNode EOF )
// InternalIndentationAwareTestLanguageParser.g:108:2: iv_ruleTreeNode= ruleTreeNode EOF
// InternalIndentationAwareTestLanguageParser.g:102:49: (iv_ruleTreeNode= ruleTreeNode EOF )
// InternalIndentationAwareTestLanguageParser.g:103:2: iv_ruleTreeNode= ruleTreeNode EOF
{
newCompositeNode(grammarAccess.getTreeNodeRule());
pushFollow(FollowSets000.FOLLOW_1);
@ -230,11 +233,11 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
@ -243,7 +246,7 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
// $ANTLR start "ruleTreeNode"
// InternalIndentationAwareTestLanguageParser.g:115:1: ruleTreeNode returns [EObject current=null] : ( ( (lv_name_0_0= RULE_ID ) ) (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )? ) ;
// InternalIndentationAwareTestLanguageParser.g:109:1: ruleTreeNode returns [EObject current=null] : ( ( (lv_name_0_0= RULE_ID ) ) (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )? ) ;
public final EObject ruleTreeNode() throws RecognitionException {
EObject current = null;
@ -253,42 +256,43 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
EObject lv_children_2_0 = null;
enterRule();
enterRule();
try {
// InternalIndentationAwareTestLanguageParser.g:118:28: ( ( ( (lv_name_0_0= RULE_ID ) ) (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )? ) )
// InternalIndentationAwareTestLanguageParser.g:119:1: ( ( (lv_name_0_0= RULE_ID ) ) (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )? )
// InternalIndentationAwareTestLanguageParser.g:115:2: ( ( ( (lv_name_0_0= RULE_ID ) ) (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )? ) )
// InternalIndentationAwareTestLanguageParser.g:116:2: ( ( (lv_name_0_0= RULE_ID ) ) (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )? )
{
// InternalIndentationAwareTestLanguageParser.g:119:1: ( ( (lv_name_0_0= RULE_ID ) ) (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )? )
// InternalIndentationAwareTestLanguageParser.g:119:2: ( (lv_name_0_0= RULE_ID ) ) (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )?
// InternalIndentationAwareTestLanguageParser.g:116:2: ( ( (lv_name_0_0= RULE_ID ) ) (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )? )
// InternalIndentationAwareTestLanguageParser.g:117:3: ( (lv_name_0_0= RULE_ID ) ) (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )?
{
// InternalIndentationAwareTestLanguageParser.g:119:2: ( (lv_name_0_0= RULE_ID ) )
// InternalIndentationAwareTestLanguageParser.g:120:1: (lv_name_0_0= RULE_ID )
// InternalIndentationAwareTestLanguageParser.g:117:3: ( (lv_name_0_0= RULE_ID ) )
// InternalIndentationAwareTestLanguageParser.g:118:4: (lv_name_0_0= RULE_ID )
{
// InternalIndentationAwareTestLanguageParser.g:120:1: (lv_name_0_0= RULE_ID )
// InternalIndentationAwareTestLanguageParser.g:121:3: lv_name_0_0= RULE_ID
// InternalIndentationAwareTestLanguageParser.g:118:4: (lv_name_0_0= RULE_ID )
// InternalIndentationAwareTestLanguageParser.g:119:5: lv_name_0_0= RULE_ID
{
lv_name_0_0=(Token)match(input,RULE_ID,FollowSets000.FOLLOW_4);
newLeafNode(lv_name_0_0, grammarAccess.getTreeNodeAccess().getNameIDTerminalRuleCall_0_0());
newLeafNode(lv_name_0_0, grammarAccess.getTreeNodeAccess().getNameIDTerminalRuleCall_0_0());
if (current==null) {
current = createModelElement(grammarAccess.getTreeNodeRule());
}
setWithLastConsumed(
current,
"name",
lv_name_0_0,
"org.eclipse.xtext.common.Terminals.ID");
if (current==null) {
current = createModelElement(grammarAccess.getTreeNodeRule());
}
setWithLastConsumed(
current,
"name",
lv_name_0_0,
"org.eclipse.xtext.common.Terminals.ID");
}
}
// InternalIndentationAwareTestLanguageParser.g:137:2: (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )?
// InternalIndentationAwareTestLanguageParser.g:135:3: (this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT )?
int alt3=2;
int LA3_0 = input.LA(1);
@ -297,13 +301,13 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
}
switch (alt3) {
case 1 :
// InternalIndentationAwareTestLanguageParser.g:137:3: this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT
// InternalIndentationAwareTestLanguageParser.g:136:4: this_INDENT_1= RULE_INDENT ( (lv_children_2_0= ruleTreeNode ) )* this_DEDENT_3= RULE_DEDENT
{
this_INDENT_1=(Token)match(input,RULE_INDENT,FollowSets000.FOLLOW_5);
newLeafNode(this_INDENT_1, grammarAccess.getTreeNodeAccess().getINDENTTerminalRuleCall_1_0());
// InternalIndentationAwareTestLanguageParser.g:141:1: ( (lv_children_2_0= ruleTreeNode ) )*
newLeafNode(this_INDENT_1, grammarAccess.getTreeNodeAccess().getINDENTTerminalRuleCall_1_0());
// InternalIndentationAwareTestLanguageParser.g:140:4: ( (lv_children_2_0= ruleTreeNode ) )*
loop2:
do {
int alt2=2;
@ -316,30 +320,30 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
switch (alt2) {
case 1 :
// InternalIndentationAwareTestLanguageParser.g:142:1: (lv_children_2_0= ruleTreeNode )
// InternalIndentationAwareTestLanguageParser.g:141:5: (lv_children_2_0= ruleTreeNode )
{
// InternalIndentationAwareTestLanguageParser.g:142:1: (lv_children_2_0= ruleTreeNode )
// InternalIndentationAwareTestLanguageParser.g:143:3: lv_children_2_0= ruleTreeNode
// InternalIndentationAwareTestLanguageParser.g:141:5: (lv_children_2_0= ruleTreeNode )
// InternalIndentationAwareTestLanguageParser.g:142:6: lv_children_2_0= ruleTreeNode
{
newCompositeNode(grammarAccess.getTreeNodeAccess().getChildrenTreeNodeParserRuleCall_1_1_0());
newCompositeNode(grammarAccess.getTreeNodeAccess().getChildrenTreeNodeParserRuleCall_1_1_0());
pushFollow(FollowSets000.FOLLOW_5);
lv_children_2_0=ruleTreeNode();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getTreeNodeRule());
}
add(
current,
"children",
lv_children_2_0,
"org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguage.TreeNode");
afterParserOrEnumRuleCall();
if (current==null) {
current = createModelElementForParent(grammarAccess.getTreeNodeRule());
}
add(
current,
"children",
lv_children_2_0,
"org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguage.TreeNode");
afterParserOrEnumRuleCall();
}
@ -353,9 +357,9 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
} while (true);
this_DEDENT_3=(Token)match(input,RULE_DEDENT,FollowSets000.FOLLOW_2);
newLeafNode(this_DEDENT_3, grammarAccess.getTreeNodeAccess().getDEDENTTerminalRuleCall_1_2());
newLeafNode(this_DEDENT_3, grammarAccess.getTreeNodeAccess().getDEDENTTerminalRuleCall_1_2());
}
break;
@ -368,13 +372,15 @@ public class InternalIndentationAwareTestLanguageParser extends AbstractInternal
}
leaveRule();
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;

View file

@ -1,10 +1,8 @@
/*
* generated by Xtext
*/
lexer grammar InternalIndentationAwareTestLanguageLexer;
@header {
package org.eclipse.xtext.parser.indentation.parser.antlr.lexer;
@ -13,10 +11,7 @@ package org.eclipse.xtext.parser.indentation.parser.antlr.lexer;
import org.eclipse.xtext.parser.antlr.Lexer;
}
// Rules duplicated to allow inter-rule references
RULE_SL_COMMENT : '//' ~(('\n'|'\r'))*;
@ -35,6 +30,3 @@ RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
RULE_WS : (' '|'\t'|'\r'|'\n')+;
RULE_ANY_OTHER : .;

View file

@ -41,12 +41,12 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
try {
int _type = RULE_SL_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalIndentationAwareTestLanguageLexer.g:21:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* )
// InternalIndentationAwareTestLanguageLexer.g:21:19: '//' (~ ( ( '\\n' | '\\r' ) ) )*
// InternalIndentationAwareTestLanguageLexer.g:16:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* )
// InternalIndentationAwareTestLanguageLexer.g:16:19: '//' (~ ( ( '\\n' | '\\r' ) ) )*
{
match("//");
// InternalIndentationAwareTestLanguageLexer.g:21:24: (~ ( ( '\\n' | '\\r' ) ) )*
// InternalIndentationAwareTestLanguageLexer.g:16:24: (~ ( ( '\\n' | '\\r' ) ) )*
loop1:
do {
int alt1=2;
@ -59,7 +59,7 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
switch (alt1) {
case 1 :
// InternalIndentationAwareTestLanguageLexer.g:21:24: ~ ( ( '\\n' | '\\r' ) )
// InternalIndentationAwareTestLanguageLexer.g:16: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)<='\uFFFF') ) {
input.consume();
@ -93,8 +93,8 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
// $ANTLR start "RULE_INDENT"
public final void mRULE_INDENT() throws RecognitionException {
try {
// InternalIndentationAwareTestLanguageLexer.g:23:22: ()
// InternalIndentationAwareTestLanguageLexer.g:23:24:
// InternalIndentationAwareTestLanguageLexer.g:18:22: ()
// InternalIndentationAwareTestLanguageLexer.g:18:24:
{
}
@ -107,8 +107,8 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
// $ANTLR start "RULE_DEDENT"
public final void mRULE_DEDENT() throws RecognitionException {
try {
// InternalIndentationAwareTestLanguageLexer.g:25:22: ()
// InternalIndentationAwareTestLanguageLexer.g:25:24:
// InternalIndentationAwareTestLanguageLexer.g:20:22: ()
// InternalIndentationAwareTestLanguageLexer.g:20:24:
{
}
@ -123,10 +123,10 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
try {
int _type = RULE_ID;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalIndentationAwareTestLanguageLexer.g:27:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
// InternalIndentationAwareTestLanguageLexer.g:27:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
// InternalIndentationAwareTestLanguageLexer.g:22:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
// InternalIndentationAwareTestLanguageLexer.g:22:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
{
// InternalIndentationAwareTestLanguageLexer.g:27:11: ( '^' )?
// InternalIndentationAwareTestLanguageLexer.g:22:11: ( '^' )?
int alt2=2;
int LA2_0 = input.LA(1);
@ -135,7 +135,7 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
}
switch (alt2) {
case 1 :
// InternalIndentationAwareTestLanguageLexer.g:27:11: '^'
// InternalIndentationAwareTestLanguageLexer.g:22:11: '^'
{
match('^');
@ -153,7 +153,7 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
recover(mse);
throw mse;}
// InternalIndentationAwareTestLanguageLexer.g:27:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
// InternalIndentationAwareTestLanguageLexer.g:22:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
loop3:
do {
int alt3=2;
@ -202,10 +202,10 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
try {
int _type = RULE_INT;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalIndentationAwareTestLanguageLexer.g:29:10: ( ( '0' .. '9' )+ )
// InternalIndentationAwareTestLanguageLexer.g:29:12: ( '0' .. '9' )+
// InternalIndentationAwareTestLanguageLexer.g:24:10: ( ( '0' .. '9' )+ )
// InternalIndentationAwareTestLanguageLexer.g:24:12: ( '0' .. '9' )+
{
// InternalIndentationAwareTestLanguageLexer.g:29:12: ( '0' .. '9' )+
// InternalIndentationAwareTestLanguageLexer.g:24:12: ( '0' .. '9' )+
int cnt4=0;
loop4:
do {
@ -219,7 +219,7 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
switch (alt4) {
case 1 :
// InternalIndentationAwareTestLanguageLexer.g:29:13: '0' .. '9'
// InternalIndentationAwareTestLanguageLexer.g:24:13: '0' .. '9'
{
matchRange('0','9');
@ -251,10 +251,10 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
try {
int _type = RULE_STRING;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalIndentationAwareTestLanguageLexer.g:31:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
// InternalIndentationAwareTestLanguageLexer.g:31:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
// InternalIndentationAwareTestLanguageLexer.g:26:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
// InternalIndentationAwareTestLanguageLexer.g:26:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
{
// InternalIndentationAwareTestLanguageLexer.g:31:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
// InternalIndentationAwareTestLanguageLexer.g:26:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
int alt7=2;
int LA7_0 = input.LA(1);
@ -272,10 +272,10 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
}
switch (alt7) {
case 1 :
// InternalIndentationAwareTestLanguageLexer.g:31:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
// InternalIndentationAwareTestLanguageLexer.g:26:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
{
match('\"');
// InternalIndentationAwareTestLanguageLexer.g:31:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
// InternalIndentationAwareTestLanguageLexer.g:26:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
loop5:
do {
int alt5=3;
@ -291,7 +291,7 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
switch (alt5) {
case 1 :
// InternalIndentationAwareTestLanguageLexer.g:31:21: '\\\\' .
// InternalIndentationAwareTestLanguageLexer.g:26:21: '\\\\' .
{
match('\\');
matchAny();
@ -299,7 +299,7 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
}
break;
case 2 :
// InternalIndentationAwareTestLanguageLexer.g:31:28: ~ ( ( '\\\\' | '\"' ) )
// InternalIndentationAwareTestLanguageLexer.g:26:28: ~ ( ( '\\\\' | '\"' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
@ -324,10 +324,10 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
}
break;
case 2 :
// InternalIndentationAwareTestLanguageLexer.g:31:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
// InternalIndentationAwareTestLanguageLexer.g:26:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
{
match('\'');
// InternalIndentationAwareTestLanguageLexer.g:31:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
// InternalIndentationAwareTestLanguageLexer.g:26:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
loop6:
do {
int alt6=3;
@ -343,7 +343,7 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
switch (alt6) {
case 1 :
// InternalIndentationAwareTestLanguageLexer.g:31:54: '\\\\' .
// InternalIndentationAwareTestLanguageLexer.g:26:54: '\\\\' .
{
match('\\');
matchAny();
@ -351,7 +351,7 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
}
break;
case 2 :
// InternalIndentationAwareTestLanguageLexer.g:31:61: ~ ( ( '\\\\' | '\\'' ) )
// InternalIndentationAwareTestLanguageLexer.g:26:61: ~ ( ( '\\\\' | '\\'' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
@ -394,12 +394,12 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
try {
int _type = RULE_ML_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalIndentationAwareTestLanguageLexer.g:33:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
// InternalIndentationAwareTestLanguageLexer.g:33:19: '/*' ( options {greedy=false; } : . )* '*/'
// InternalIndentationAwareTestLanguageLexer.g:28:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
// InternalIndentationAwareTestLanguageLexer.g:28:19: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*");
// InternalIndentationAwareTestLanguageLexer.g:33:24: ( options {greedy=false; } : . )*
// InternalIndentationAwareTestLanguageLexer.g:28:24: ( options {greedy=false; } : . )*
loop8:
do {
int alt8=2;
@ -424,7 +424,7 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
switch (alt8) {
case 1 :
// InternalIndentationAwareTestLanguageLexer.g:33:52: .
// InternalIndentationAwareTestLanguageLexer.g:28:52: .
{
matchAny();
@ -454,10 +454,10 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
try {
int _type = RULE_WS;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalIndentationAwareTestLanguageLexer.g:35:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
// InternalIndentationAwareTestLanguageLexer.g:35:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
// InternalIndentationAwareTestLanguageLexer.g:30:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
// InternalIndentationAwareTestLanguageLexer.g:30:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
{
// InternalIndentationAwareTestLanguageLexer.g:35:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
// InternalIndentationAwareTestLanguageLexer.g:30:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
int cnt9=0;
loop9:
do {
@ -511,8 +511,8 @@ public class InternalIndentationAwareTestLanguageLexer extends Lexer {
try {
int _type = RULE_ANY_OTHER;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalIndentationAwareTestLanguageLexer.g:37:16: ( . )
// InternalIndentationAwareTestLanguageLexer.g:37:18: .
// InternalIndentationAwareTestLanguageLexer.g:32:16: ( . )
// InternalIndentationAwareTestLanguageLexer.g:32:18: .
{
matchAny();

View file

@ -3,21 +3,24 @@
*/
package org.eclipse.xtext.parser.indentation.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.service.GrammarProvider;
import org.eclipse.xtext.service.AbstractElementFinder.*;
import org.eclipse.xtext.Action;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.Grammar;
import org.eclipse.xtext.GrammarUtil;
import org.eclipse.xtext.Group;
import org.eclipse.xtext.ParserRule;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.TerminalRule;
import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder;
import org.eclipse.xtext.service.GrammarProvider;
@Singleton
public class IndentationAwareTestLanguageGrammarAccess extends AbstractGrammarElementFinder {
public class TreeElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguage.Tree");
private final Group cGroup = (Group)rule.eContents().get(1);
@ -28,20 +31,19 @@ public class IndentationAwareTestLanguageGrammarAccess extends AbstractGrammarEl
//Tree:
// {Tree} nodes+=TreeNode*;
@Override public ParserRule getRule() { return rule; }
//{Tree} nodes+=TreeNode*
public Group getGroup() { return cGroup; }
//{Tree}
public Action getTreeAction_0() { return cTreeAction_0; }
//nodes+=TreeNode*
public Assignment getNodesAssignment_1() { return cNodesAssignment_1; }
//TreeNode
public RuleCall getNodesTreeNodeParserRuleCall_1_0() { return cNodesTreeNodeParserRuleCall_1_0; }
}
public class TreeNodeElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguage.TreeNode");
private final Group cGroup = (Group)rule.eContents().get(1);
@ -58,28 +60,28 @@ public class IndentationAwareTestLanguageGrammarAccess extends AbstractGrammarEl
// children+=TreeNode*
// DEDENT)?;
@Override public ParserRule getRule() { return rule; }
//name=ID (INDENT children+=TreeNode* DEDENT)?
public Group getGroup() { return cGroup; }
//name=ID
public Assignment getNameAssignment_0() { return cNameAssignment_0; }
//ID
public RuleCall getNameIDTerminalRuleCall_0_0() { return cNameIDTerminalRuleCall_0_0; }
//(INDENT children+=TreeNode* DEDENT)?
public Group getGroup_1() { return cGroup_1; }
//INDENT
public RuleCall getINDENTTerminalRuleCall_1_0() { return cINDENTTerminalRuleCall_1_0; }
//children+=TreeNode*
public Assignment getChildrenAssignment_1_1() { return cChildrenAssignment_1_1; }
//TreeNode
public RuleCall getChildrenTreeNodeParserRuleCall_1_1_0() { return cChildrenTreeNodeParserRuleCall_1_1_0; }
//DEDENT
public RuleCall getDEDENTTerminalRuleCall_1_2() { return cDEDENTTerminalRuleCall_1_2; }
}
@ -92,12 +94,12 @@ public class IndentationAwareTestLanguageGrammarAccess extends AbstractGrammarEl
private final TerminalRule tDEDENT;
private final Grammar grammar;
private final TerminalsGrammarAccess gaTerminals;
@Inject
public IndentationAwareTestLanguageGrammarAccess(GrammarProvider grammarProvider,
TerminalsGrammarAccess gaTerminals) {
TerminalsGrammarAccess gaTerminals) {
this.grammar = internalFindGrammar(grammarProvider);
this.gaTerminals = gaTerminals;
this.pTree = new TreeElements();
@ -128,7 +130,7 @@ public class IndentationAwareTestLanguageGrammarAccess extends AbstractGrammarEl
return grammar;
}
public TerminalsGrammarAccess getTerminalsGrammarAccess() {
return gaTerminals;
}
@ -143,7 +145,7 @@ public class IndentationAwareTestLanguageGrammarAccess extends AbstractGrammarEl
public ParserRule getTreeRule() {
return getTreeAccess().getRule();
}
//TreeNode:
// name=ID (INDENT
// children+=TreeNode*
@ -155,59 +157,59 @@ public class IndentationAwareTestLanguageGrammarAccess extends AbstractGrammarEl
public ParserRule getTreeNodeRule() {
return getTreeNodeAccess().getRule();
}
//terminal SL_COMMENT:
// '//' !('\n' | '\r')*;
public TerminalRule getSL_COMMENTRule() {
return tSL_COMMENT;
}
}
//terminal INDENT:
// 'synthetic:INDENT';
public TerminalRule getINDENTRule() {
return tINDENT;
}
}
//terminal DEDENT:
// 'synthetic:DEDENT';
public TerminalRule getDEDENTRule() {
return tDEDENT;
}
}
//terminal ID:
// '^'? ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9')*;
public TerminalRule getIDRule() {
return gaTerminals.getIDRule();
}
}
//terminal INT returns ecore::EInt:
// '0'..'9'+;
public TerminalRule getINTRule() {
return gaTerminals.getINTRule();
}
}
//terminal STRING:
// '"' ('\\' . | !('\\' | '"'))* '"' |
// "'" ('\\' . | !('\\' | "'"))* "'";
public TerminalRule getSTRINGRule() {
return gaTerminals.getSTRINGRule();
}
}
//terminal ML_COMMENT:
// '/ *'->'* /';
public TerminalRule getML_COMMENTRule() {
return gaTerminals.getML_COMMENTRule();
}
}
//terminal WS:
// ' ' | '\t' | '\r' | '\n'+;
public TerminalRule getWSRule() {
return gaTerminals.getWSRule();
}
}
//terminal ANY_OTHER:
// .;
public TerminalRule getANY_OTHERRule() {
return gaTerminals.getANY_OTHERRule();
}
}
}

View file

@ -1,16 +1,17 @@
/*
* generated by Xtext
*/
package org.eclipse.xtext.parser.indentation;
package org.eclipse.xtext.parser.indentation.tests;
import com.google.inject.Guice;
import com.google.inject.Injector;
import org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguageRuntimeModule;
import org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguageStandaloneSetup;
import org.eclipse.xtext.testing.GlobalRegistries;
import org.eclipse.xtext.testing.GlobalRegistries.GlobalStateMemento;
import org.eclipse.xtext.testing.IInjectorProvider;
import org.eclipse.xtext.testing.IRegistryConfigurator;
import com.google.inject.Guice;
import com.google.inject.Injector;
public class IndentationAwareTestLanguageInjectorProvider implements IInjectorProvider, IRegistryConfigurator {
protected GlobalStateMemento stateBeforeInjectorCreation;
@ -22,8 +23,7 @@ public class IndentationAwareTestLanguageInjectorProvider implements IInjectorPr
}
@Override
public Injector getInjector()
{
public Injector getInjector() {
if (injector == null) {
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
this.injector = internalCreateInjector();

View file

@ -12,6 +12,7 @@ import org.eclipse.xtend2.lib.StringConcatenation
import org.eclipse.xtext.nodemodel.impl.InvariantChecker
import org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.Tree
import org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.TreeNode
import org.eclipse.xtext.parser.indentation.tests.IndentationAwareTestLanguageInjectorProvider
import org.eclipse.xtext.resource.XtextResource
import org.eclipse.xtext.testing.InjectWith
import org.eclipse.xtext.testing.XtextRunner

View file

@ -9,6 +9,7 @@ package org.eclipse.xtext.parser.indentation
import com.google.inject.Inject
import org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.Tree
import org.eclipse.xtext.parser.indentation.tests.IndentationAwareTestLanguageInjectorProvider
import org.eclipse.xtext.resource.XtextResource
import org.eclipse.xtext.testing.InjectWith
import org.eclipse.xtext.testing.XtextRunner

View file

@ -14,9 +14,9 @@ import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.nodemodel.ICompositeNode;
import org.eclipse.xtext.nodemodel.impl.InvariantChecker;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguageInjectorProvider;
import org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.Tree;
import org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.TreeNode;
import org.eclipse.xtext.parser.indentation.tests.IndentationAwareTestLanguageInjectorProvider;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.testing.InjectWith;
import org.eclipse.xtext.testing.XtextRunner;

View file

@ -12,8 +12,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguageInjectorProvider;
import org.eclipse.xtext.parser.indentation.indentationAwareTestLanguage.Tree;
import org.eclipse.xtext.parser.indentation.tests.IndentationAwareTestLanguageInjectorProvider;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.testing.InjectWith;
import org.eclipse.xtext.testing.XtextRunner;