Modify pom file
[nemo.git] / nemo-tools / eclipse-plugin-project / nemo-editor / org.opendaylight.nemo.tool.eclipse.plugin.editor / src-gen / org / opendaylight / nemo / tool / eclipse / plugin / serializer / EditorSyntacticSequencer.java
1 /*
2  * generated by Xtext
3  */
4 package org.opendaylight.nemo.tool.eclipse.plugin.serializer;
5
6 import com.google.inject.Inject;
7 import java.util.List;
8 import org.eclipse.emf.ecore.EObject;
9 import org.eclipse.xtext.IGrammarAccess;
10 import org.eclipse.xtext.RuleCall;
11 import org.eclipse.xtext.nodemodel.INode;
12 import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
13 import org.eclipse.xtext.serializer.analysis.GrammarAlias.AlternativeAlias;
14 import org.eclipse.xtext.serializer.analysis.GrammarAlias.GroupAlias;
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 import org.opendaylight.nemo.tool.eclipse.plugin.services.EditorGrammarAccess;
20
21 @SuppressWarnings("all")
22 public class EditorSyntacticSequencer extends AbstractSyntacticSequencer {
23
24         protected EditorGrammarAccess grammarAccess;
25         protected AbstractElementAlias match_ConnectionUpdate_DELETEKeyword_0_1_or_UPDATEKeyword_0_0;
26         protected AbstractElementAlias match_ConnectionUpdate_PropertyParserRuleCall_5_q;
27         protected AbstractElementAlias match_ConnectionUpdate___TypeKeyword_3_0_NemoIdTerminalRuleCall_3_1__q;
28         protected AbstractElementAlias match_Connection_PropertyParserRuleCall_6_q;
29         protected AbstractElementAlias match_FlowUpdate_DELETEKeyword_0_1_or_UPDATEKeyword_0_0;
30         protected AbstractElementAlias match_FlowUpdate_MatchesParserRuleCall_3_q;
31         protected AbstractElementAlias match_Flow_MatchesParserRuleCall_3_q;
32         protected AbstractElementAlias match_NodeModel_ModelPropertyParserRuleCall_2_q;
33         protected AbstractElementAlias match_NodeOperating_DELETEKeyword_0_1_or_UPDATEKeyword_0_0;
34         protected AbstractElementAlias match_NodeOperating_PropertyParserRuleCall_5_q;
35         protected AbstractElementAlias match_NodeOperating___TypeKeyword_3_0_NemoIdTerminalRuleCall_3_1__q;
36         protected AbstractElementAlias match_Node_PropertyParserRuleCall_5_q;
37         protected AbstractElementAlias match_Operation_ConditionParserRuleCall_6_q;
38         protected AbstractElementAlias match_Sentence_SenEnginesParserRuleCall_0_or_UserParserRuleCall_1;
39         
40         @Inject
41         protected void init(IGrammarAccess access) {
42                 grammarAccess = (EditorGrammarAccess) access;
43                 match_ConnectionUpdate_DELETEKeyword_0_1_or_UPDATEKeyword_0_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getConnectionUpdateAccess().getDELETEKeyword_0_1()), new TokenAlias(false, false, grammarAccess.getConnectionUpdateAccess().getUPDATEKeyword_0_0()));
44                 match_ConnectionUpdate_PropertyParserRuleCall_5_q = new TokenAlias(false, true, grammarAccess.getConnectionUpdateAccess().getPropertyParserRuleCall_5());
45                 match_ConnectionUpdate___TypeKeyword_3_0_NemoIdTerminalRuleCall_3_1__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getConnectionUpdateAccess().getTypeKeyword_3_0()), new TokenAlias(false, false, grammarAccess.getConnectionUpdateAccess().getNemoIdTerminalRuleCall_3_1()));
46                 match_Connection_PropertyParserRuleCall_6_q = new TokenAlias(false, true, grammarAccess.getConnectionAccess().getPropertyParserRuleCall_6());
47                 match_FlowUpdate_DELETEKeyword_0_1_or_UPDATEKeyword_0_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getFlowUpdateAccess().getDELETEKeyword_0_1()), new TokenAlias(false, false, grammarAccess.getFlowUpdateAccess().getUPDATEKeyword_0_0()));
48                 match_FlowUpdate_MatchesParserRuleCall_3_q = new TokenAlias(false, true, grammarAccess.getFlowUpdateAccess().getMatchesParserRuleCall_3());
49                 match_Flow_MatchesParserRuleCall_3_q = new TokenAlias(false, true, grammarAccess.getFlowAccess().getMatchesParserRuleCall_3());
50                 match_NodeModel_ModelPropertyParserRuleCall_2_q = new TokenAlias(false, true, grammarAccess.getNodeModelAccess().getModelPropertyParserRuleCall_2());
51                 match_NodeOperating_DELETEKeyword_0_1_or_UPDATEKeyword_0_0 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getNodeOperatingAccess().getDELETEKeyword_0_1()), new TokenAlias(false, false, grammarAccess.getNodeOperatingAccess().getUPDATEKeyword_0_0()));
52                 match_NodeOperating_PropertyParserRuleCall_5_q = new TokenAlias(false, true, grammarAccess.getNodeOperatingAccess().getPropertyParserRuleCall_5());
53                 match_NodeOperating___TypeKeyword_3_0_NemoIdTerminalRuleCall_3_1__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getNodeOperatingAccess().getTypeKeyword_3_0()), new TokenAlias(false, false, grammarAccess.getNodeOperatingAccess().getNemoIdTerminalRuleCall_3_1()));
54                 match_Node_PropertyParserRuleCall_5_q = new TokenAlias(false, true, grammarAccess.getNodeAccess().getPropertyParserRuleCall_5());
55                 match_Operation_ConditionParserRuleCall_6_q = new TokenAlias(false, true, grammarAccess.getOperationAccess().getConditionParserRuleCall_6());
56                 match_Sentence_SenEnginesParserRuleCall_0_or_UserParserRuleCall_1 = new AlternativeAlias(false, false, new TokenAlias(false, false, grammarAccess.getSentenceAccess().getSenEnginesParserRuleCall_0()), new TokenAlias(false, false, grammarAccess.getSentenceAccess().getUserParserRuleCall_1()));
57         }
58         
59         @Override
60         protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
61                 if(ruleCall.getRule() == grammarAccess.getConditionRule())
62                         return getConditionToken(semanticObject, ruleCall, node);
63                 else if(ruleCall.getRule() == grammarAccess.getMatchesRule())
64                         return getMatchesToken(semanticObject, ruleCall, node);
65                 else if(ruleCall.getRule() == grammarAccess.getModelPropertyRule())
66                         return getModelPropertyToken(semanticObject, ruleCall, node);
67                 else if(ruleCall.getRule() == grammarAccess.getNemoIdRule())
68                         return getNemoIdToken(semanticObject, ruleCall, node);
69                 else if(ruleCall.getRule() == grammarAccess.getNewObjRule())
70                         return getNewObjToken(semanticObject, ruleCall, node);
71                 else if(ruleCall.getRule() == grammarAccess.getPropertyRule())
72                         return getPropertyToken(semanticObject, ruleCall, node);
73                 else if(ruleCall.getRule() == grammarAccess.getSenEnginesRule())
74                         return getSenEnginesToken(semanticObject, ruleCall, node);
75                 else if(ruleCall.getRule() == grammarAccess.getUserRule())
76                         return getUserToken(semanticObject, ruleCall, node);
77                 return "";
78         }
79         
80         /**
81          * Condition: 'Condition' STRING(','STRING)*;
82          */
83         protected String getConditionToken(EObject semanticObject, RuleCall ruleCall, INode node) {
84                 if (node != null)
85                         return getTokenText(node);
86                 return "Condition\"\"";
87         }
88         
89         /**
90          * Matches:   'Match'   Match (',' Match)*;
91          */
92         protected String getMatchesToken(EObject semanticObject, RuleCall ruleCall, INode node) {
93                 if (node != null)
94                         return getTokenText(node);
95                 return "Match:\"\"";
96         }
97         
98         /**
99          * ModelProperty: 'Property' OneModelProperty (',' OneModelProperty)*;
100          */
101         protected String getModelPropertyToken(EObject semanticObject, RuleCall ruleCall, INode node) {
102                 if (node != null)
103                         return getTokenText(node);
104                 return "Property\"\":";
105         }
106         
107         /**
108          * terminal NemoId: ('a'..'z'|'A'..'Z'|'$'|'_') ('a'..'z'|'A'..'Z'|'$'|'_'|'-'|'0'..'9')*;
109          */
110         protected String getNemoIdToken(EObject semanticObject, RuleCall ruleCall, INode node) {
111                 if (node != null)
112                         return getTokenText(node);
113                 return "";
114         }
115         
116         /**
117          * NewObj:'CREATE'|'IMPORT';
118          */
119         protected String getNewObjToken(EObject semanticObject, RuleCall ruleCall, INode node) {
120                 if (node != null)
121                         return getTokenText(node);
122                 return "CREATE";
123         }
124         
125         /**
126          * Property: 'Property ' OneProperty(',' OneProperty)*;
127          */
128         protected String getPropertyToken(EObject semanticObject, RuleCall ruleCall, INode node) {
129                 if (node != null)
130                         return getTokenText(node);
131                 return "Property :\"\"";
132         }
133         
134         /**
135          * SenEngines:
136          *      'Engines:' Ipv4 (',' Ipv4)* ';';
137          */
138         protected String getSenEnginesToken(EObject semanticObject, RuleCall ruleCall, INode node) {
139                 if (node != null)
140                         return getTokenText(node);
141                 return "Engines:...;";
142         }
143         
144         /**
145          * User:'CREATE'  (STRING) (STRING) (STRING)   ';' ;
146          */
147         protected String getUserToken(EObject semanticObject, RuleCall ruleCall, INode node) {
148                 if (node != null)
149                         return getTokenText(node);
150                 return "CREATE\"\";";
151         }
152         
153         @Override
154         protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
155                 if (transition.getAmbiguousSyntaxes().isEmpty()) return;
156                 List<INode> transitionNodes = collectNodes(fromNode, toNode);
157                 for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
158                         List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
159                         if(match_ConnectionUpdate_DELETEKeyword_0_1_or_UPDATEKeyword_0_0.equals(syntax))
160                                 emit_ConnectionUpdate_DELETEKeyword_0_1_or_UPDATEKeyword_0_0(semanticObject, getLastNavigableState(), syntaxNodes);
161                         else if(match_ConnectionUpdate_PropertyParserRuleCall_5_q.equals(syntax))
162                                 emit_ConnectionUpdate_PropertyParserRuleCall_5_q(semanticObject, getLastNavigableState(), syntaxNodes);
163                         else if(match_ConnectionUpdate___TypeKeyword_3_0_NemoIdTerminalRuleCall_3_1__q.equals(syntax))
164                                 emit_ConnectionUpdate___TypeKeyword_3_0_NemoIdTerminalRuleCall_3_1__q(semanticObject, getLastNavigableState(), syntaxNodes);
165                         else if(match_Connection_PropertyParserRuleCall_6_q.equals(syntax))
166                                 emit_Connection_PropertyParserRuleCall_6_q(semanticObject, getLastNavigableState(), syntaxNodes);
167                         else if(match_FlowUpdate_DELETEKeyword_0_1_or_UPDATEKeyword_0_0.equals(syntax))
168                                 emit_FlowUpdate_DELETEKeyword_0_1_or_UPDATEKeyword_0_0(semanticObject, getLastNavigableState(), syntaxNodes);
169                         else if(match_FlowUpdate_MatchesParserRuleCall_3_q.equals(syntax))
170                                 emit_FlowUpdate_MatchesParserRuleCall_3_q(semanticObject, getLastNavigableState(), syntaxNodes);
171                         else if(match_Flow_MatchesParserRuleCall_3_q.equals(syntax))
172                                 emit_Flow_MatchesParserRuleCall_3_q(semanticObject, getLastNavigableState(), syntaxNodes);
173                         else if(match_NodeModel_ModelPropertyParserRuleCall_2_q.equals(syntax))
174                                 emit_NodeModel_ModelPropertyParserRuleCall_2_q(semanticObject, getLastNavigableState(), syntaxNodes);
175                         else if(match_NodeOperating_DELETEKeyword_0_1_or_UPDATEKeyword_0_0.equals(syntax))
176                                 emit_NodeOperating_DELETEKeyword_0_1_or_UPDATEKeyword_0_0(semanticObject, getLastNavigableState(), syntaxNodes);
177                         else if(match_NodeOperating_PropertyParserRuleCall_5_q.equals(syntax))
178                                 emit_NodeOperating_PropertyParserRuleCall_5_q(semanticObject, getLastNavigableState(), syntaxNodes);
179                         else if(match_NodeOperating___TypeKeyword_3_0_NemoIdTerminalRuleCall_3_1__q.equals(syntax))
180                                 emit_NodeOperating___TypeKeyword_3_0_NemoIdTerminalRuleCall_3_1__q(semanticObject, getLastNavigableState(), syntaxNodes);
181                         else if(match_Node_PropertyParserRuleCall_5_q.equals(syntax))
182                                 emit_Node_PropertyParserRuleCall_5_q(semanticObject, getLastNavigableState(), syntaxNodes);
183                         else if(match_Operation_ConditionParserRuleCall_6_q.equals(syntax))
184                                 emit_Operation_ConditionParserRuleCall_6_q(semanticObject, getLastNavigableState(), syntaxNodes);
185                         else if(match_Sentence_SenEnginesParserRuleCall_0_or_UserParserRuleCall_1.equals(syntax))
186                                 emit_Sentence_SenEnginesParserRuleCall_0_or_UserParserRuleCall_1(semanticObject, getLastNavigableState(), syntaxNodes);
187                         else acceptNodes(getLastNavigableState(), syntaxNodes);
188                 }
189         }
190
191         /**
192          * Ambiguous syntax:
193          *     'UPDATE' | 'DELETE'
194          *
195          * This ambiguous syntax occurs at:
196          *     (rule start) (ambiguity) 'Connection' connectionname+=[Connection|NemoId]
197          */
198         protected void emit_ConnectionUpdate_DELETEKeyword_0_1_or_UPDATEKeyword_0_0(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
199                 acceptNodes(transition, nodes);
200         }
201         
202         /**
203          * Ambiguous syntax:
204          *     Property?
205          *
206          * This ambiguous syntax occurs at:
207          *     connectionname+=[Connection|NemoId] ('Type' NemoId)? (ambiguity) ';' (rule end)
208          *     endnode+=[Node|NemoId] (ambiguity) ';' (rule end)
209          */
210         protected void emit_ConnectionUpdate_PropertyParserRuleCall_5_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
211                 acceptNodes(transition, nodes);
212         }
213         
214         /**
215          * Ambiguous syntax:
216          *     ('Type' NemoId)?
217          *
218          * This ambiguous syntax occurs at:
219          *     connectionname+=[Connection|NemoId] (ambiguity) 'Endnodes' endnode+=[Node|NemoId]
220          *     connectionname+=[Connection|NemoId] (ambiguity) Property? ';' (rule end)
221          */
222         protected void emit_ConnectionUpdate___TypeKeyword_3_0_NemoIdTerminalRuleCall_3_1__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
223                 acceptNodes(transition, nodes);
224         }
225         
226         /**
227          * Ambiguous syntax:
228          *     Property?
229          *
230          * This ambiguous syntax occurs at:
231          *     endnode+=[Node|NemoId] (ambiguity) ';' (rule end)
232          */
233         protected void emit_Connection_PropertyParserRuleCall_6_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
234                 acceptNodes(transition, nodes);
235         }
236         
237         /**
238          * Ambiguous syntax:
239          *     'UPDATE' | 'DELETE'
240          *
241          * This ambiguous syntax occurs at:
242          *     (rule start) (ambiguity) 'Flow' flowId+=[Flow|NemoId]
243          */
244         protected void emit_FlowUpdate_DELETEKeyword_0_1_or_UPDATEKeyword_0_0(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
245                 acceptNodes(transition, nodes);
246         }
247         
248         /**
249          * Ambiguous syntax:
250          *     Matches?
251          *
252          * This ambiguous syntax occurs at:
253          *     flowId+=[Flow|NemoId] (ambiguity) ';' (rule end)
254          */
255         protected void emit_FlowUpdate_MatchesParserRuleCall_3_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
256                 acceptNodes(transition, nodes);
257         }
258         
259         /**
260          * Ambiguous syntax:
261          *     Matches?
262          *
263          * This ambiguous syntax occurs at:
264          *     name=NemoId (ambiguity) ';' (rule end)
265          */
266         protected void emit_Flow_MatchesParserRuleCall_3_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
267                 acceptNodes(transition, nodes);
268         }
269         
270         /**
271          * Ambiguous syntax:
272          *     ModelProperty?
273          *
274          * This ambiguous syntax occurs at:
275          *     name=NemoId (ambiguity) (rule end)
276          */
277         protected void emit_NodeModel_ModelPropertyParserRuleCall_2_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
278                 acceptNodes(transition, nodes);
279         }
280         
281         /**
282          * Ambiguous syntax:
283          *     'UPDATE' | 'DELETE'
284          *
285          * This ambiguous syntax occurs at:
286          *     (rule start) (ambiguity) 'Node' nodename+=[Node|NemoId]
287          */
288         protected void emit_NodeOperating_DELETEKeyword_0_1_or_UPDATEKeyword_0_0(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
289                 acceptNodes(transition, nodes);
290         }
291         
292         /**
293          * Ambiguous syntax:
294          *     Property?
295          *
296          * This ambiguous syntax occurs at:
297          *     nodename+=[Node|NemoId] ('Type' NemoId)? (ambiguity) ';' (rule end)
298          *     nodes+=[Node|NemoId] (ambiguity) ';' (rule end)
299          */
300         protected void emit_NodeOperating_PropertyParserRuleCall_5_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
301                 acceptNodes(transition, nodes);
302         }
303         
304         /**
305          * Ambiguous syntax:
306          *     ('Type' NemoId)?
307          *
308          * This ambiguous syntax occurs at:
309          *     nodename+=[Node|NemoId] (ambiguity) 'Contain' nodes+=[Node|NemoId]
310          *     nodename+=[Node|NemoId] (ambiguity) Property? ';' (rule end)
311          */
312         protected void emit_NodeOperating___TypeKeyword_3_0_NemoIdTerminalRuleCall_3_1__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
313                 acceptNodes(transition, nodes);
314         }
315         
316         /**
317          * Ambiguous syntax:
318          *     Property?
319          *
320          * This ambiguous syntax occurs at:
321          *     name=NemoId 'Type' NemoId (ambiguity) ';' (rule end)
322          *     nodes+=[Node|NemoId] (ambiguity) ';' (rule end)
323          */
324         protected void emit_Node_PropertyParserRuleCall_5_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
325                 acceptNodes(transition, nodes);
326         }
327         
328         /**
329          * Ambiguous syntax:
330          *     Condition?
331          *
332          * This ambiguous syntax occurs at:
333          *     targetId=[Flow|NemoId] (ambiguity) 'Action' NemoId ':' targetNode=[Node|NemoId]
334          *     targetId=[Flow|NemoId] (ambiguity) 'Action' NemoId ';' (rule end)
335          */
336         protected void emit_Operation_ConditionParserRuleCall_6_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
337                 acceptNodes(transition, nodes);
338         }
339         
340         /**
341          * Ambiguous syntax:
342          *     SenEngines | User
343          *
344          * This ambiguous syntax occurs at:
345          *     (rule start) (ambiguity) (rule start)
346          */
347         protected void emit_Sentence_SenEnginesParserRuleCall_0_or_UserParserRuleCall_1(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
348                 acceptNodes(transition, nodes);
349         }
350         
351 }