diff options
author | 2018-01-13 19:33:26 +0100 | |
---|---|---|
committer | 2018-01-13 19:33:26 +0100 | |
commit | 7e50434905cbb7f5d03636033b698e17a9075e9d (patch) | |
tree | 10e0968c20ac55dae4f5dc6077f39cf9947e3cb9 /Application/hu.bme.mit.inf.dslreasoner.application.ide/src-gen/hu/bme/mit/inf/dslreasoner/application/ide/contentassist/antlr/ApplicationConfigurationParser.java | |
parent | Test and measurement runners (diff) | |
download | VIATRA-Generator-7e50434905cbb7f5d03636033b698e17a9075e9d.tar.gz VIATRA-Generator-7e50434905cbb7f5d03636033b698e17a9075e9d.tar.zst VIATRA-Generator-7e50434905cbb7f5d03636033b698e17a9075e9d.zip |
Initial commit of the configuration language and application
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application.ide/src-gen/hu/bme/mit/inf/dslreasoner/application/ide/contentassist/antlr/ApplicationConfigurationParser.java')
-rw-r--r-- | Application/hu.bme.mit.inf.dslreasoner.application.ide/src-gen/hu/bme/mit/inf/dslreasoner/application/ide/contentassist/antlr/ApplicationConfigurationParser.java | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/src-gen/hu/bme/mit/inf/dslreasoner/application/ide/contentassist/antlr/ApplicationConfigurationParser.java b/Application/hu.bme.mit.inf.dslreasoner.application.ide/src-gen/hu/bme/mit/inf/dslreasoner/application/ide/contentassist/antlr/ApplicationConfigurationParser.java new file mode 100644 index 00000000..40c2fd48 --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/src-gen/hu/bme/mit/inf/dslreasoner/application/ide/contentassist/antlr/ApplicationConfigurationParser.java | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.10.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.application.ide.contentassist.antlr; | ||
5 | |||
6 | import com.google.inject.Inject; | ||
7 | import hu.bme.mit.inf.dslreasoner.application.ide.contentassist.antlr.internal.InternalApplicationConfigurationParser; | ||
8 | import hu.bme.mit.inf.dslreasoner.application.services.ApplicationConfigurationGrammarAccess; | ||
9 | import java.util.Collection; | ||
10 | import java.util.HashMap; | ||
11 | import java.util.Map; | ||
12 | import org.antlr.runtime.RecognitionException; | ||
13 | import org.eclipse.xtext.AbstractElement; | ||
14 | import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser; | ||
15 | import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement; | ||
16 | import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser; | ||
17 | |||
18 | public class ApplicationConfigurationParser extends AbstractContentAssistParser { | ||
19 | |||
20 | @Inject | ||
21 | private ApplicationConfigurationGrammarAccess grammarAccess; | ||
22 | |||
23 | private Map<AbstractElement, String> nameMappings; | ||
24 | |||
25 | @Override | ||
26 | protected InternalApplicationConfigurationParser createParser() { | ||
27 | InternalApplicationConfigurationParser result = new InternalApplicationConfigurationParser(null); | ||
28 | result.setGrammarAccess(grammarAccess); | ||
29 | return result; | ||
30 | } | ||
31 | |||
32 | @Override | ||
33 | protected String getRuleName(AbstractElement element) { | ||
34 | if (nameMappings == null) { | ||
35 | nameMappings = new HashMap<AbstractElement, String>() { | ||
36 | private static final long serialVersionUID = 1L; | ||
37 | { | ||
38 | put(grammarAccess.getImportAccess().getAlternatives(), "rule__Import__Alternatives"); | ||
39 | put(grammarAccess.getMetamodelEntryAccess().getAlternatives(), "rule__MetamodelEntry__Alternatives"); | ||
40 | put(grammarAccess.getMetamodelAccess().getAlternatives(), "rule__Metamodel__Alternatives"); | ||
41 | put(grammarAccess.getConfigurationScriptAccess().getGroup(), "rule__ConfigurationScript__Group__0"); | ||
42 | put(grammarAccess.getEPackageImportAccess().getGroup(), "rule__EPackageImport__Group__0"); | ||
43 | put(grammarAccess.getViatraImportAccess().getGroup(), "rule__ViatraImport__Group__0"); | ||
44 | put(grammarAccess.getMetamodelSpecificationAccess().getGroup(), "rule__MetamodelSpecification__Group__0"); | ||
45 | put(grammarAccess.getMetamodelSpecificationAccess().getGroup_2(), "rule__MetamodelSpecification__Group_2__0"); | ||
46 | put(grammarAccess.getAllPackageEntryAccess().getGroup(), "rule__AllPackageEntry__Group__0"); | ||
47 | put(grammarAccess.getAllPackageEntryAccess().getGroup_2(), "rule__AllPackageEntry__Group_2__0"); | ||
48 | put(grammarAccess.getAllPackageEntryAccess().getGroup_2_3(), "rule__AllPackageEntry__Group_2_3__0"); | ||
49 | put(grammarAccess.getMetamodelElementAccess().getGroup(), "rule__MetamodelElement__Group__0"); | ||
50 | put(grammarAccess.getMetamodelElementAccess().getGroup_0(), "rule__MetamodelElement__Group_0__0"); | ||
51 | put(grammarAccess.getMetamodelElementAccess().getGroup_2(), "rule__MetamodelElement__Group_2__0"); | ||
52 | put(grammarAccess.getMetamodelDeclarationAccess().getGroup(), "rule__MetamodelDeclaration__Group__0"); | ||
53 | put(grammarAccess.getConfigurationScriptAccess().getImportsAssignment_0(), "rule__ConfigurationScript__ImportsAssignment_0"); | ||
54 | put(grammarAccess.getConfigurationScriptAccess().getCommandsAssignment_1(), "rule__ConfigurationScript__CommandsAssignment_1"); | ||
55 | put(grammarAccess.getEPackageImportAccess().getImportedPackageAssignment_2(), "rule__EPackageImport__ImportedPackageAssignment_2"); | ||
56 | put(grammarAccess.getViatraImportAccess().getImportedViatraAssignment_2(), "rule__ViatraImport__ImportedViatraAssignment_2"); | ||
57 | put(grammarAccess.getMetamodelSpecificationAccess().getEntriesAssignment_1(), "rule__MetamodelSpecification__EntriesAssignment_1"); | ||
58 | put(grammarAccess.getMetamodelSpecificationAccess().getEntriesAssignment_2_1(), "rule__MetamodelSpecification__EntriesAssignment_2_1"); | ||
59 | put(grammarAccess.getAllPackageEntryAccess().getPackageAssignment_1(), "rule__AllPackageEntry__PackageAssignment_1"); | ||
60 | put(grammarAccess.getAllPackageEntryAccess().getExclusionAssignment_2_2(), "rule__AllPackageEntry__ExclusionAssignment_2_2"); | ||
61 | put(grammarAccess.getAllPackageEntryAccess().getExclusionAssignment_2_3_1(), "rule__AllPackageEntry__ExclusionAssignment_2_3_1"); | ||
62 | put(grammarAccess.getMetamodelElementAccess().getPackageAssignment_0_0(), "rule__MetamodelElement__PackageAssignment_0_0"); | ||
63 | put(grammarAccess.getMetamodelElementAccess().getClassifierAssignment_1(), "rule__MetamodelElement__ClassifierAssignment_1"); | ||
64 | put(grammarAccess.getMetamodelElementAccess().getFeatureAssignment_2_1(), "rule__MetamodelElement__FeatureAssignment_2_1"); | ||
65 | put(grammarAccess.getMetamodelDeclarationAccess().getNameAssignment_1(), "rule__MetamodelDeclaration__NameAssignment_1"); | ||
66 | put(grammarAccess.getMetamodelDeclarationAccess().getSpecificationAssignment_2(), "rule__MetamodelDeclaration__SpecificationAssignment_2"); | ||
67 | put(grammarAccess.getMetamodelReferenceAccess().getReferredAssignment(), "rule__MetamodelReference__ReferredAssignment"); | ||
68 | } | ||
69 | }; | ||
70 | } | ||
71 | return nameMappings.get(element); | ||
72 | } | ||
73 | |||
74 | @Override | ||
75 | protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) { | ||
76 | try { | ||
77 | InternalApplicationConfigurationParser typedParser = (InternalApplicationConfigurationParser) parser; | ||
78 | typedParser.entryRuleConfigurationScript(); | ||
79 | return typedParser.getFollowElements(); | ||
80 | } catch(RecognitionException ex) { | ||
81 | throw new RuntimeException(ex); | ||
82 | } | ||
83 | } | ||
84 | |||
85 | @Override | ||
86 | protected String[] getInitialHiddenTokens() { | ||
87 | return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" }; | ||
88 | } | ||
89 | |||
90 | public ApplicationConfigurationGrammarAccess getGrammarAccess() { | ||
91 | return this.grammarAccess; | ||
92 | } | ||
93 | |||
94 | public void setGrammarAccess(ApplicationConfigurationGrammarAccess grammarAccess) { | ||
95 | this.grammarAccess = grammarAccess; | ||
96 | } | ||
97 | } | ||