Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.g')
-rw-r--r--plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.g1534
1 files changed, 767 insertions, 767 deletions
diff --git a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.g b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.g
index c26df9733..016f380b7 100644
--- a/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.g
+++ b/plugins/org.eclipse.etrice.generator.fsmtest/src-gen/org/eclipse/etrice/generator/parser/antlr/internal/InternalFSMtest.g
@@ -1,767 +1,767 @@
-/*
-* generated by Xtext
-*/
-grammar InternalFSMtest;
-
-options {
- superClass=AbstractInternalAntlrParser;
-
-}
-
-@lexer::header {
-package org.eclipse.etrice.generator.parser.antlr.internal;
-
-// Hack: Use our own Lexer superclass by means of import.
-// Currently there is no other way to specify the superclass for the lexer.
-import org.eclipse.xtext.parser.antlr.Lexer;
-}
-
-@parser::header {
-package org.eclipse.etrice.generator.parser.antlr.internal;
-
-import org.eclipse.xtext.*;
-import org.eclipse.xtext.parser.*;
-import org.eclipse.xtext.parser.impl.*;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
-import org.eclipse.xtext.parser.antlr.XtextTokenStream;
-import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
-import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
-import org.eclipse.etrice.generator.services.FSMtestGrammarAccess;
-
-}
-
-@parser::members {
-
- private FSMtestGrammarAccess grammarAccess;
-
- public InternalFSMtestParser(TokenStream input, FSMtestGrammarAccess grammarAccess) {
- this(input);
- this.grammarAccess = grammarAccess;
- registerRules(grammarAccess.getGrammar());
- }
-
- @Override
- protected String getFirstRuleName() {
- return "Model";
- }
-
- @Override
- protected FSMtestGrammarAccess getGrammarAccess() {
- return grammarAccess;
- }
-}
-
-@rulecatch {
- catch (RecognitionException re) {
- recover(input,re);
- appendSkippedTokens();
- }
-}
-
-
-
-
-// Entry rule entryRuleModel
-entryRuleModel returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getModelRule()); }
- iv_ruleModel=ruleModel
- { $current=$iv_ruleModel.current; }
- EOF
-;
-
-// Rule Model
-ruleModel returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-(
-(
- {
- newCompositeNode(grammarAccess.getModelAccess().getTestscriptsTestscriptParserRuleCall_0());
- }
- lv_Testscripts_0_0=ruleTestscript {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getModelRule());
- }
- add(
- $current,
- "Testscripts",
- lv_Testscripts_0_0,
- "Testscript");
- afterParserOrEnumRuleCall();
- }
-
-)
-)*
-;
-
-
-
-
-
-// Entry rule entryRuleTestscript
-entryRuleTestscript returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getTestscriptRule()); }
- iv_ruleTestscript=ruleTestscript
- { $current=$iv_ruleTestscript.current; }
- EOF
-;
-
-// Rule Testscript
-ruleTestscript returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='fsmtest'
- {
- newLeafNode(otherlv_0, grammarAccess.getTestscriptAccess().getFsmtestKeyword_0());
- }
-(
-(
- lv_name_1_0=RULE_ID
- {
- newLeafNode(lv_name_1_0, grammarAccess.getTestscriptAccess().getNameIDTerminalRuleCall_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getTestscriptRule());
- }
- setWithLastConsumed(
- $current,
- "name",
- lv_name_1_0,
- "ID");
- }
-
-)
-)(
-(
- {
- newCompositeNode(grammarAccess.getTestscriptAccess().getStateDeclarationStateDeclarationParserRuleCall_2_0());
- }
- lv_stateDeclaration_2_0=ruleStateDeclaration {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getTestscriptRule());
- }
- set(
- $current,
- "stateDeclaration",
- lv_stateDeclaration_2_0,
- "StateDeclaration");
- afterParserOrEnumRuleCall();
- }
-
-)
-)(
-(
- {
- newCompositeNode(grammarAccess.getTestscriptAccess().getInitialDeclarationInitialDeclarationParserRuleCall_3_0());
- }
- lv_initialDeclaration_3_0=ruleInitialDeclaration {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getTestscriptRule());
- }
- set(
- $current,
- "initialDeclaration",
- lv_initialDeclaration_3_0,
- "InitialDeclaration");
- afterParserOrEnumRuleCall();
- }
-
-)
-)(
-(
- {
- newCompositeNode(grammarAccess.getTestscriptAccess().getLoopsDeclarationLoopsDeclarationParserRuleCall_4_0());
- }
- lv_loopsDeclaration_4_0=ruleLoopsDeclaration {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getTestscriptRule());
- }
- set(
- $current,
- "loopsDeclaration",
- lv_loopsDeclaration_4_0,
- "LoopsDeclaration");
- afterParserOrEnumRuleCall();
- }
-
-)
-)(
-(
- {
- newCompositeNode(grammarAccess.getTestscriptAccess().getSeedDeclarationSeedDeclarationParserRuleCall_5_0());
- }
- lv_seedDeclaration_5_0=ruleSeedDeclaration {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getTestscriptRule());
- }
- set(
- $current,
- "seedDeclaration",
- lv_seedDeclaration_5_0,
- "SeedDeclaration");
- afterParserOrEnumRuleCall();
- }
-
-)
-)?(
-(
- {
- newCompositeNode(grammarAccess.getTestscriptAccess().getTransitionDeclarationsTransitionDeclarationParserRuleCall_6_0());
- }
- lv_transitionDeclarations_6_0=ruleTransitionDeclaration {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getTestscriptRule());
- }
- add(
- $current,
- "transitionDeclarations",
- lv_transitionDeclarations_6_0,
- "TransitionDeclaration");
- afterParserOrEnumRuleCall();
- }
-
-)
-)* otherlv_7=';'
- {
- newLeafNode(otherlv_7, grammarAccess.getTestscriptAccess().getSemicolonKeyword_7());
- }
-)
-;
-
-
-
-
-
-// Entry rule entryRuleState
-entryRuleState returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getStateRule()); }
- iv_ruleState=ruleState
- { $current=$iv_ruleState.current; }
- EOF
-;
-
-// Rule State
-ruleState returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-(
-(
- lv_name_0_0=RULE_ID
- {
- newLeafNode(lv_name_0_0, grammarAccess.getStateAccess().getNameIDTerminalRuleCall_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getStateRule());
- }
- setWithLastConsumed(
- $current,
- "name",
- lv_name_0_0,
- "ID");
- }
-
-)
-)
-;
-
-
-
-
-
-// Entry rule entryRuleStateDeclaration
-entryRuleStateDeclaration returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getStateDeclarationRule()); }
- iv_ruleStateDeclaration=ruleStateDeclaration
- { $current=$iv_ruleStateDeclaration.current; }
- EOF
-;
-
-// Rule StateDeclaration
-ruleStateDeclaration returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='states:'
- {
- newLeafNode(otherlv_0, grammarAccess.getStateDeclarationAccess().getStatesKeyword_0());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getStateDeclarationAccess().getStatesStateParserRuleCall_1_0());
- }
- lv_states_1_0=ruleState {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getStateDeclarationRule());
- }
- add(
- $current,
- "states",
- lv_states_1_0,
- "State");
- afterParserOrEnumRuleCall();
- }
-
-)
-)( otherlv_2=','
- {
- newLeafNode(otherlv_2, grammarAccess.getStateDeclarationAccess().getCommaKeyword_2_0());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getStateDeclarationAccess().getStatesStateParserRuleCall_2_1_0());
- }
- lv_states_3_0=ruleState {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getStateDeclarationRule());
- }
- add(
- $current,
- "states",
- lv_states_3_0,
- "State");
- afterParserOrEnumRuleCall();
- }
-
-)
-))*)
-;
-
-
-
-
-
-// Entry rule entryRuleInitialDeclaration
-entryRuleInitialDeclaration returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getInitialDeclarationRule()); }
- iv_ruleInitialDeclaration=ruleInitialDeclaration
- { $current=$iv_ruleInitialDeclaration.current; }
- EOF
-;
-
-// Rule InitialDeclaration
-ruleInitialDeclaration returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='initial:'
- {
- newLeafNode(otherlv_0, grammarAccess.getInitialDeclarationAccess().getInitialKeyword_0());
- }
-(
-(
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getInitialDeclarationRule());
- }
- }
- otherlv_1=RULE_ID
- {
- newLeafNode(otherlv_1, grammarAccess.getInitialDeclarationAccess().getInitialStateCrossReference_1_0());
- }
-
-)
-))
-;
-
-
-
-
-
-// Entry rule entryRuleLoopsDeclaration
-entryRuleLoopsDeclaration returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getLoopsDeclarationRule()); }
- iv_ruleLoopsDeclaration=ruleLoopsDeclaration
- { $current=$iv_ruleLoopsDeclaration.current; }
- EOF
-;
-
-// Rule LoopsDeclaration
-ruleLoopsDeclaration returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='loops:'
- {
- newLeafNode(otherlv_0, grammarAccess.getLoopsDeclarationAccess().getLoopsKeyword_0());
- }
-(
-(
- lv_val_1_0=RULE_INT
- {
- newLeafNode(lv_val_1_0, grammarAccess.getLoopsDeclarationAccess().getValINTTerminalRuleCall_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getLoopsDeclarationRule());
- }
- setWithLastConsumed(
- $current,
- "val",
- lv_val_1_0,
- "INT");
- }
-
-)
-))
-;
-
-
-
-
-
-// Entry rule entryRuleSeedDeclaration
-entryRuleSeedDeclaration returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getSeedDeclarationRule()); }
- iv_ruleSeedDeclaration=ruleSeedDeclaration
- { $current=$iv_ruleSeedDeclaration.current; }
- EOF
-;
-
-// Rule SeedDeclaration
-ruleSeedDeclaration returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='randseed:'
- {
- newLeafNode(otherlv_0, grammarAccess.getSeedDeclarationAccess().getRandseedKeyword_0());
- }
-(
-(
- lv_val_1_0=RULE_INT
- {
- newLeafNode(lv_val_1_0, grammarAccess.getSeedDeclarationAccess().getValINTTerminalRuleCall_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getSeedDeclarationRule());
- }
- setWithLastConsumed(
- $current,
- "val",
- lv_val_1_0,
- "INT");
- }
-
-)
-))
-;
-
-
-
-
-
-// Entry rule entryRuleSignalDeclaration
-entryRuleSignalDeclaration returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getSignalDeclarationRule()); }
- iv_ruleSignalDeclaration=ruleSignalDeclaration
- { $current=$iv_ruleSignalDeclaration.current; }
- EOF
-;
-
-// Rule SignalDeclaration
-ruleSignalDeclaration returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-(((
-(
- lv_port_0_0=RULE_ID
- {
- newLeafNode(lv_port_0_0, grammarAccess.getSignalDeclarationAccess().getPortIDTerminalRuleCall_0_0_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getSignalDeclarationRule());
- }
- setWithLastConsumed(
- $current,
- "port",
- lv_port_0_0,
- "ID");
- }
-
-)
-) otherlv_1='.'
- {
- newLeafNode(otherlv_1, grammarAccess.getSignalDeclarationAccess().getFullStopKeyword_0_1());
- }
-)?(
-(
- lv_signame_2_0=RULE_ID
- {
- newLeafNode(lv_signame_2_0, grammarAccess.getSignalDeclarationAccess().getSignameIDTerminalRuleCall_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getSignalDeclarationRule());
- }
- setWithLastConsumed(
- $current,
- "signame",
- lv_signame_2_0,
- "ID");
- }
-
-)
-)(( otherlv_3='='
- {
- newLeafNode(otherlv_3, grammarAccess.getSignalDeclarationAccess().getEqualsSignKeyword_2_0_0());
- }
-(
-(
- lv_intVal_4_0=RULE_INT
- {
- newLeafNode(lv_intVal_4_0, grammarAccess.getSignalDeclarationAccess().getIntValINTTerminalRuleCall_2_0_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getSignalDeclarationRule());
- }
- setWithLastConsumed(
- $current,
- "intVal",
- lv_intVal_4_0,
- "INT");
- }
-
-)
-))
- |( otherlv_5='='
- {
- newLeafNode(otherlv_5, grammarAccess.getSignalDeclarationAccess().getEqualsSignKeyword_2_1_0());
- }
-(
-(
- lv_strVal_6_0=RULE_STRING
- {
- newLeafNode(lv_strVal_6_0, grammarAccess.getSignalDeclarationAccess().getStrValSTRINGTerminalRuleCall_2_1_1_0());
- }
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getSignalDeclarationRule());
- }
- setWithLastConsumed(
- $current,
- "strVal",
- lv_strVal_6_0,
- "STRING");
- }
-
-)
-)))?)
-;
-
-
-
-
-
-// Entry rule entryRuleSourceDeclaration
-entryRuleSourceDeclaration returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getSourceDeclarationRule()); }
- iv_ruleSourceDeclaration=ruleSourceDeclaration
- { $current=$iv_ruleSourceDeclaration.current; }
- EOF
-;
-
-// Rule SourceDeclaration
-ruleSourceDeclaration returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-((
-(
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getSourceDeclarationRule());
- }
- }
- otherlv_0=RULE_ID
- {
- newLeafNode(otherlv_0, grammarAccess.getSourceDeclarationAccess().getRefStateCrossReference_0_0());
- }
-
-)
-) otherlv_1=':'
- {
- newLeafNode(otherlv_1, grammarAccess.getSourceDeclarationAccess().getColonKeyword_1());
- }
-)
-;
-
-
-
-
-
-// Entry rule entryRuleDestinationDeclaration
-entryRuleDestinationDeclaration returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getDestinationDeclarationRule()); }
- iv_ruleDestinationDeclaration=ruleDestinationDeclaration
- { $current=$iv_ruleDestinationDeclaration.current; }
- EOF
-;
-
-// Rule DestinationDeclaration
-ruleDestinationDeclaration returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-( otherlv_0='-> '
- {
- newLeafNode(otherlv_0, grammarAccess.getDestinationDeclarationAccess().getHyphenMinusGreaterThanSignSpaceKeyword_0());
- }
-(
-(
- {
- if ($current==null) {
- $current = createModelElement(grammarAccess.getDestinationDeclarationRule());
- }
- }
- otherlv_1=RULE_ID
- {
- newLeafNode(otherlv_1, grammarAccess.getDestinationDeclarationAccess().getRefStateCrossReference_1_0());
- }
-
-)
-))
-;
-
-
-
-
-
-// Entry rule entryRuleTransitionDeclaration
-entryRuleTransitionDeclaration returns [EObject current=null]
- :
- { newCompositeNode(grammarAccess.getTransitionDeclarationRule()); }
- iv_ruleTransitionDeclaration=ruleTransitionDeclaration
- { $current=$iv_ruleTransitionDeclaration.current; }
- EOF
-;
-
-// Rule TransitionDeclaration
-ruleTransitionDeclaration returns [EObject current=null]
- @init { enterRule();
- }
- @after { leaveRule(); }:
-((
-(
- {
- newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getSourceSourceDeclarationParserRuleCall_0_0());
- }
- lv_source_0_0=ruleSourceDeclaration {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
- }
- set(
- $current,
- "source",
- lv_source_0_0,
- "SourceDeclaration");
- afterParserOrEnumRuleCall();
- }
-
-)
-) otherlv_1='in:'
- {
- newLeafNode(otherlv_1, grammarAccess.getTransitionDeclarationAccess().getInKeyword_1());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getInSignalDeclarationParserRuleCall_2_0());
- }
- lv_in_2_0=ruleSignalDeclaration {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
- }
- add(
- $current,
- "in",
- lv_in_2_0,
- "SignalDeclaration");
- afterParserOrEnumRuleCall();
- }
-
-)
-)* otherlv_3='out:'
- {
- newLeafNode(otherlv_3, grammarAccess.getTransitionDeclarationAccess().getOutKeyword_3());
- }
-(
-(
- {
- newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getOutSignalDeclarationParserRuleCall_4_0());
- }
- lv_out_4_0=ruleSignalDeclaration {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
- }
- add(
- $current,
- "out",
- lv_out_4_0,
- "SignalDeclaration");
- afterParserOrEnumRuleCall();
- }
-
-)
-)*(
-(
- {
- newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getDestinationDestinationDeclarationParserRuleCall_5_0());
- }
- lv_destination_5_0=ruleDestinationDeclaration {
- if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
- }
- set(
- $current,
- "destination",
- lv_destination_5_0,
- "DestinationDeclaration");
- afterParserOrEnumRuleCall();
- }
-
-)
-))
-;
-
-
-
-
-
-RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
-
-RULE_INT : ('0'..'9')+;
-
-RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
-
-RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
-
-RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
-
-RULE_WS : (' '|'\t'|'\r'|'\n')+;
-
-RULE_ANY_OTHER : .;
-
-
+/*
+* generated by Xtext
+*/
+grammar InternalFSMtest;
+
+options {
+ superClass=AbstractInternalAntlrParser;
+
+}
+
+@lexer::header {
+package org.eclipse.etrice.generator.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+@parser::header {
+package org.eclipse.etrice.generator.parser.antlr.internal;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.etrice.generator.services.FSMtestGrammarAccess;
+
+}
+
+@parser::members {
+
+ private FSMtestGrammarAccess grammarAccess;
+
+ public InternalFSMtestParser(TokenStream input, FSMtestGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "Model";
+ }
+
+ @Override
+ protected FSMtestGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+
+
+
+// Entry rule entryRuleModel
+entryRuleModel returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getModelRule()); }
+ iv_ruleModel=ruleModel
+ { $current=$iv_ruleModel.current; }
+ EOF
+;
+
+// Rule Model
+ruleModel returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+(
+ {
+ newCompositeNode(grammarAccess.getModelAccess().getTestscriptsTestscriptParserRuleCall_0());
+ }
+ lv_Testscripts_0_0=ruleTestscript {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getModelRule());
+ }
+ add(
+ $current,
+ "Testscripts",
+ lv_Testscripts_0_0,
+ "Testscript");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*
+;
+
+
+
+
+
+// Entry rule entryRuleTestscript
+entryRuleTestscript returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getTestscriptRule()); }
+ iv_ruleTestscript=ruleTestscript
+ { $current=$iv_ruleTestscript.current; }
+ EOF
+;
+
+// Rule Testscript
+ruleTestscript returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='fsmtest'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getTestscriptAccess().getFsmtestKeyword_0());
+ }
+(
+(
+ lv_name_1_0=RULE_ID
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getTestscriptAccess().getNameIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getTestscriptRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "ID");
+ }
+
+)
+)(
+(
+ {
+ newCompositeNode(grammarAccess.getTestscriptAccess().getStateDeclarationStateDeclarationParserRuleCall_2_0());
+ }
+ lv_stateDeclaration_2_0=ruleStateDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTestscriptRule());
+ }
+ set(
+ $current,
+ "stateDeclaration",
+ lv_stateDeclaration_2_0,
+ "StateDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)(
+(
+ {
+ newCompositeNode(grammarAccess.getTestscriptAccess().getInitialDeclarationInitialDeclarationParserRuleCall_3_0());
+ }
+ lv_initialDeclaration_3_0=ruleInitialDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTestscriptRule());
+ }
+ set(
+ $current,
+ "initialDeclaration",
+ lv_initialDeclaration_3_0,
+ "InitialDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)(
+(
+ {
+ newCompositeNode(grammarAccess.getTestscriptAccess().getLoopsDeclarationLoopsDeclarationParserRuleCall_4_0());
+ }
+ lv_loopsDeclaration_4_0=ruleLoopsDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTestscriptRule());
+ }
+ set(
+ $current,
+ "loopsDeclaration",
+ lv_loopsDeclaration_4_0,
+ "LoopsDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)(
+(
+ {
+ newCompositeNode(grammarAccess.getTestscriptAccess().getSeedDeclarationSeedDeclarationParserRuleCall_5_0());
+ }
+ lv_seedDeclaration_5_0=ruleSeedDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTestscriptRule());
+ }
+ set(
+ $current,
+ "seedDeclaration",
+ lv_seedDeclaration_5_0,
+ "SeedDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)?(
+(
+ {
+ newCompositeNode(grammarAccess.getTestscriptAccess().getTransitionDeclarationsTransitionDeclarationParserRuleCall_6_0());
+ }
+ lv_transitionDeclarations_6_0=ruleTransitionDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTestscriptRule());
+ }
+ add(
+ $current,
+ "transitionDeclarations",
+ lv_transitionDeclarations_6_0,
+ "TransitionDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)* otherlv_7=';'
+ {
+ newLeafNode(otherlv_7, grammarAccess.getTestscriptAccess().getSemicolonKeyword_7());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleState
+entryRuleState returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getStateRule()); }
+ iv_ruleState=ruleState
+ { $current=$iv_ruleState.current; }
+ EOF
+;
+
+// Rule State
+ruleState returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(
+(
+ lv_name_0_0=RULE_ID
+ {
+ newLeafNode(lv_name_0_0, grammarAccess.getStateAccess().getNameIDTerminalRuleCall_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getStateRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_0_0,
+ "ID");
+ }
+
+)
+)
+;
+
+
+
+
+
+// Entry rule entryRuleStateDeclaration
+entryRuleStateDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getStateDeclarationRule()); }
+ iv_ruleStateDeclaration=ruleStateDeclaration
+ { $current=$iv_ruleStateDeclaration.current; }
+ EOF
+;
+
+// Rule StateDeclaration
+ruleStateDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='states:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getStateDeclarationAccess().getStatesKeyword_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getStateDeclarationAccess().getStatesStateParserRuleCall_1_0());
+ }
+ lv_states_1_0=ruleState {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getStateDeclarationRule());
+ }
+ add(
+ $current,
+ "states",
+ lv_states_1_0,
+ "State");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)( otherlv_2=','
+ {
+ newLeafNode(otherlv_2, grammarAccess.getStateDeclarationAccess().getCommaKeyword_2_0());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getStateDeclarationAccess().getStatesStateParserRuleCall_2_1_0());
+ }
+ lv_states_3_0=ruleState {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getStateDeclarationRule());
+ }
+ add(
+ $current,
+ "states",
+ lv_states_3_0,
+ "State");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))*)
+;
+
+
+
+
+
+// Entry rule entryRuleInitialDeclaration
+entryRuleInitialDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getInitialDeclarationRule()); }
+ iv_ruleInitialDeclaration=ruleInitialDeclaration
+ { $current=$iv_ruleInitialDeclaration.current; }
+ EOF
+;
+
+// Rule InitialDeclaration
+ruleInitialDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='initial:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getInitialDeclarationAccess().getInitialKeyword_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getInitialDeclarationRule());
+ }
+ }
+ otherlv_1=RULE_ID
+ {
+ newLeafNode(otherlv_1, grammarAccess.getInitialDeclarationAccess().getInitialStateCrossReference_1_0());
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleLoopsDeclaration
+entryRuleLoopsDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getLoopsDeclarationRule()); }
+ iv_ruleLoopsDeclaration=ruleLoopsDeclaration
+ { $current=$iv_ruleLoopsDeclaration.current; }
+ EOF
+;
+
+// Rule LoopsDeclaration
+ruleLoopsDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='loops:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getLoopsDeclarationAccess().getLoopsKeyword_0());
+ }
+(
+(
+ lv_val_1_0=RULE_INT
+ {
+ newLeafNode(lv_val_1_0, grammarAccess.getLoopsDeclarationAccess().getValINTTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getLoopsDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "val",
+ lv_val_1_0,
+ "INT");
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleSeedDeclaration
+entryRuleSeedDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getSeedDeclarationRule()); }
+ iv_ruleSeedDeclaration=ruleSeedDeclaration
+ { $current=$iv_ruleSeedDeclaration.current; }
+ EOF
+;
+
+// Rule SeedDeclaration
+ruleSeedDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='randseed:'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getSeedDeclarationAccess().getRandseedKeyword_0());
+ }
+(
+(
+ lv_val_1_0=RULE_INT
+ {
+ newLeafNode(lv_val_1_0, grammarAccess.getSeedDeclarationAccess().getValINTTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSeedDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "val",
+ lv_val_1_0,
+ "INT");
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleSignalDeclaration
+entryRuleSignalDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getSignalDeclarationRule()); }
+ iv_ruleSignalDeclaration=ruleSignalDeclaration
+ { $current=$iv_ruleSignalDeclaration.current; }
+ EOF
+;
+
+// Rule SignalDeclaration
+ruleSignalDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+(((
+(
+ lv_port_0_0=RULE_ID
+ {
+ newLeafNode(lv_port_0_0, grammarAccess.getSignalDeclarationAccess().getPortIDTerminalRuleCall_0_0_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSignalDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "port",
+ lv_port_0_0,
+ "ID");
+ }
+
+)
+) otherlv_1='.'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getSignalDeclarationAccess().getFullStopKeyword_0_1());
+ }
+)?(
+(
+ lv_signame_2_0=RULE_ID
+ {
+ newLeafNode(lv_signame_2_0, grammarAccess.getSignalDeclarationAccess().getSignameIDTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSignalDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "signame",
+ lv_signame_2_0,
+ "ID");
+ }
+
+)
+)(( otherlv_3='='
+ {
+ newLeafNode(otherlv_3, grammarAccess.getSignalDeclarationAccess().getEqualsSignKeyword_2_0_0());
+ }
+(
+(
+ lv_intVal_4_0=RULE_INT
+ {
+ newLeafNode(lv_intVal_4_0, grammarAccess.getSignalDeclarationAccess().getIntValINTTerminalRuleCall_2_0_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSignalDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "intVal",
+ lv_intVal_4_0,
+ "INT");
+ }
+
+)
+))
+ |( otherlv_5='='
+ {
+ newLeafNode(otherlv_5, grammarAccess.getSignalDeclarationAccess().getEqualsSignKeyword_2_1_0());
+ }
+(
+(
+ lv_strVal_6_0=RULE_STRING
+ {
+ newLeafNode(lv_strVal_6_0, grammarAccess.getSignalDeclarationAccess().getStrValSTRINGTerminalRuleCall_2_1_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSignalDeclarationRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "strVal",
+ lv_strVal_6_0,
+ "STRING");
+ }
+
+)
+)))?)
+;
+
+
+
+
+
+// Entry rule entryRuleSourceDeclaration
+entryRuleSourceDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getSourceDeclarationRule()); }
+ iv_ruleSourceDeclaration=ruleSourceDeclaration
+ { $current=$iv_ruleSourceDeclaration.current; }
+ EOF
+;
+
+// Rule SourceDeclaration
+ruleSourceDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getSourceDeclarationRule());
+ }
+ }
+ otherlv_0=RULE_ID
+ {
+ newLeafNode(otherlv_0, grammarAccess.getSourceDeclarationAccess().getRefStateCrossReference_0_0());
+ }
+
+)
+) otherlv_1=':'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getSourceDeclarationAccess().getColonKeyword_1());
+ }
+)
+;
+
+
+
+
+
+// Entry rule entryRuleDestinationDeclaration
+entryRuleDestinationDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getDestinationDeclarationRule()); }
+ iv_ruleDestinationDeclaration=ruleDestinationDeclaration
+ { $current=$iv_ruleDestinationDeclaration.current; }
+ EOF
+;
+
+// Rule DestinationDeclaration
+ruleDestinationDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+( otherlv_0='-> '
+ {
+ newLeafNode(otherlv_0, grammarAccess.getDestinationDeclarationAccess().getHyphenMinusGreaterThanSignSpaceKeyword_0());
+ }
+(
+(
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getDestinationDeclarationRule());
+ }
+ }
+ otherlv_1=RULE_ID
+ {
+ newLeafNode(otherlv_1, grammarAccess.getDestinationDeclarationAccess().getRefStateCrossReference_1_0());
+ }
+
+)
+))
+;
+
+
+
+
+
+// Entry rule entryRuleTransitionDeclaration
+entryRuleTransitionDeclaration returns [EObject current=null]
+ :
+ { newCompositeNode(grammarAccess.getTransitionDeclarationRule()); }
+ iv_ruleTransitionDeclaration=ruleTransitionDeclaration
+ { $current=$iv_ruleTransitionDeclaration.current; }
+ EOF
+;
+
+// Rule TransitionDeclaration
+ruleTransitionDeclaration returns [EObject current=null]
+ @init { enterRule();
+ }
+ @after { leaveRule(); }:
+((
+(
+ {
+ newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getSourceSourceDeclarationParserRuleCall_0_0());
+ }
+ lv_source_0_0=ruleSourceDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
+ }
+ set(
+ $current,
+ "source",
+ lv_source_0_0,
+ "SourceDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+) otherlv_1='in:'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getTransitionDeclarationAccess().getInKeyword_1());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getInSignalDeclarationParserRuleCall_2_0());
+ }
+ lv_in_2_0=ruleSignalDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
+ }
+ add(
+ $current,
+ "in",
+ lv_in_2_0,
+ "SignalDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)* otherlv_3='out:'
+ {
+ newLeafNode(otherlv_3, grammarAccess.getTransitionDeclarationAccess().getOutKeyword_3());
+ }
+(
+(
+ {
+ newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getOutSignalDeclarationParserRuleCall_4_0());
+ }
+ lv_out_4_0=ruleSignalDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
+ }
+ add(
+ $current,
+ "out",
+ lv_out_4_0,
+ "SignalDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+)*(
+(
+ {
+ newCompositeNode(grammarAccess.getTransitionDeclarationAccess().getDestinationDestinationDeclarationParserRuleCall_5_0());
+ }
+ lv_destination_5_0=ruleDestinationDeclaration {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getTransitionDeclarationRule());
+ }
+ set(
+ $current,
+ "destination",
+ lv_destination_5_0,
+ "DestinationDeclaration");
+ afterParserOrEnumRuleCall();
+ }
+
+)
+))
+;
+
+
+
+
+
+RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
+
+RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
+
+

Back to the top