diff options
Diffstat (limited to 'Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/serializer/AlloyLanguageSyntacticSequencer.java')
-rw-r--r-- | Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/serializer/AlloyLanguageSyntacticSequencer.java | 214 |
1 files changed, 214 insertions, 0 deletions
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/serializer/AlloyLanguageSyntacticSequencer.java b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/serializer/AlloyLanguageSyntacticSequencer.java new file mode 100644 index 00000000..4c1eaf02 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/serializer/AlloyLanguageSyntacticSequencer.java | |||
@@ -0,0 +1,214 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.serializer; | ||
5 | |||
6 | import com.google.inject.Inject; | ||
7 | import hu.bme.mit.inf.dslreasoner.services.AlloyLanguageGrammarAccess; | ||
8 | import java.util.List; | ||
9 | import org.eclipse.emf.ecore.EObject; | ||
10 | import org.eclipse.xtext.IGrammarAccess; | ||
11 | import org.eclipse.xtext.RuleCall; | ||
12 | import org.eclipse.xtext.nodemodel.INode; | ||
13 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; | ||
14 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.AlternativeAlias; | ||
15 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; | ||
16 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; | ||
17 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; | ||
18 | import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; | ||
19 | |||
20 | @SuppressWarnings("all") | ||
21 | public class AlloyLanguageSyntacticSequencer extends AbstractSyntacticSequencer { | ||
22 | |||
23 | protected AlloyLanguageGrammarAccess grammarAccess; | ||
24 | protected AbstractElementAlias match_ALSAnd_AmpersandAmpersandKeyword_1_1_0_or_AndKeyword_1_1_1; | ||
25 | protected AbstractElementAlias match_ALSBasicRelationTerm_LeftParenthesisKeyword_6_0_a; | ||
26 | protected AbstractElementAlias match_ALSBasicRelationTerm_LeftParenthesisKeyword_6_0_p; | ||
27 | protected AbstractElementAlias match_ALSIff_IffKeyword_1_1_1_or_LessThanSignEqualsSignGreaterThanSignKeyword_1_1_0; | ||
28 | protected AbstractElementAlias match_ALSImpl_EqualsSignGreaterThanSignKeyword_1_1_0_or_ImpliesKeyword_1_1_1; | ||
29 | protected AbstractElementAlias match_ALSOr_OrKeyword_1_1_1_or_VerticalLineVerticalLineKeyword_1_1_0; | ||
30 | protected AbstractElementAlias match_ALSPreficed_ExclamationMarkKeyword_0_1_0_0_or_NotKeyword_0_1_0_1; | ||
31 | |||
32 | @Inject | ||
33 | protected void init(IGrammarAccess access) { | ||
34 | grammarAccess = (AlloyLanguageGrammarAccess) access; | ||
35 | match_ALSAnd_AmpersandAmpersandKeyword_1_1_0_or_AndKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getALSAndAccess().getAmpersandAmpersandKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getALSAndAccess().getAndKeyword_1_1_1())); | ||
36 | match_ALSBasicRelationTerm_LeftParenthesisKeyword_6_0_a = new TokenAlias(true, true, grammarAccess.getALSBasicRelationTermAccess().getLeftParenthesisKeyword_6_0()); | ||
37 | match_ALSBasicRelationTerm_LeftParenthesisKeyword_6_0_p = new TokenAlias(true, false, grammarAccess.getALSBasicRelationTermAccess().getLeftParenthesisKeyword_6_0()); | ||
38 | match_ALSIff_IffKeyword_1_1_1_or_LessThanSignEqualsSignGreaterThanSignKeyword_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getALSIffAccess().getIffKeyword_1_1_1()), new TokenAlias(false, false, grammarAccess.getALSIffAccess().getLessThanSignEqualsSignGreaterThanSignKeyword_1_1_0())); | ||
39 | match_ALSImpl_EqualsSignGreaterThanSignKeyword_1_1_0_or_ImpliesKeyword_1_1_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getALSImplAccess().getEqualsSignGreaterThanSignKeyword_1_1_0()), new TokenAlias(false, false, grammarAccess.getALSImplAccess().getImpliesKeyword_1_1_1())); | ||
40 | match_ALSOr_OrKeyword_1_1_1_or_VerticalLineVerticalLineKeyword_1_1_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getALSOrAccess().getOrKeyword_1_1_1()), new TokenAlias(false, false, grammarAccess.getALSOrAccess().getVerticalLineVerticalLineKeyword_1_1_0())); | ||
41 | match_ALSPreficed_ExclamationMarkKeyword_0_1_0_0_or_NotKeyword_0_1_0_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getALSPreficedAccess().getExclamationMarkKeyword_0_1_0_0()), new TokenAlias(false, false, grammarAccess.getALSPreficedAccess().getNotKeyword_0_1_0_1())); | ||
42 | } | ||
43 | |||
44 | @Override | ||
45 | protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { | ||
46 | return ""; | ||
47 | } | ||
48 | |||
49 | |||
50 | @Override | ||
51 | protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { | ||
52 | if (transition.getAmbiguousSyntaxes().isEmpty()) return; | ||
53 | List<INode> transitionNodes = collectNodes(fromNode, toNode); | ||
54 | for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { | ||
55 | List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax); | ||
56 | if (match_ALSAnd_AmpersandAmpersandKeyword_1_1_0_or_AndKeyword_1_1_1.equals(syntax)) | ||
57 | emit_ALSAnd_AmpersandAmpersandKeyword_1_1_0_or_AndKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes); | ||
58 | else if (match_ALSBasicRelationTerm_LeftParenthesisKeyword_6_0_a.equals(syntax)) | ||
59 | emit_ALSBasicRelationTerm_LeftParenthesisKeyword_6_0_a(semanticObject, getLastNavigableState(), syntaxNodes); | ||
60 | else if (match_ALSBasicRelationTerm_LeftParenthesisKeyword_6_0_p.equals(syntax)) | ||
61 | emit_ALSBasicRelationTerm_LeftParenthesisKeyword_6_0_p(semanticObject, getLastNavigableState(), syntaxNodes); | ||
62 | else if (match_ALSIff_IffKeyword_1_1_1_or_LessThanSignEqualsSignGreaterThanSignKeyword_1_1_0.equals(syntax)) | ||
63 | emit_ALSIff_IffKeyword_1_1_1_or_LessThanSignEqualsSignGreaterThanSignKeyword_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes); | ||
64 | else if (match_ALSImpl_EqualsSignGreaterThanSignKeyword_1_1_0_or_ImpliesKeyword_1_1_1.equals(syntax)) | ||
65 | emit_ALSImpl_EqualsSignGreaterThanSignKeyword_1_1_0_or_ImpliesKeyword_1_1_1(semanticObject, getLastNavigableState(), syntaxNodes); | ||
66 | else if (match_ALSOr_OrKeyword_1_1_1_or_VerticalLineVerticalLineKeyword_1_1_0.equals(syntax)) | ||
67 | emit_ALSOr_OrKeyword_1_1_1_or_VerticalLineVerticalLineKeyword_1_1_0(semanticObject, getLastNavigableState(), syntaxNodes); | ||
68 | else if (match_ALSPreficed_ExclamationMarkKeyword_0_1_0_0_or_NotKeyword_0_1_0_1.equals(syntax)) | ||
69 | emit_ALSPreficed_ExclamationMarkKeyword_0_1_0_0_or_NotKeyword_0_1_0_1(semanticObject, getLastNavigableState(), syntaxNodes); | ||
70 | else acceptNodes(getLastNavigableState(), syntaxNodes); | ||
71 | } | ||
72 | } | ||
73 | |||
74 | /** | ||
75 | * Ambiguous syntax: | ||
76 | * 'and' | '&&' | ||
77 | * | ||
78 | * This ambiguous syntax occurs at: | ||
79 | * {ALSAnd.leftOperand=} (ambiguity) rightOperand=ALSComparison | ||
80 | */ | ||
81 | protected void emit_ALSAnd_AmpersandAmpersandKeyword_1_1_0_or_AndKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
82 | acceptNodes(transition, nodes); | ||
83 | } | ||
84 | |||
85 | /** | ||
86 | * Ambiguous syntax: | ||
87 | * '('* | ||
88 | * | ||
89 | * This ambiguous syntax occurs at: | ||
90 | * (rule start) (ambiguity) '#' operand=ALSBasicRelationTerm | ||
91 | * (rule start) (ambiguity) '*' operand=ALSBasicRelationTerm | ||
92 | * (rule start) (ambiguity) '-' operand=ALSBasicRelationTerm | ||
93 | * (rule start) (ambiguity) 'Int' (rule start) | ||
94 | * (rule start) (ambiguity) '^' operand=ALSBasicRelationTerm | ||
95 | * (rule start) (ambiguity) 'iden' (rule start) | ||
96 | * (rule start) (ambiguity) 'none' (rule start) | ||
97 | * (rule start) (ambiguity) 'sum' variables+=ALSVariableDeclaration | ||
98 | * (rule start) (ambiguity) 'univ' (rule start) | ||
99 | * (rule start) (ambiguity) '~' operand=ALSBasicRelationTerm | ||
100 | * (rule start) (ambiguity) ('!' | 'not') operand=ALSBasicRelationTerm | ||
101 | * (rule start) (ambiguity) referred=[ALSRelationDeclaration|ID] | ||
102 | * (rule start) (ambiguity) referredDefinition=[ALSDefinition|ID] | ||
103 | * (rule start) (ambiguity) referredNumericOperator=ALSNumericOperator | ||
104 | * (rule start) (ambiguity) type=ALSMultiplicity | ||
105 | * (rule start) (ambiguity) value=INT | ||
106 | * (rule start) (ambiguity) {ALSAnd.leftOperand=} | ||
107 | * (rule start) (ambiguity) {ALSDirectProduct.leftOperand=} | ||
108 | * (rule start) (ambiguity) {ALSEquals.leftOperand=} | ||
109 | * (rule start) (ambiguity) {ALSIff.leftOperand=} | ||
110 | * (rule start) (ambiguity) {ALSImpl.leftOperand=} | ||
111 | * (rule start) (ambiguity) {ALSIntersection.leftOperand=} | ||
112 | * (rule start) (ambiguity) {ALSJoin.leftOperand=} | ||
113 | * (rule start) (ambiguity) {ALSLeq.leftOperand=} | ||
114 | * (rule start) (ambiguity) {ALSLess.leftOperand=} | ||
115 | * (rule start) (ambiguity) {ALSMeq.leftOperand=} | ||
116 | * (rule start) (ambiguity) {ALSMinus.leftOperand=} | ||
117 | * (rule start) (ambiguity) {ALSMore.leftOperand=} | ||
118 | * (rule start) (ambiguity) {ALSNotEquals.leftOperand=} | ||
119 | * (rule start) (ambiguity) {ALSOr.leftOperand=} | ||
120 | * (rule start) (ambiguity) {ALSOverride.leftOperand=} | ||
121 | * (rule start) (ambiguity) {ALSPlus.leftOperand=} | ||
122 | * (rule start) (ambiguity) {ALSRangeRestrictionLeft.filter=} | ||
123 | * (rule start) (ambiguity) {ALSRangeRestrictionRight.relation=} | ||
124 | * (rule start) (ambiguity) {ALSSubset.leftOperand=} | ||
125 | */ | ||
126 | protected void emit_ALSBasicRelationTerm_LeftParenthesisKeyword_6_0_a(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
127 | acceptNodes(transition, nodes); | ||
128 | } | ||
129 | |||
130 | /** | ||
131 | * Ambiguous syntax: | ||
132 | * '('+ | ||
133 | * | ||
134 | * This ambiguous syntax occurs at: | ||
135 | * (rule start) (ambiguity) '#' operand=ALSBasicRelationTerm | ||
136 | * (rule start) (ambiguity) '*' operand=ALSBasicRelationTerm | ||
137 | * (rule start) (ambiguity) '-' operand=ALSBasicRelationTerm | ||
138 | * (rule start) (ambiguity) '^' operand=ALSBasicRelationTerm | ||
139 | * (rule start) (ambiguity) 'sum' variables+=ALSVariableDeclaration | ||
140 | * (rule start) (ambiguity) '~' operand=ALSBasicRelationTerm | ||
141 | * (rule start) (ambiguity) ('!' | 'not') operand=ALSBasicRelationTerm | ||
142 | * (rule start) (ambiguity) referredDefinition=[ALSDefinition|ID] | ||
143 | * (rule start) (ambiguity) referredNumericOperator=ALSNumericOperator | ||
144 | * (rule start) (ambiguity) type=ALSMultiplicity | ||
145 | * (rule start) (ambiguity) {ALSAnd.leftOperand=} | ||
146 | * (rule start) (ambiguity) {ALSDirectProduct.leftOperand=} | ||
147 | * (rule start) (ambiguity) {ALSEquals.leftOperand=} | ||
148 | * (rule start) (ambiguity) {ALSIff.leftOperand=} | ||
149 | * (rule start) (ambiguity) {ALSImpl.leftOperand=} | ||
150 | * (rule start) (ambiguity) {ALSIntersection.leftOperand=} | ||
151 | * (rule start) (ambiguity) {ALSJoin.leftOperand=} | ||
152 | * (rule start) (ambiguity) {ALSLeq.leftOperand=} | ||
153 | * (rule start) (ambiguity) {ALSLess.leftOperand=} | ||
154 | * (rule start) (ambiguity) {ALSMeq.leftOperand=} | ||
155 | * (rule start) (ambiguity) {ALSMinus.leftOperand=} | ||
156 | * (rule start) (ambiguity) {ALSMore.leftOperand=} | ||
157 | * (rule start) (ambiguity) {ALSNotEquals.leftOperand=} | ||
158 | * (rule start) (ambiguity) {ALSOr.leftOperand=} | ||
159 | * (rule start) (ambiguity) {ALSOverride.leftOperand=} | ||
160 | * (rule start) (ambiguity) {ALSPlus.leftOperand=} | ||
161 | * (rule start) (ambiguity) {ALSRangeRestrictionLeft.filter=} | ||
162 | * (rule start) (ambiguity) {ALSRangeRestrictionRight.relation=} | ||
163 | * (rule start) (ambiguity) {ALSSubset.leftOperand=} | ||
164 | */ | ||
165 | protected void emit_ALSBasicRelationTerm_LeftParenthesisKeyword_6_0_p(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
166 | acceptNodes(transition, nodes); | ||
167 | } | ||
168 | |||
169 | /** | ||
170 | * Ambiguous syntax: | ||
171 | * 'iff' | '<=>' | ||
172 | * | ||
173 | * This ambiguous syntax occurs at: | ||
174 | * {ALSIff.leftOperand=} (ambiguity) rightOperand=ALSImpl | ||
175 | */ | ||
176 | protected void emit_ALSIff_IffKeyword_1_1_1_or_LessThanSignEqualsSignGreaterThanSignKeyword_1_1_0(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
177 | acceptNodes(transition, nodes); | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * Ambiguous syntax: | ||
182 | * '=>' | 'implies' | ||
183 | * | ||
184 | * This ambiguous syntax occurs at: | ||
185 | * {ALSImpl.leftOperand=} (ambiguity) rightOperand=ALSAnd | ||
186 | */ | ||
187 | protected void emit_ALSImpl_EqualsSignGreaterThanSignKeyword_1_1_0_or_ImpliesKeyword_1_1_1(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
188 | acceptNodes(transition, nodes); | ||
189 | } | ||
190 | |||
191 | /** | ||
192 | * Ambiguous syntax: | ||
193 | * '||' | 'or' | ||
194 | * | ||
195 | * This ambiguous syntax occurs at: | ||
196 | * {ALSOr.leftOperand=} (ambiguity) rightOperand=ALSIff | ||
197 | */ | ||
198 | protected void emit_ALSOr_OrKeyword_1_1_1_or_VerticalLineVerticalLineKeyword_1_1_0(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
199 | acceptNodes(transition, nodes); | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * Ambiguous syntax: | ||
204 | * '!' | 'not' | ||
205 | * | ||
206 | * This ambiguous syntax occurs at: | ||
207 | * (rule start) '('* (ambiguity) operand=ALSBasicRelationTerm | ||
208 | * (rule start) '('+ (ambiguity) operand=ALSBasicRelationTerm | ||
209 | */ | ||
210 | protected void emit_ALSPreficed_ExclamationMarkKeyword_0_1_0_0_or_NotKeyword_0_1_0_1(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
211 | acceptNodes(transition, nodes); | ||
212 | } | ||
213 | |||
214 | } | ||