aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/serializer/VampireLanguageSyntacticSequencer.java
blob: d3c1b22106d62854aa5d6f23da1a71fc99481349 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/*
 * generated by Xtext 2.14.0
 */
package ca.mcgill.ecse.dslreasoner.serializer;

import ca.mcgill.ecse.dslreasoner.services.VampireLanguageGrammarAccess;
import com.google.inject.Inject;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.IGrammarAccess;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.nodemodel.INode;
import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias;
import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable;
import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition;
import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;

@SuppressWarnings("all")
public class VampireLanguageSyntacticSequencer extends AbstractSyntacticSequencer {

	protected VampireLanguageGrammarAccess grammarAccess;
	protected AbstractElementAlias match_VLSAnnotation_LeftSquareBracketKeyword_0_q;
	protected AbstractElementAlias match_VLSAnnotation_RightSquareBracketKeyword_3_q;
	protected AbstractElementAlias match_VLSUnitaryFormula_LeftParenthesisKeyword_4_0_a;
	protected AbstractElementAlias match_VLSUnitaryFormula_LeftParenthesisKeyword_4_0_p;
	
	@Inject
	protected void init(IGrammarAccess access) {
		grammarAccess = (VampireLanguageGrammarAccess) access;
		match_VLSAnnotation_LeftSquareBracketKeyword_0_q = new TokenAlias(false, true, grammarAccess.getVLSAnnotationAccess().getLeftSquareBracketKeyword_0());
		match_VLSAnnotation_RightSquareBracketKeyword_3_q = new TokenAlias(false, true, grammarAccess.getVLSAnnotationAccess().getRightSquareBracketKeyword_3());
		match_VLSUnitaryFormula_LeftParenthesisKeyword_4_0_a = new TokenAlias(true, true, grammarAccess.getVLSUnitaryFormulaAccess().getLeftParenthesisKeyword_4_0());
		match_VLSUnitaryFormula_LeftParenthesisKeyword_4_0_p = new TokenAlias(true, false, grammarAccess.getVLSUnitaryFormulaAccess().getLeftParenthesisKeyword_4_0());
	}
	
	@Override
	protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
		return "";
	}
	
	
	@Override
	protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
		if (transition.getAmbiguousSyntaxes().isEmpty()) return;
		List<INode> transitionNodes = collectNodes(fromNode, toNode);
		for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
			List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
			if (match_VLSAnnotation_LeftSquareBracketKeyword_0_q.equals(syntax))
				emit_VLSAnnotation_LeftSquareBracketKeyword_0_q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if (match_VLSAnnotation_RightSquareBracketKeyword_3_q.equals(syntax))
				emit_VLSAnnotation_RightSquareBracketKeyword_3_q(semanticObject, getLastNavigableState(), syntaxNodes);
			else if (match_VLSUnitaryFormula_LeftParenthesisKeyword_4_0_a.equals(syntax))
				emit_VLSUnitaryFormula_LeftParenthesisKeyword_4_0_a(semanticObject, getLastNavigableState(), syntaxNodes);
			else if (match_VLSUnitaryFormula_LeftParenthesisKeyword_4_0_p.equals(syntax))
				emit_VLSUnitaryFormula_LeftParenthesisKeyword_4_0_p(semanticObject, getLastNavigableState(), syntaxNodes);
			else acceptNodes(getLastNavigableState(), syntaxNodes);
		}
	}

	/**
	 * Ambiguous syntax:
	 *     '['?
	 *
	 * This ambiguous syntax occurs at:
	 *     (rule start) (ambiguity) '(' followup=VLSAnnotationTerms
	 *     (rule start) (ambiguity) ']'? (rule start)
	 *     (rule start) (ambiguity) name=LOWER_WORD_ID
	 *     (rule start) (ambiguity) name=SINGLE_QUOTE
	 *     (rule start) (ambiguity) name=VLSRole
	 */
	protected void emit_VLSAnnotation_LeftSquareBracketKeyword_0_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Ambiguous syntax:
	 *     ']'?
	 *
	 * This ambiguous syntax occurs at:
	 *     (rule start) '['? (ambiguity) (rule start)
	 *     followup=VLSAnnotationTerms ')' (ambiguity) (rule end)
	 *     name=LOWER_WORD_ID (ambiguity) (rule end)
	 *     name=SINGLE_QUOTE (ambiguity) (rule end)
	 *     name=VLSRole (ambiguity) (rule end)
	 */
	protected void emit_VLSAnnotation_RightSquareBracketKeyword_3_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Ambiguous syntax:
	 *     '('*
	 *
	 * This ambiguous syntax occurs at:
	 *     (rule start) (ambiguity) '!' '[' variables+=VLSVariable
	 *     (rule start) (ambiguity) '!' '[' variables+=VLSVariableDeclaration
	 *     (rule start) (ambiguity) '$false' ':' type=VLSTypeDef
	 *     (rule start) (ambiguity) '$false' (rule start)
	 *     (rule start) (ambiguity) '$true' ':' type=VLSTypeDef
	 *     (rule start) (ambiguity) '$true' (rule start)
	 *     (rule start) (ambiguity) '?' '[' variables+=VLSVariable
	 *     (rule start) (ambiguity) '?' '[' variables+=VLSVariableDeclaration
	 *     (rule start) (ambiguity) '~' operand=VLSUnitaryFormula
	 *     (rule start) (ambiguity) constant=DOLLAR_ID
	 *     (rule start) (ambiguity) constant=DOUBLE_DOLLAR_ID
	 *     (rule start) (ambiguity) constant=LOWER_WORD_ID
	 *     (rule start) (ambiguity) constant=SINGLE_QUOTE
	 *     (rule start) (ambiguity) constant=VLSRole
	 *     (rule start) (ambiguity) name='$less'
	 *     (rule start) (ambiguity) name=DOLLAR_ID
	 *     (rule start) (ambiguity) name=DOUBLE_DOLLAR_ID
	 *     (rule start) (ambiguity) name=LOWER_WORD_ID
	 *     (rule start) (ambiguity) name=SINGLE_QUOTE
	 *     (rule start) (ambiguity) name=UPPER_WORD_ID
	 *     (rule start) (ambiguity) name=VLSRole
	 *     (rule start) (ambiguity) value=DOUBLE_QUOTE
	 *     (rule start) (ambiguity) value=SIGNED_LITERAL
	 *     (rule start) (ambiguity) {VLSAnd.left=}
	 *     (rule start) (ambiguity) {VLSAssignment.left=}
	 *     (rule start) (ambiguity) {VLSEquality.left=}
	 *     (rule start) (ambiguity) {VLSEquivalent.left=}
	 *     (rule start) (ambiguity) {VLSImplies.left=}
	 *     (rule start) (ambiguity) {VLSInequality.left=}
	 *     (rule start) (ambiguity) {VLSNand.left=}
	 *     (rule start) (ambiguity) {VLSNor.left=}
	 *     (rule start) (ambiguity) {VLSOr.left=}
	 *     (rule start) (ambiguity) {VLSRevImplies.left=}
	 *     (rule start) (ambiguity) {VLSXnor.left=}
	 */
	protected void emit_VLSUnitaryFormula_LeftParenthesisKeyword_4_0_a(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
	/**
	 * Ambiguous syntax:
	 *     '('+
	 *
	 * This ambiguous syntax occurs at:
	 *     (rule start) (ambiguity) {VLSAnd.left=}
	 *     (rule start) (ambiguity) {VLSEquivalent.left=}
	 *     (rule start) (ambiguity) {VLSImplies.left=}
	 *     (rule start) (ambiguity) {VLSNand.left=}
	 *     (rule start) (ambiguity) {VLSNor.left=}
	 *     (rule start) (ambiguity) {VLSOr.left=}
	 *     (rule start) (ambiguity) {VLSRevImplies.left=}
	 *     (rule start) (ambiguity) {VLSXnor.left=}
	 */
	protected void emit_VLSUnitaryFormula_LeftParenthesisKeyword_4_0_p(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
		acceptNodes(transition, nodes);
	}
	
}