package insa.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 insa.services.LegoGrammarAccess; import org.antlr.runtime.*; import java.util.Stack; import java.util.List; import java.util.ArrayList; @SuppressWarnings("all") public class InternalLegoParser extends AbstractInternalAntlrParser { public static final String[] tokenNames = new String[] { "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_DOUBLE", "RULE_STRING", "RULE_INT", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_DIGIT", "'while'", "'do'", "'end'", "'not'", "'and'", "'if'", "'then'", "'else'", "'hasTurned'", "'('", "'angle'", "'='", "')'", "'move'", "'power'", "'display'", "'msg'", "','", "'duration'", "'line'", "'col'", "'setTurnAngle'", "'stopEngine'", "'stopProgram'", "'turn'", "'obstacle'", "'distance'", "'true'", "'false'" }; public static final int RULE_STRING=5; public static final int RULE_SL_COMMENT=8; public static final int T__19=19; public static final int T__15=15; public static final int T__37=37; public static final int RULE_DOUBLE=4; public static final int T__16=16; public static final int T__38=38; public static final int T__17=17; public static final int T__39=39; public static final int T__18=18; public static final int T__11=11; public static final int T__33=33; public static final int T__12=12; public static final int T__34=34; public static final int T__13=13; public static final int T__35=35; public static final int T__14=14; public static final int T__36=36; public static final int EOF=-1; public static final int T__30=30; public static final int T__31=31; public static final int T__32=32; public static final int RULE_WS=9; public static final int RULE_DIGIT=10; public static final int T__26=26; public static final int T__27=27; public static final int T__28=28; public static final int RULE_INT=6; public static final int T__29=29; public static final int T__22=22; public static final int RULE_ML_COMMENT=7; public static final int T__23=23; public static final int T__24=24; public static final int T__25=25; public static final int T__20=20; public static final int T__21=21; // delegates // delegators public InternalLegoParser(TokenStream input) { this(input, new RecognizerSharedState()); } public InternalLegoParser(TokenStream input, RecognizerSharedState state) { super(input, state); } public String[] getTokenNames() { return InternalLegoParser.tokenNames; } public String getGrammarFileName() { return "../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g"; } private LegoGrammarAccess grammarAccess; public InternalLegoParser(TokenStream input, LegoGrammarAccess grammarAccess) { this(input); this.grammarAccess = grammarAccess; registerRules(grammarAccess.getGrammar()); } @Override protected String getFirstRuleName() { return "ProgramUnit"; } @Override protected LegoGrammarAccess getGrammarAccess() { return grammarAccess; } // $ANTLR start "entryRuleProgramUnit" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:67:1: entryRuleProgramUnit returns [EObject current=null] : iv_ruleProgramUnit= ruleProgramUnit EOF ; public final EObject entryRuleProgramUnit() throws RecognitionException { EObject current = null; EObject iv_ruleProgramUnit = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:68:2: (iv_ruleProgramUnit= ruleProgramUnit EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:69:2: iv_ruleProgramUnit= ruleProgramUnit EOF { newCompositeNode(grammarAccess.getProgramUnitRule()); pushFollow(FollowSets000.FOLLOW_ruleProgramUnit_in_entryRuleProgramUnit75); iv_ruleProgramUnit=ruleProgramUnit(); state._fsp--; current =iv_ruleProgramUnit; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleProgramUnit85); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleProgramUnit" // $ANTLR start "ruleProgramUnit" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:76:1: ruleProgramUnit returns [EObject current=null] : ( (lv_block_0_0= ruleExpression ) )* ; public final EObject ruleProgramUnit() throws RecognitionException { EObject current = null; EObject lv_block_0_0 = null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:79:28: ( ( (lv_block_0_0= ruleExpression ) )* ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:80:1: ( (lv_block_0_0= ruleExpression ) )* { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:80:1: ( (lv_block_0_0= ruleExpression ) )* loop1: do { int alt1=2; int LA1_0 = input.LA(1); if ( (LA1_0==11||(LA1_0>=14 && LA1_0<=16)||LA1_0==19||LA1_0==24||LA1_0==26||(LA1_0>=32 && LA1_0<=36)) ) { alt1=1; } switch (alt1) { case 1 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:81:1: (lv_block_0_0= ruleExpression ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:81:1: (lv_block_0_0= ruleExpression ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:82:3: lv_block_0_0= ruleExpression { newCompositeNode(grammarAccess.getProgramUnitAccess().getBlockExpressionParserRuleCall_0()); pushFollow(FollowSets000.FOLLOW_ruleExpression_in_ruleProgramUnit130); lv_block_0_0=ruleExpression(); state._fsp--; if (current==null) { current = createModelElementForParent(grammarAccess.getProgramUnitRule()); } add( current, "block", lv_block_0_0, "Expression"); afterParserOrEnumRuleCall(); } } break; default : break loop1; } } while (true); } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleProgramUnit" // $ANTLR start "entryRuleExpression" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:106:1: entryRuleExpression returns [EObject current=null] : iv_ruleExpression= ruleExpression EOF ; public final EObject entryRuleExpression() throws RecognitionException { EObject current = null; EObject iv_ruleExpression = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:107:2: (iv_ruleExpression= ruleExpression EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:108:2: iv_ruleExpression= ruleExpression EOF { newCompositeNode(grammarAccess.getExpressionRule()); pushFollow(FollowSets000.FOLLOW_ruleExpression_in_entryRuleExpression166); iv_ruleExpression=ruleExpression(); state._fsp--; current =iv_ruleExpression; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleExpression176); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleExpression" // $ANTLR start "ruleExpression" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:115:1: ruleExpression returns [EObject current=null] : (this_WhileLoop_0= ruleWhileLoop | this_NegExp_1= ruleNegExp | this_AndExp_2= ruleAndExp | this_IfBlock_3= ruleIfBlock | this_Command_4= ruleCommand ) ; public final EObject ruleExpression() throws RecognitionException { EObject current = null; EObject this_WhileLoop_0 = null; EObject this_NegExp_1 = null; EObject this_AndExp_2 = null; EObject this_IfBlock_3 = null; EObject this_Command_4 = null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:118:28: ( (this_WhileLoop_0= ruleWhileLoop | this_NegExp_1= ruleNegExp | this_AndExp_2= ruleAndExp | this_IfBlock_3= ruleIfBlock | this_Command_4= ruleCommand ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:119:1: (this_WhileLoop_0= ruleWhileLoop | this_NegExp_1= ruleNegExp | this_AndExp_2= ruleAndExp | this_IfBlock_3= ruleIfBlock | this_Command_4= ruleCommand ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:119:1: (this_WhileLoop_0= ruleWhileLoop | this_NegExp_1= ruleNegExp | this_AndExp_2= ruleAndExp | this_IfBlock_3= ruleIfBlock | this_Command_4= ruleCommand ) int alt2=5; switch ( input.LA(1) ) { case 11: { alt2=1; } break; case 14: { alt2=2; } break; case 15: { alt2=3; } break; case 16: { alt2=4; } break; case 19: case 24: case 26: case 32: case 33: case 34: case 35: case 36: { alt2=5; } break; default: NoViableAltException nvae = new NoViableAltException("", 2, 0, input); throw nvae; } switch (alt2) { case 1 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:120:5: this_WhileLoop_0= ruleWhileLoop { newCompositeNode(grammarAccess.getExpressionAccess().getWhileLoopParserRuleCall_0()); pushFollow(FollowSets000.FOLLOW_ruleWhileLoop_in_ruleExpression223); this_WhileLoop_0=ruleWhileLoop(); state._fsp--; current = this_WhileLoop_0; afterParserOrEnumRuleCall(); } break; case 2 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:130:5: this_NegExp_1= ruleNegExp { newCompositeNode(grammarAccess.getExpressionAccess().getNegExpParserRuleCall_1()); pushFollow(FollowSets000.FOLLOW_ruleNegExp_in_ruleExpression250); this_NegExp_1=ruleNegExp(); state._fsp--; current = this_NegExp_1; afterParserOrEnumRuleCall(); } break; case 3 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:140:5: this_AndExp_2= ruleAndExp { newCompositeNode(grammarAccess.getExpressionAccess().getAndExpParserRuleCall_2()); pushFollow(FollowSets000.FOLLOW_ruleAndExp_in_ruleExpression277); this_AndExp_2=ruleAndExp(); state._fsp--; current = this_AndExp_2; afterParserOrEnumRuleCall(); } break; case 4 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:150:5: this_IfBlock_3= ruleIfBlock { newCompositeNode(grammarAccess.getExpressionAccess().getIfBlockParserRuleCall_3()); pushFollow(FollowSets000.FOLLOW_ruleIfBlock_in_ruleExpression304); this_IfBlock_3=ruleIfBlock(); state._fsp--; current = this_IfBlock_3; afterParserOrEnumRuleCall(); } break; case 5 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:160:5: this_Command_4= ruleCommand { newCompositeNode(grammarAccess.getExpressionAccess().getCommandParserRuleCall_4()); pushFollow(FollowSets000.FOLLOW_ruleCommand_in_ruleExpression331); this_Command_4=ruleCommand(); state._fsp--; current = this_Command_4; afterParserOrEnumRuleCall(); } break; } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleExpression" // $ANTLR start "entryRuleBoolExp" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:176:1: entryRuleBoolExp returns [EObject current=null] : iv_ruleBoolExp= ruleBoolExp EOF ; public final EObject entryRuleBoolExp() throws RecognitionException { EObject current = null; EObject iv_ruleBoolExp = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:177:2: (iv_ruleBoolExp= ruleBoolExp EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:178:2: iv_ruleBoolExp= ruleBoolExp EOF { newCompositeNode(grammarAccess.getBoolExpRule()); pushFollow(FollowSets000.FOLLOW_ruleBoolExp_in_entryRuleBoolExp366); iv_ruleBoolExp=ruleBoolExp(); state._fsp--; current =iv_ruleBoolExp; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleBoolExp376); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleBoolExp" // $ANTLR start "ruleBoolExp" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:185:1: ruleBoolExp returns [EObject current=null] : (this_NegExp_0= ruleNegExp | this_AndExp_1= ruleAndExp | this_HasTurnedCmd_2= ruleHasTurnedCmd | this_ObstacleCmd_3= ruleObstacleCmd ) ; public final EObject ruleBoolExp() throws RecognitionException { EObject current = null; EObject this_NegExp_0 = null; EObject this_AndExp_1 = null; EObject this_HasTurnedCmd_2 = null; EObject this_ObstacleCmd_3 = null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:188:28: ( (this_NegExp_0= ruleNegExp | this_AndExp_1= ruleAndExp | this_HasTurnedCmd_2= ruleHasTurnedCmd | this_ObstacleCmd_3= ruleObstacleCmd ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:189:1: (this_NegExp_0= ruleNegExp | this_AndExp_1= ruleAndExp | this_HasTurnedCmd_2= ruleHasTurnedCmd | this_ObstacleCmd_3= ruleObstacleCmd ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:189:1: (this_NegExp_0= ruleNegExp | this_AndExp_1= ruleAndExp | this_HasTurnedCmd_2= ruleHasTurnedCmd | this_ObstacleCmd_3= ruleObstacleCmd ) int alt3=4; switch ( input.LA(1) ) { case 14: { alt3=1; } break; case 15: { alt3=2; } break; case 19: { alt3=3; } break; case 36: { alt3=4; } break; default: NoViableAltException nvae = new NoViableAltException("", 3, 0, input); throw nvae; } switch (alt3) { case 1 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:190:5: this_NegExp_0= ruleNegExp { newCompositeNode(grammarAccess.getBoolExpAccess().getNegExpParserRuleCall_0()); pushFollow(FollowSets000.FOLLOW_ruleNegExp_in_ruleBoolExp423); this_NegExp_0=ruleNegExp(); state._fsp--; current = this_NegExp_0; afterParserOrEnumRuleCall(); } break; case 2 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:200:5: this_AndExp_1= ruleAndExp { newCompositeNode(grammarAccess.getBoolExpAccess().getAndExpParserRuleCall_1()); pushFollow(FollowSets000.FOLLOW_ruleAndExp_in_ruleBoolExp450); this_AndExp_1=ruleAndExp(); state._fsp--; current = this_AndExp_1; afterParserOrEnumRuleCall(); } break; case 3 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:210:5: this_HasTurnedCmd_2= ruleHasTurnedCmd { newCompositeNode(grammarAccess.getBoolExpAccess().getHasTurnedCmdParserRuleCall_2()); pushFollow(FollowSets000.FOLLOW_ruleHasTurnedCmd_in_ruleBoolExp477); this_HasTurnedCmd_2=ruleHasTurnedCmd(); state._fsp--; current = this_HasTurnedCmd_2; afterParserOrEnumRuleCall(); } break; case 4 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:220:5: this_ObstacleCmd_3= ruleObstacleCmd { newCompositeNode(grammarAccess.getBoolExpAccess().getObstacleCmdParserRuleCall_3()); pushFollow(FollowSets000.FOLLOW_ruleObstacleCmd_in_ruleBoolExp504); this_ObstacleCmd_3=ruleObstacleCmd(); state._fsp--; current = this_ObstacleCmd_3; afterParserOrEnumRuleCall(); } break; } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleBoolExp" // $ANTLR start "entryRuleWhileLoop" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:236:1: entryRuleWhileLoop returns [EObject current=null] : iv_ruleWhileLoop= ruleWhileLoop EOF ; public final EObject entryRuleWhileLoop() throws RecognitionException { EObject current = null; EObject iv_ruleWhileLoop = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:237:2: (iv_ruleWhileLoop= ruleWhileLoop EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:238:2: iv_ruleWhileLoop= ruleWhileLoop EOF { newCompositeNode(grammarAccess.getWhileLoopRule()); pushFollow(FollowSets000.FOLLOW_ruleWhileLoop_in_entryRuleWhileLoop539); iv_ruleWhileLoop=ruleWhileLoop(); state._fsp--; current =iv_ruleWhileLoop; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleWhileLoop549); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleWhileLoop" // $ANTLR start "ruleWhileLoop" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:245:1: ruleWhileLoop returns [EObject current=null] : (otherlv_0= 'while' ( (lv_loopCond_1_0= ruleBoolExp ) ) otherlv_2= 'do' ( (lv_block_3_0= ruleExpression ) )* otherlv_4= 'end' ) ; public final EObject ruleWhileLoop() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token otherlv_2=null; Token otherlv_4=null; EObject lv_loopCond_1_0 = null; EObject lv_block_3_0 = null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:248:28: ( (otherlv_0= 'while' ( (lv_loopCond_1_0= ruleBoolExp ) ) otherlv_2= 'do' ( (lv_block_3_0= ruleExpression ) )* otherlv_4= 'end' ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:249:1: (otherlv_0= 'while' ( (lv_loopCond_1_0= ruleBoolExp ) ) otherlv_2= 'do' ( (lv_block_3_0= ruleExpression ) )* otherlv_4= 'end' ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:249:1: (otherlv_0= 'while' ( (lv_loopCond_1_0= ruleBoolExp ) ) otherlv_2= 'do' ( (lv_block_3_0= ruleExpression ) )* otherlv_4= 'end' ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:249:3: otherlv_0= 'while' ( (lv_loopCond_1_0= ruleBoolExp ) ) otherlv_2= 'do' ( (lv_block_3_0= ruleExpression ) )* otherlv_4= 'end' { otherlv_0=(Token)match(input,11,FollowSets000.FOLLOW_11_in_ruleWhileLoop586); newLeafNode(otherlv_0, grammarAccess.getWhileLoopAccess().getWhileKeyword_0()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:253:1: ( (lv_loopCond_1_0= ruleBoolExp ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:254:1: (lv_loopCond_1_0= ruleBoolExp ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:254:1: (lv_loopCond_1_0= ruleBoolExp ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:255:3: lv_loopCond_1_0= ruleBoolExp { newCompositeNode(grammarAccess.getWhileLoopAccess().getLoopCondBoolExpParserRuleCall_1_0()); pushFollow(FollowSets000.FOLLOW_ruleBoolExp_in_ruleWhileLoop607); lv_loopCond_1_0=ruleBoolExp(); state._fsp--; if (current==null) { current = createModelElementForParent(grammarAccess.getWhileLoopRule()); } set( current, "loopCond", lv_loopCond_1_0, "BoolExp"); afterParserOrEnumRuleCall(); } } otherlv_2=(Token)match(input,12,FollowSets000.FOLLOW_12_in_ruleWhileLoop619); newLeafNode(otherlv_2, grammarAccess.getWhileLoopAccess().getDoKeyword_2()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:275:1: ( (lv_block_3_0= ruleExpression ) )* loop4: do { int alt4=2; int LA4_0 = input.LA(1); if ( (LA4_0==11||(LA4_0>=14 && LA4_0<=16)||LA4_0==19||LA4_0==24||LA4_0==26||(LA4_0>=32 && LA4_0<=36)) ) { alt4=1; } switch (alt4) { case 1 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:276:1: (lv_block_3_0= ruleExpression ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:276:1: (lv_block_3_0= ruleExpression ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:277:3: lv_block_3_0= ruleExpression { newCompositeNode(grammarAccess.getWhileLoopAccess().getBlockExpressionParserRuleCall_3_0()); pushFollow(FollowSets000.FOLLOW_ruleExpression_in_ruleWhileLoop640); lv_block_3_0=ruleExpression(); state._fsp--; if (current==null) { current = createModelElementForParent(grammarAccess.getWhileLoopRule()); } add( current, "block", lv_block_3_0, "Expression"); afterParserOrEnumRuleCall(); } } break; default : break loop4; } } while (true); otherlv_4=(Token)match(input,13,FollowSets000.FOLLOW_13_in_ruleWhileLoop653); newLeafNode(otherlv_4, grammarAccess.getWhileLoopAccess().getEndKeyword_4()); } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleWhileLoop" // $ANTLR start "entryRuleNegExp" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:305:1: entryRuleNegExp returns [EObject current=null] : iv_ruleNegExp= ruleNegExp EOF ; public final EObject entryRuleNegExp() throws RecognitionException { EObject current = null; EObject iv_ruleNegExp = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:306:2: (iv_ruleNegExp= ruleNegExp EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:307:2: iv_ruleNegExp= ruleNegExp EOF { newCompositeNode(grammarAccess.getNegExpRule()); pushFollow(FollowSets000.FOLLOW_ruleNegExp_in_entryRuleNegExp689); iv_ruleNegExp=ruleNegExp(); state._fsp--; current =iv_ruleNegExp; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleNegExp699); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleNegExp" // $ANTLR start "ruleNegExp" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:314:1: ruleNegExp returns [EObject current=null] : (otherlv_0= 'not' ( (lv_exp_1_0= ruleBoolExp ) ) ) ; public final EObject ruleNegExp() throws RecognitionException { EObject current = null; Token otherlv_0=null; EObject lv_exp_1_0 = null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:317:28: ( (otherlv_0= 'not' ( (lv_exp_1_0= ruleBoolExp ) ) ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:318:1: (otherlv_0= 'not' ( (lv_exp_1_0= ruleBoolExp ) ) ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:318:1: (otherlv_0= 'not' ( (lv_exp_1_0= ruleBoolExp ) ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:318:3: otherlv_0= 'not' ( (lv_exp_1_0= ruleBoolExp ) ) { otherlv_0=(Token)match(input,14,FollowSets000.FOLLOW_14_in_ruleNegExp736); newLeafNode(otherlv_0, grammarAccess.getNegExpAccess().getNotKeyword_0()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:322:1: ( (lv_exp_1_0= ruleBoolExp ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:323:1: (lv_exp_1_0= ruleBoolExp ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:323:1: (lv_exp_1_0= ruleBoolExp ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:324:3: lv_exp_1_0= ruleBoolExp { newCompositeNode(grammarAccess.getNegExpAccess().getExpBoolExpParserRuleCall_1_0()); pushFollow(FollowSets000.FOLLOW_ruleBoolExp_in_ruleNegExp757); lv_exp_1_0=ruleBoolExp(); state._fsp--; if (current==null) { current = createModelElementForParent(grammarAccess.getNegExpRule()); } set( current, "exp", lv_exp_1_0, "BoolExp"); afterParserOrEnumRuleCall(); } } } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleNegExp" // $ANTLR start "entryRuleAndExp" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:348:1: entryRuleAndExp returns [EObject current=null] : iv_ruleAndExp= ruleAndExp EOF ; public final EObject entryRuleAndExp() throws RecognitionException { EObject current = null; EObject iv_ruleAndExp = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:349:2: (iv_ruleAndExp= ruleAndExp EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:350:2: iv_ruleAndExp= ruleAndExp EOF { newCompositeNode(grammarAccess.getAndExpRule()); pushFollow(FollowSets000.FOLLOW_ruleAndExp_in_entryRuleAndExp793); iv_ruleAndExp=ruleAndExp(); state._fsp--; current =iv_ruleAndExp; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleAndExp803); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleAndExp" // $ANTLR start "ruleAndExp" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:357:1: ruleAndExp returns [EObject current=null] : (otherlv_0= 'and' ( (lv_leftExp_1_0= ruleBoolExp ) ) ( (lv_rightExp_2_0= ruleBoolExp ) ) ) ; public final EObject ruleAndExp() throws RecognitionException { EObject current = null; Token otherlv_0=null; EObject lv_leftExp_1_0 = null; EObject lv_rightExp_2_0 = null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:360:28: ( (otherlv_0= 'and' ( (lv_leftExp_1_0= ruleBoolExp ) ) ( (lv_rightExp_2_0= ruleBoolExp ) ) ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:361:1: (otherlv_0= 'and' ( (lv_leftExp_1_0= ruleBoolExp ) ) ( (lv_rightExp_2_0= ruleBoolExp ) ) ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:361:1: (otherlv_0= 'and' ( (lv_leftExp_1_0= ruleBoolExp ) ) ( (lv_rightExp_2_0= ruleBoolExp ) ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:361:3: otherlv_0= 'and' ( (lv_leftExp_1_0= ruleBoolExp ) ) ( (lv_rightExp_2_0= ruleBoolExp ) ) { otherlv_0=(Token)match(input,15,FollowSets000.FOLLOW_15_in_ruleAndExp840); newLeafNode(otherlv_0, grammarAccess.getAndExpAccess().getAndKeyword_0()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:365:1: ( (lv_leftExp_1_0= ruleBoolExp ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:366:1: (lv_leftExp_1_0= ruleBoolExp ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:366:1: (lv_leftExp_1_0= ruleBoolExp ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:367:3: lv_leftExp_1_0= ruleBoolExp { newCompositeNode(grammarAccess.getAndExpAccess().getLeftExpBoolExpParserRuleCall_1_0()); pushFollow(FollowSets000.FOLLOW_ruleBoolExp_in_ruleAndExp861); lv_leftExp_1_0=ruleBoolExp(); state._fsp--; if (current==null) { current = createModelElementForParent(grammarAccess.getAndExpRule()); } set( current, "leftExp", lv_leftExp_1_0, "BoolExp"); afterParserOrEnumRuleCall(); } } // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:383:2: ( (lv_rightExp_2_0= ruleBoolExp ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:384:1: (lv_rightExp_2_0= ruleBoolExp ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:384:1: (lv_rightExp_2_0= ruleBoolExp ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:385:3: lv_rightExp_2_0= ruleBoolExp { newCompositeNode(grammarAccess.getAndExpAccess().getRightExpBoolExpParserRuleCall_2_0()); pushFollow(FollowSets000.FOLLOW_ruleBoolExp_in_ruleAndExp882); lv_rightExp_2_0=ruleBoolExp(); state._fsp--; if (current==null) { current = createModelElementForParent(grammarAccess.getAndExpRule()); } set( current, "rightExp", lv_rightExp_2_0, "BoolExp"); afterParserOrEnumRuleCall(); } } } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleAndExp" // $ANTLR start "entryRuleIfBlock" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:409:1: entryRuleIfBlock returns [EObject current=null] : iv_ruleIfBlock= ruleIfBlock EOF ; public final EObject entryRuleIfBlock() throws RecognitionException { EObject current = null; EObject iv_ruleIfBlock = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:410:2: (iv_ruleIfBlock= ruleIfBlock EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:411:2: iv_ruleIfBlock= ruleIfBlock EOF { newCompositeNode(grammarAccess.getIfBlockRule()); pushFollow(FollowSets000.FOLLOW_ruleIfBlock_in_entryRuleIfBlock918); iv_ruleIfBlock=ruleIfBlock(); state._fsp--; current =iv_ruleIfBlock; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleIfBlock928); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleIfBlock" // $ANTLR start "ruleIfBlock" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:418:1: ruleIfBlock returns [EObject current=null] : (otherlv_0= 'if' ( (lv_condition_1_0= ruleBoolExp ) ) otherlv_2= 'then' ( (lv_thenBlock_3_0= ruleExpression ) )* (otherlv_4= 'else' ( (lv_elseBlock_5_0= ruleExpression ) )* )? otherlv_6= 'end' ) ; public final EObject ruleIfBlock() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token otherlv_2=null; Token otherlv_4=null; Token otherlv_6=null; EObject lv_condition_1_0 = null; EObject lv_thenBlock_3_0 = null; EObject lv_elseBlock_5_0 = null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:421:28: ( (otherlv_0= 'if' ( (lv_condition_1_0= ruleBoolExp ) ) otherlv_2= 'then' ( (lv_thenBlock_3_0= ruleExpression ) )* (otherlv_4= 'else' ( (lv_elseBlock_5_0= ruleExpression ) )* )? otherlv_6= 'end' ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:422:1: (otherlv_0= 'if' ( (lv_condition_1_0= ruleBoolExp ) ) otherlv_2= 'then' ( (lv_thenBlock_3_0= ruleExpression ) )* (otherlv_4= 'else' ( (lv_elseBlock_5_0= ruleExpression ) )* )? otherlv_6= 'end' ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:422:1: (otherlv_0= 'if' ( (lv_condition_1_0= ruleBoolExp ) ) otherlv_2= 'then' ( (lv_thenBlock_3_0= ruleExpression ) )* (otherlv_4= 'else' ( (lv_elseBlock_5_0= ruleExpression ) )* )? otherlv_6= 'end' ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:422:3: otherlv_0= 'if' ( (lv_condition_1_0= ruleBoolExp ) ) otherlv_2= 'then' ( (lv_thenBlock_3_0= ruleExpression ) )* (otherlv_4= 'else' ( (lv_elseBlock_5_0= ruleExpression ) )* )? otherlv_6= 'end' { otherlv_0=(Token)match(input,16,FollowSets000.FOLLOW_16_in_ruleIfBlock965); newLeafNode(otherlv_0, grammarAccess.getIfBlockAccess().getIfKeyword_0()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:426:1: ( (lv_condition_1_0= ruleBoolExp ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:427:1: (lv_condition_1_0= ruleBoolExp ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:427:1: (lv_condition_1_0= ruleBoolExp ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:428:3: lv_condition_1_0= ruleBoolExp { newCompositeNode(grammarAccess.getIfBlockAccess().getConditionBoolExpParserRuleCall_1_0()); pushFollow(FollowSets000.FOLLOW_ruleBoolExp_in_ruleIfBlock986); lv_condition_1_0=ruleBoolExp(); state._fsp--; if (current==null) { current = createModelElementForParent(grammarAccess.getIfBlockRule()); } set( current, "condition", lv_condition_1_0, "BoolExp"); afterParserOrEnumRuleCall(); } } otherlv_2=(Token)match(input,17,FollowSets000.FOLLOW_17_in_ruleIfBlock998); newLeafNode(otherlv_2, grammarAccess.getIfBlockAccess().getThenKeyword_2()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:448:1: ( (lv_thenBlock_3_0= ruleExpression ) )* loop5: do { int alt5=2; int LA5_0 = input.LA(1); if ( (LA5_0==11||(LA5_0>=14 && LA5_0<=16)||LA5_0==19||LA5_0==24||LA5_0==26||(LA5_0>=32 && LA5_0<=36)) ) { alt5=1; } switch (alt5) { case 1 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:449:1: (lv_thenBlock_3_0= ruleExpression ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:449:1: (lv_thenBlock_3_0= ruleExpression ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:450:3: lv_thenBlock_3_0= ruleExpression { newCompositeNode(grammarAccess.getIfBlockAccess().getThenBlockExpressionParserRuleCall_3_0()); pushFollow(FollowSets000.FOLLOW_ruleExpression_in_ruleIfBlock1019); lv_thenBlock_3_0=ruleExpression(); state._fsp--; if (current==null) { current = createModelElementForParent(grammarAccess.getIfBlockRule()); } add( current, "thenBlock", lv_thenBlock_3_0, "Expression"); afterParserOrEnumRuleCall(); } } break; default : break loop5; } } while (true); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:466:3: (otherlv_4= 'else' ( (lv_elseBlock_5_0= ruleExpression ) )* )? int alt7=2; int LA7_0 = input.LA(1); if ( (LA7_0==18) ) { alt7=1; } switch (alt7) { case 1 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:466:5: otherlv_4= 'else' ( (lv_elseBlock_5_0= ruleExpression ) )* { otherlv_4=(Token)match(input,18,FollowSets000.FOLLOW_18_in_ruleIfBlock1033); newLeafNode(otherlv_4, grammarAccess.getIfBlockAccess().getElseKeyword_4_0()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:470:1: ( (lv_elseBlock_5_0= ruleExpression ) )* loop6: do { int alt6=2; int LA6_0 = input.LA(1); if ( (LA6_0==11||(LA6_0>=14 && LA6_0<=16)||LA6_0==19||LA6_0==24||LA6_0==26||(LA6_0>=32 && LA6_0<=36)) ) { alt6=1; } switch (alt6) { case 1 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:471:1: (lv_elseBlock_5_0= ruleExpression ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:471:1: (lv_elseBlock_5_0= ruleExpression ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:472:3: lv_elseBlock_5_0= ruleExpression { newCompositeNode(grammarAccess.getIfBlockAccess().getElseBlockExpressionParserRuleCall_4_1_0()); pushFollow(FollowSets000.FOLLOW_ruleExpression_in_ruleIfBlock1054); lv_elseBlock_5_0=ruleExpression(); state._fsp--; if (current==null) { current = createModelElementForParent(grammarAccess.getIfBlockRule()); } add( current, "elseBlock", lv_elseBlock_5_0, "Expression"); afterParserOrEnumRuleCall(); } } break; default : break loop6; } } while (true); } break; } otherlv_6=(Token)match(input,13,FollowSets000.FOLLOW_13_in_ruleIfBlock1069); newLeafNode(otherlv_6, grammarAccess.getIfBlockAccess().getEndKeyword_5()); } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleIfBlock" // $ANTLR start "entryRuleCommand" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:500:1: entryRuleCommand returns [EObject current=null] : iv_ruleCommand= ruleCommand EOF ; public final EObject entryRuleCommand() throws RecognitionException { EObject current = null; EObject iv_ruleCommand = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:501:2: (iv_ruleCommand= ruleCommand EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:502:2: iv_ruleCommand= ruleCommand EOF { newCompositeNode(grammarAccess.getCommandRule()); pushFollow(FollowSets000.FOLLOW_ruleCommand_in_entryRuleCommand1105); iv_ruleCommand=ruleCommand(); state._fsp--; current =iv_ruleCommand; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleCommand1115); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleCommand" // $ANTLR start "ruleCommand" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:509:1: ruleCommand returns [EObject current=null] : (this_MoveCmd_0= ruleMoveCmd | this_PrintCmd_1= rulePrintCmd | this_SetTurnAngleCmd_2= ruleSetTurnAngleCmd | this_StopEngineCmd_3= ruleStopEngineCmd | this_StopProgramCmd_4= ruleStopProgramCmd | this_TurnCmd_5= ruleTurnCmd | this_HasTurnedCmd_6= ruleHasTurnedCmd | this_ObstacleCmd_7= ruleObstacleCmd ) ; public final EObject ruleCommand() throws RecognitionException { EObject current = null; EObject this_MoveCmd_0 = null; EObject this_PrintCmd_1 = null; EObject this_SetTurnAngleCmd_2 = null; EObject this_StopEngineCmd_3 = null; EObject this_StopProgramCmd_4 = null; EObject this_TurnCmd_5 = null; EObject this_HasTurnedCmd_6 = null; EObject this_ObstacleCmd_7 = null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:512:28: ( (this_MoveCmd_0= ruleMoveCmd | this_PrintCmd_1= rulePrintCmd | this_SetTurnAngleCmd_2= ruleSetTurnAngleCmd | this_StopEngineCmd_3= ruleStopEngineCmd | this_StopProgramCmd_4= ruleStopProgramCmd | this_TurnCmd_5= ruleTurnCmd | this_HasTurnedCmd_6= ruleHasTurnedCmd | this_ObstacleCmd_7= ruleObstacleCmd ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:513:1: (this_MoveCmd_0= ruleMoveCmd | this_PrintCmd_1= rulePrintCmd | this_SetTurnAngleCmd_2= ruleSetTurnAngleCmd | this_StopEngineCmd_3= ruleStopEngineCmd | this_StopProgramCmd_4= ruleStopProgramCmd | this_TurnCmd_5= ruleTurnCmd | this_HasTurnedCmd_6= ruleHasTurnedCmd | this_ObstacleCmd_7= ruleObstacleCmd ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:513:1: (this_MoveCmd_0= ruleMoveCmd | this_PrintCmd_1= rulePrintCmd | this_SetTurnAngleCmd_2= ruleSetTurnAngleCmd | this_StopEngineCmd_3= ruleStopEngineCmd | this_StopProgramCmd_4= ruleStopProgramCmd | this_TurnCmd_5= ruleTurnCmd | this_HasTurnedCmd_6= ruleHasTurnedCmd | this_ObstacleCmd_7= ruleObstacleCmd ) int alt8=8; switch ( input.LA(1) ) { case 24: { alt8=1; } break; case 26: { alt8=2; } break; case 32: { alt8=3; } break; case 33: { alt8=4; } break; case 34: { alt8=5; } break; case 35: { alt8=6; } break; case 19: { alt8=7; } break; case 36: { alt8=8; } break; default: NoViableAltException nvae = new NoViableAltException("", 8, 0, input); throw nvae; } switch (alt8) { case 1 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:514:5: this_MoveCmd_0= ruleMoveCmd { newCompositeNode(grammarAccess.getCommandAccess().getMoveCmdParserRuleCall_0()); pushFollow(FollowSets000.FOLLOW_ruleMoveCmd_in_ruleCommand1162); this_MoveCmd_0=ruleMoveCmd(); state._fsp--; current = this_MoveCmd_0; afterParserOrEnumRuleCall(); } break; case 2 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:524:5: this_PrintCmd_1= rulePrintCmd { newCompositeNode(grammarAccess.getCommandAccess().getPrintCmdParserRuleCall_1()); pushFollow(FollowSets000.FOLLOW_rulePrintCmd_in_ruleCommand1189); this_PrintCmd_1=rulePrintCmd(); state._fsp--; current = this_PrintCmd_1; afterParserOrEnumRuleCall(); } break; case 3 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:534:5: this_SetTurnAngleCmd_2= ruleSetTurnAngleCmd { newCompositeNode(grammarAccess.getCommandAccess().getSetTurnAngleCmdParserRuleCall_2()); pushFollow(FollowSets000.FOLLOW_ruleSetTurnAngleCmd_in_ruleCommand1216); this_SetTurnAngleCmd_2=ruleSetTurnAngleCmd(); state._fsp--; current = this_SetTurnAngleCmd_2; afterParserOrEnumRuleCall(); } break; case 4 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:544:5: this_StopEngineCmd_3= ruleStopEngineCmd { newCompositeNode(grammarAccess.getCommandAccess().getStopEngineCmdParserRuleCall_3()); pushFollow(FollowSets000.FOLLOW_ruleStopEngineCmd_in_ruleCommand1243); this_StopEngineCmd_3=ruleStopEngineCmd(); state._fsp--; current = this_StopEngineCmd_3; afterParserOrEnumRuleCall(); } break; case 5 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:554:5: this_StopProgramCmd_4= ruleStopProgramCmd { newCompositeNode(grammarAccess.getCommandAccess().getStopProgramCmdParserRuleCall_4()); pushFollow(FollowSets000.FOLLOW_ruleStopProgramCmd_in_ruleCommand1270); this_StopProgramCmd_4=ruleStopProgramCmd(); state._fsp--; current = this_StopProgramCmd_4; afterParserOrEnumRuleCall(); } break; case 6 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:564:5: this_TurnCmd_5= ruleTurnCmd { newCompositeNode(grammarAccess.getCommandAccess().getTurnCmdParserRuleCall_5()); pushFollow(FollowSets000.FOLLOW_ruleTurnCmd_in_ruleCommand1297); this_TurnCmd_5=ruleTurnCmd(); state._fsp--; current = this_TurnCmd_5; afterParserOrEnumRuleCall(); } break; case 7 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:574:5: this_HasTurnedCmd_6= ruleHasTurnedCmd { newCompositeNode(grammarAccess.getCommandAccess().getHasTurnedCmdParserRuleCall_6()); pushFollow(FollowSets000.FOLLOW_ruleHasTurnedCmd_in_ruleCommand1324); this_HasTurnedCmd_6=ruleHasTurnedCmd(); state._fsp--; current = this_HasTurnedCmd_6; afterParserOrEnumRuleCall(); } break; case 8 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:584:5: this_ObstacleCmd_7= ruleObstacleCmd { newCompositeNode(grammarAccess.getCommandAccess().getObstacleCmdParserRuleCall_7()); pushFollow(FollowSets000.FOLLOW_ruleObstacleCmd_in_ruleCommand1351); this_ObstacleCmd_7=ruleObstacleCmd(); state._fsp--; current = this_ObstacleCmd_7; afterParserOrEnumRuleCall(); } break; } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleCommand" // $ANTLR start "entryRuleHasTurnedCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:602:1: entryRuleHasTurnedCmd returns [EObject current=null] : iv_ruleHasTurnedCmd= ruleHasTurnedCmd EOF ; public final EObject entryRuleHasTurnedCmd() throws RecognitionException { EObject current = null; EObject iv_ruleHasTurnedCmd = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:603:2: (iv_ruleHasTurnedCmd= ruleHasTurnedCmd EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:604:2: iv_ruleHasTurnedCmd= ruleHasTurnedCmd EOF { newCompositeNode(grammarAccess.getHasTurnedCmdRule()); pushFollow(FollowSets000.FOLLOW_ruleHasTurnedCmd_in_entryRuleHasTurnedCmd1388); iv_ruleHasTurnedCmd=ruleHasTurnedCmd(); state._fsp--; current =iv_ruleHasTurnedCmd; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleHasTurnedCmd1398); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleHasTurnedCmd" // $ANTLR start "ruleHasTurnedCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:611:1: ruleHasTurnedCmd returns [EObject current=null] : (otherlv_0= 'hasTurned' otherlv_1= '(' otherlv_2= 'angle' otherlv_3= '=' ( (lv_angle_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) ; public final EObject ruleHasTurnedCmd() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token otherlv_1=null; Token otherlv_2=null; Token otherlv_3=null; Token lv_angle_4_0=null; Token otherlv_5=null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:614:28: ( (otherlv_0= 'hasTurned' otherlv_1= '(' otherlv_2= 'angle' otherlv_3= '=' ( (lv_angle_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:615:1: (otherlv_0= 'hasTurned' otherlv_1= '(' otherlv_2= 'angle' otherlv_3= '=' ( (lv_angle_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:615:1: (otherlv_0= 'hasTurned' otherlv_1= '(' otherlv_2= 'angle' otherlv_3= '=' ( (lv_angle_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:615:3: otherlv_0= 'hasTurned' otherlv_1= '(' otherlv_2= 'angle' otherlv_3= '=' ( (lv_angle_4_0= RULE_DOUBLE ) ) otherlv_5= ')' { otherlv_0=(Token)match(input,19,FollowSets000.FOLLOW_19_in_ruleHasTurnedCmd1435); newLeafNode(otherlv_0, grammarAccess.getHasTurnedCmdAccess().getHasTurnedKeyword_0()); otherlv_1=(Token)match(input,20,FollowSets000.FOLLOW_20_in_ruleHasTurnedCmd1447); newLeafNode(otherlv_1, grammarAccess.getHasTurnedCmdAccess().getLeftParenthesisKeyword_1()); otherlv_2=(Token)match(input,21,FollowSets000.FOLLOW_21_in_ruleHasTurnedCmd1459); newLeafNode(otherlv_2, grammarAccess.getHasTurnedCmdAccess().getAngleKeyword_2()); otherlv_3=(Token)match(input,22,FollowSets000.FOLLOW_22_in_ruleHasTurnedCmd1471); newLeafNode(otherlv_3, grammarAccess.getHasTurnedCmdAccess().getEqualsSignKeyword_3()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:631:1: ( (lv_angle_4_0= RULE_DOUBLE ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:632:1: (lv_angle_4_0= RULE_DOUBLE ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:632:1: (lv_angle_4_0= RULE_DOUBLE ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:633:3: lv_angle_4_0= RULE_DOUBLE { lv_angle_4_0=(Token)match(input,RULE_DOUBLE,FollowSets000.FOLLOW_RULE_DOUBLE_in_ruleHasTurnedCmd1488); newLeafNode(lv_angle_4_0, grammarAccess.getHasTurnedCmdAccess().getAngleDOUBLETerminalRuleCall_4_0()); if (current==null) { current = createModelElement(grammarAccess.getHasTurnedCmdRule()); } setWithLastConsumed( current, "angle", lv_angle_4_0, "DOUBLE"); } } otherlv_5=(Token)match(input,23,FollowSets000.FOLLOW_23_in_ruleHasTurnedCmd1505); newLeafNode(otherlv_5, grammarAccess.getHasTurnedCmdAccess().getRightParenthesisKeyword_5()); } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleHasTurnedCmd" // $ANTLR start "entryRuleMoveCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:661:1: entryRuleMoveCmd returns [EObject current=null] : iv_ruleMoveCmd= ruleMoveCmd EOF ; public final EObject entryRuleMoveCmd() throws RecognitionException { EObject current = null; EObject iv_ruleMoveCmd = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:662:2: (iv_ruleMoveCmd= ruleMoveCmd EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:663:2: iv_ruleMoveCmd= ruleMoveCmd EOF { newCompositeNode(grammarAccess.getMoveCmdRule()); pushFollow(FollowSets000.FOLLOW_ruleMoveCmd_in_entryRuleMoveCmd1541); iv_ruleMoveCmd=ruleMoveCmd(); state._fsp--; current =iv_ruleMoveCmd; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleMoveCmd1551); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleMoveCmd" // $ANTLR start "ruleMoveCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:670:1: ruleMoveCmd returns [EObject current=null] : (otherlv_0= 'move' otherlv_1= '(' otherlv_2= 'power' otherlv_3= '=' ( (lv_power_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) ; public final EObject ruleMoveCmd() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token otherlv_1=null; Token otherlv_2=null; Token otherlv_3=null; Token lv_power_4_0=null; Token otherlv_5=null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:673:28: ( (otherlv_0= 'move' otherlv_1= '(' otherlv_2= 'power' otherlv_3= '=' ( (lv_power_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:674:1: (otherlv_0= 'move' otherlv_1= '(' otherlv_2= 'power' otherlv_3= '=' ( (lv_power_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:674:1: (otherlv_0= 'move' otherlv_1= '(' otherlv_2= 'power' otherlv_3= '=' ( (lv_power_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:674:3: otherlv_0= 'move' otherlv_1= '(' otherlv_2= 'power' otherlv_3= '=' ( (lv_power_4_0= RULE_DOUBLE ) ) otherlv_5= ')' { otherlv_0=(Token)match(input,24,FollowSets000.FOLLOW_24_in_ruleMoveCmd1588); newLeafNode(otherlv_0, grammarAccess.getMoveCmdAccess().getMoveKeyword_0()); otherlv_1=(Token)match(input,20,FollowSets000.FOLLOW_20_in_ruleMoveCmd1600); newLeafNode(otherlv_1, grammarAccess.getMoveCmdAccess().getLeftParenthesisKeyword_1()); otherlv_2=(Token)match(input,25,FollowSets000.FOLLOW_25_in_ruleMoveCmd1612); newLeafNode(otherlv_2, grammarAccess.getMoveCmdAccess().getPowerKeyword_2()); otherlv_3=(Token)match(input,22,FollowSets000.FOLLOW_22_in_ruleMoveCmd1624); newLeafNode(otherlv_3, grammarAccess.getMoveCmdAccess().getEqualsSignKeyword_3()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:690:1: ( (lv_power_4_0= RULE_DOUBLE ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:691:1: (lv_power_4_0= RULE_DOUBLE ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:691:1: (lv_power_4_0= RULE_DOUBLE ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:692:3: lv_power_4_0= RULE_DOUBLE { lv_power_4_0=(Token)match(input,RULE_DOUBLE,FollowSets000.FOLLOW_RULE_DOUBLE_in_ruleMoveCmd1641); newLeafNode(lv_power_4_0, grammarAccess.getMoveCmdAccess().getPowerDOUBLETerminalRuleCall_4_0()); if (current==null) { current = createModelElement(grammarAccess.getMoveCmdRule()); } setWithLastConsumed( current, "power", lv_power_4_0, "DOUBLE"); } } otherlv_5=(Token)match(input,23,FollowSets000.FOLLOW_23_in_ruleMoveCmd1658); newLeafNode(otherlv_5, grammarAccess.getMoveCmdAccess().getRightParenthesisKeyword_5()); } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleMoveCmd" // $ANTLR start "entryRulePrintCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:720:1: entryRulePrintCmd returns [EObject current=null] : iv_rulePrintCmd= rulePrintCmd EOF ; public final EObject entryRulePrintCmd() throws RecognitionException { EObject current = null; EObject iv_rulePrintCmd = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:721:2: (iv_rulePrintCmd= rulePrintCmd EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:722:2: iv_rulePrintCmd= rulePrintCmd EOF { newCompositeNode(grammarAccess.getPrintCmdRule()); pushFollow(FollowSets000.FOLLOW_rulePrintCmd_in_entryRulePrintCmd1694); iv_rulePrintCmd=rulePrintCmd(); state._fsp--; current =iv_rulePrintCmd; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRulePrintCmd1704); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRulePrintCmd" // $ANTLR start "rulePrintCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:729:1: rulePrintCmd returns [EObject current=null] : (otherlv_0= 'display' otherlv_1= '(' otherlv_2= 'msg' otherlv_3= '=' ( (lv_msg_4_0= RULE_STRING ) ) otherlv_5= ',' otherlv_6= 'duration' otherlv_7= '=' ( (lv_duration_8_0= RULE_INT ) ) otherlv_9= ',' otherlv_10= 'line' otherlv_11= '=' ( (lv_line_12_0= RULE_INT ) ) otherlv_13= ',' otherlv_14= 'col' otherlv_15= '=' ( (lv_col_16_0= RULE_INT ) ) otherlv_17= ')' ) ; public final EObject rulePrintCmd() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token otherlv_1=null; Token otherlv_2=null; Token otherlv_3=null; Token lv_msg_4_0=null; Token otherlv_5=null; Token otherlv_6=null; Token otherlv_7=null; Token lv_duration_8_0=null; Token otherlv_9=null; Token otherlv_10=null; Token otherlv_11=null; Token lv_line_12_0=null; Token otherlv_13=null; Token otherlv_14=null; Token otherlv_15=null; Token lv_col_16_0=null; Token otherlv_17=null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:732:28: ( (otherlv_0= 'display' otherlv_1= '(' otherlv_2= 'msg' otherlv_3= '=' ( (lv_msg_4_0= RULE_STRING ) ) otherlv_5= ',' otherlv_6= 'duration' otherlv_7= '=' ( (lv_duration_8_0= RULE_INT ) ) otherlv_9= ',' otherlv_10= 'line' otherlv_11= '=' ( (lv_line_12_0= RULE_INT ) ) otherlv_13= ',' otherlv_14= 'col' otherlv_15= '=' ( (lv_col_16_0= RULE_INT ) ) otherlv_17= ')' ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:733:1: (otherlv_0= 'display' otherlv_1= '(' otherlv_2= 'msg' otherlv_3= '=' ( (lv_msg_4_0= RULE_STRING ) ) otherlv_5= ',' otherlv_6= 'duration' otherlv_7= '=' ( (lv_duration_8_0= RULE_INT ) ) otherlv_9= ',' otherlv_10= 'line' otherlv_11= '=' ( (lv_line_12_0= RULE_INT ) ) otherlv_13= ',' otherlv_14= 'col' otherlv_15= '=' ( (lv_col_16_0= RULE_INT ) ) otherlv_17= ')' ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:733:1: (otherlv_0= 'display' otherlv_1= '(' otherlv_2= 'msg' otherlv_3= '=' ( (lv_msg_4_0= RULE_STRING ) ) otherlv_5= ',' otherlv_6= 'duration' otherlv_7= '=' ( (lv_duration_8_0= RULE_INT ) ) otherlv_9= ',' otherlv_10= 'line' otherlv_11= '=' ( (lv_line_12_0= RULE_INT ) ) otherlv_13= ',' otherlv_14= 'col' otherlv_15= '=' ( (lv_col_16_0= RULE_INT ) ) otherlv_17= ')' ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:733:3: otherlv_0= 'display' otherlv_1= '(' otherlv_2= 'msg' otherlv_3= '=' ( (lv_msg_4_0= RULE_STRING ) ) otherlv_5= ',' otherlv_6= 'duration' otherlv_7= '=' ( (lv_duration_8_0= RULE_INT ) ) otherlv_9= ',' otherlv_10= 'line' otherlv_11= '=' ( (lv_line_12_0= RULE_INT ) ) otherlv_13= ',' otherlv_14= 'col' otherlv_15= '=' ( (lv_col_16_0= RULE_INT ) ) otherlv_17= ')' { otherlv_0=(Token)match(input,26,FollowSets000.FOLLOW_26_in_rulePrintCmd1741); newLeafNode(otherlv_0, grammarAccess.getPrintCmdAccess().getDisplayKeyword_0()); otherlv_1=(Token)match(input,20,FollowSets000.FOLLOW_20_in_rulePrintCmd1753); newLeafNode(otherlv_1, grammarAccess.getPrintCmdAccess().getLeftParenthesisKeyword_1()); otherlv_2=(Token)match(input,27,FollowSets000.FOLLOW_27_in_rulePrintCmd1765); newLeafNode(otherlv_2, grammarAccess.getPrintCmdAccess().getMsgKeyword_2()); otherlv_3=(Token)match(input,22,FollowSets000.FOLLOW_22_in_rulePrintCmd1777); newLeafNode(otherlv_3, grammarAccess.getPrintCmdAccess().getEqualsSignKeyword_3()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:749:1: ( (lv_msg_4_0= RULE_STRING ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:750:1: (lv_msg_4_0= RULE_STRING ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:750:1: (lv_msg_4_0= RULE_STRING ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:751:3: lv_msg_4_0= RULE_STRING { lv_msg_4_0=(Token)match(input,RULE_STRING,FollowSets000.FOLLOW_RULE_STRING_in_rulePrintCmd1794); newLeafNode(lv_msg_4_0, grammarAccess.getPrintCmdAccess().getMsgSTRINGTerminalRuleCall_4_0()); if (current==null) { current = createModelElement(grammarAccess.getPrintCmdRule()); } setWithLastConsumed( current, "msg", lv_msg_4_0, "STRING"); } } otherlv_5=(Token)match(input,28,FollowSets000.FOLLOW_28_in_rulePrintCmd1811); newLeafNode(otherlv_5, grammarAccess.getPrintCmdAccess().getCommaKeyword_5()); otherlv_6=(Token)match(input,29,FollowSets000.FOLLOW_29_in_rulePrintCmd1823); newLeafNode(otherlv_6, grammarAccess.getPrintCmdAccess().getDurationKeyword_6()); otherlv_7=(Token)match(input,22,FollowSets000.FOLLOW_22_in_rulePrintCmd1835); newLeafNode(otherlv_7, grammarAccess.getPrintCmdAccess().getEqualsSignKeyword_7()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:779:1: ( (lv_duration_8_0= RULE_INT ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:780:1: (lv_duration_8_0= RULE_INT ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:780:1: (lv_duration_8_0= RULE_INT ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:781:3: lv_duration_8_0= RULE_INT { lv_duration_8_0=(Token)match(input,RULE_INT,FollowSets000.FOLLOW_RULE_INT_in_rulePrintCmd1852); newLeafNode(lv_duration_8_0, grammarAccess.getPrintCmdAccess().getDurationINTTerminalRuleCall_8_0()); if (current==null) { current = createModelElement(grammarAccess.getPrintCmdRule()); } setWithLastConsumed( current, "duration", lv_duration_8_0, "INT"); } } otherlv_9=(Token)match(input,28,FollowSets000.FOLLOW_28_in_rulePrintCmd1869); newLeafNode(otherlv_9, grammarAccess.getPrintCmdAccess().getCommaKeyword_9()); otherlv_10=(Token)match(input,30,FollowSets000.FOLLOW_30_in_rulePrintCmd1881); newLeafNode(otherlv_10, grammarAccess.getPrintCmdAccess().getLineKeyword_10()); otherlv_11=(Token)match(input,22,FollowSets000.FOLLOW_22_in_rulePrintCmd1893); newLeafNode(otherlv_11, grammarAccess.getPrintCmdAccess().getEqualsSignKeyword_11()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:809:1: ( (lv_line_12_0= RULE_INT ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:810:1: (lv_line_12_0= RULE_INT ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:810:1: (lv_line_12_0= RULE_INT ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:811:3: lv_line_12_0= RULE_INT { lv_line_12_0=(Token)match(input,RULE_INT,FollowSets000.FOLLOW_RULE_INT_in_rulePrintCmd1910); newLeafNode(lv_line_12_0, grammarAccess.getPrintCmdAccess().getLineINTTerminalRuleCall_12_0()); if (current==null) { current = createModelElement(grammarAccess.getPrintCmdRule()); } setWithLastConsumed( current, "line", lv_line_12_0, "INT"); } } otherlv_13=(Token)match(input,28,FollowSets000.FOLLOW_28_in_rulePrintCmd1927); newLeafNode(otherlv_13, grammarAccess.getPrintCmdAccess().getCommaKeyword_13()); otherlv_14=(Token)match(input,31,FollowSets000.FOLLOW_31_in_rulePrintCmd1939); newLeafNode(otherlv_14, grammarAccess.getPrintCmdAccess().getColKeyword_14()); otherlv_15=(Token)match(input,22,FollowSets000.FOLLOW_22_in_rulePrintCmd1951); newLeafNode(otherlv_15, grammarAccess.getPrintCmdAccess().getEqualsSignKeyword_15()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:839:1: ( (lv_col_16_0= RULE_INT ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:840:1: (lv_col_16_0= RULE_INT ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:840:1: (lv_col_16_0= RULE_INT ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:841:3: lv_col_16_0= RULE_INT { lv_col_16_0=(Token)match(input,RULE_INT,FollowSets000.FOLLOW_RULE_INT_in_rulePrintCmd1968); newLeafNode(lv_col_16_0, grammarAccess.getPrintCmdAccess().getColINTTerminalRuleCall_16_0()); if (current==null) { current = createModelElement(grammarAccess.getPrintCmdRule()); } setWithLastConsumed( current, "col", lv_col_16_0, "INT"); } } otherlv_17=(Token)match(input,23,FollowSets000.FOLLOW_23_in_rulePrintCmd1985); newLeafNode(otherlv_17, grammarAccess.getPrintCmdAccess().getRightParenthesisKeyword_17()); } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "rulePrintCmd" // $ANTLR start "entryRuleSetTurnAngleCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:869:1: entryRuleSetTurnAngleCmd returns [EObject current=null] : iv_ruleSetTurnAngleCmd= ruleSetTurnAngleCmd EOF ; public final EObject entryRuleSetTurnAngleCmd() throws RecognitionException { EObject current = null; EObject iv_ruleSetTurnAngleCmd = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:870:2: (iv_ruleSetTurnAngleCmd= ruleSetTurnAngleCmd EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:871:2: iv_ruleSetTurnAngleCmd= ruleSetTurnAngleCmd EOF { newCompositeNode(grammarAccess.getSetTurnAngleCmdRule()); pushFollow(FollowSets000.FOLLOW_ruleSetTurnAngleCmd_in_entryRuleSetTurnAngleCmd2021); iv_ruleSetTurnAngleCmd=ruleSetTurnAngleCmd(); state._fsp--; current =iv_ruleSetTurnAngleCmd; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleSetTurnAngleCmd2031); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleSetTurnAngleCmd" // $ANTLR start "ruleSetTurnAngleCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:878:1: ruleSetTurnAngleCmd returns [EObject current=null] : (otherlv_0= 'setTurnAngle' otherlv_1= '(' otherlv_2= 'angle' otherlv_3= '=' ( (lv_angle_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) ; public final EObject ruleSetTurnAngleCmd() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token otherlv_1=null; Token otherlv_2=null; Token otherlv_3=null; Token lv_angle_4_0=null; Token otherlv_5=null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:881:28: ( (otherlv_0= 'setTurnAngle' otherlv_1= '(' otherlv_2= 'angle' otherlv_3= '=' ( (lv_angle_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:882:1: (otherlv_0= 'setTurnAngle' otherlv_1= '(' otherlv_2= 'angle' otherlv_3= '=' ( (lv_angle_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:882:1: (otherlv_0= 'setTurnAngle' otherlv_1= '(' otherlv_2= 'angle' otherlv_3= '=' ( (lv_angle_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:882:3: otherlv_0= 'setTurnAngle' otherlv_1= '(' otherlv_2= 'angle' otherlv_3= '=' ( (lv_angle_4_0= RULE_DOUBLE ) ) otherlv_5= ')' { otherlv_0=(Token)match(input,32,FollowSets000.FOLLOW_32_in_ruleSetTurnAngleCmd2068); newLeafNode(otherlv_0, grammarAccess.getSetTurnAngleCmdAccess().getSetTurnAngleKeyword_0()); otherlv_1=(Token)match(input,20,FollowSets000.FOLLOW_20_in_ruleSetTurnAngleCmd2080); newLeafNode(otherlv_1, grammarAccess.getSetTurnAngleCmdAccess().getLeftParenthesisKeyword_1()); otherlv_2=(Token)match(input,21,FollowSets000.FOLLOW_21_in_ruleSetTurnAngleCmd2092); newLeafNode(otherlv_2, grammarAccess.getSetTurnAngleCmdAccess().getAngleKeyword_2()); otherlv_3=(Token)match(input,22,FollowSets000.FOLLOW_22_in_ruleSetTurnAngleCmd2104); newLeafNode(otherlv_3, grammarAccess.getSetTurnAngleCmdAccess().getEqualsSignKeyword_3()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:898:1: ( (lv_angle_4_0= RULE_DOUBLE ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:899:1: (lv_angle_4_0= RULE_DOUBLE ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:899:1: (lv_angle_4_0= RULE_DOUBLE ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:900:3: lv_angle_4_0= RULE_DOUBLE { lv_angle_4_0=(Token)match(input,RULE_DOUBLE,FollowSets000.FOLLOW_RULE_DOUBLE_in_ruleSetTurnAngleCmd2121); newLeafNode(lv_angle_4_0, grammarAccess.getSetTurnAngleCmdAccess().getAngleDOUBLETerminalRuleCall_4_0()); if (current==null) { current = createModelElement(grammarAccess.getSetTurnAngleCmdRule()); } setWithLastConsumed( current, "angle", lv_angle_4_0, "DOUBLE"); } } otherlv_5=(Token)match(input,23,FollowSets000.FOLLOW_23_in_ruleSetTurnAngleCmd2138); newLeafNode(otherlv_5, grammarAccess.getSetTurnAngleCmdAccess().getRightParenthesisKeyword_5()); } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleSetTurnAngleCmd" // $ANTLR start "entryRuleStopEngineCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:928:1: entryRuleStopEngineCmd returns [EObject current=null] : iv_ruleStopEngineCmd= ruleStopEngineCmd EOF ; public final EObject entryRuleStopEngineCmd() throws RecognitionException { EObject current = null; EObject iv_ruleStopEngineCmd = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:929:2: (iv_ruleStopEngineCmd= ruleStopEngineCmd EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:930:2: iv_ruleStopEngineCmd= ruleStopEngineCmd EOF { newCompositeNode(grammarAccess.getStopEngineCmdRule()); pushFollow(FollowSets000.FOLLOW_ruleStopEngineCmd_in_entryRuleStopEngineCmd2174); iv_ruleStopEngineCmd=ruleStopEngineCmd(); state._fsp--; current =iv_ruleStopEngineCmd; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleStopEngineCmd2184); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleStopEngineCmd" // $ANTLR start "ruleStopEngineCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:937:1: ruleStopEngineCmd returns [EObject current=null] : ( () otherlv_1= 'stopEngine' ) ; public final EObject ruleStopEngineCmd() throws RecognitionException { EObject current = null; Token otherlv_1=null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:940:28: ( ( () otherlv_1= 'stopEngine' ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:941:1: ( () otherlv_1= 'stopEngine' ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:941:1: ( () otherlv_1= 'stopEngine' ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:941:2: () otherlv_1= 'stopEngine' { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:941:2: () // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:942:5: { current = forceCreateModelElement( grammarAccess.getStopEngineCmdAccess().getStopEngineCmdAction_0(), current); } otherlv_1=(Token)match(input,33,FollowSets000.FOLLOW_33_in_ruleStopEngineCmd2230); newLeafNode(otherlv_1, grammarAccess.getStopEngineCmdAccess().getStopEngineKeyword_1()); } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleStopEngineCmd" // $ANTLR start "entryRuleStopProgramCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:959:1: entryRuleStopProgramCmd returns [EObject current=null] : iv_ruleStopProgramCmd= ruleStopProgramCmd EOF ; public final EObject entryRuleStopProgramCmd() throws RecognitionException { EObject current = null; EObject iv_ruleStopProgramCmd = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:960:2: (iv_ruleStopProgramCmd= ruleStopProgramCmd EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:961:2: iv_ruleStopProgramCmd= ruleStopProgramCmd EOF { newCompositeNode(grammarAccess.getStopProgramCmdRule()); pushFollow(FollowSets000.FOLLOW_ruleStopProgramCmd_in_entryRuleStopProgramCmd2266); iv_ruleStopProgramCmd=ruleStopProgramCmd(); state._fsp--; current =iv_ruleStopProgramCmd; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleStopProgramCmd2276); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleStopProgramCmd" // $ANTLR start "ruleStopProgramCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:968:1: ruleStopProgramCmd returns [EObject current=null] : ( () otherlv_1= 'stopProgram' ) ; public final EObject ruleStopProgramCmd() throws RecognitionException { EObject current = null; Token otherlv_1=null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:971:28: ( ( () otherlv_1= 'stopProgram' ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:972:1: ( () otherlv_1= 'stopProgram' ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:972:1: ( () otherlv_1= 'stopProgram' ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:972:2: () otherlv_1= 'stopProgram' { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:972:2: () // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:973:5: { current = forceCreateModelElement( grammarAccess.getStopProgramCmdAccess().getStopProgramCmdAction_0(), current); } otherlv_1=(Token)match(input,34,FollowSets000.FOLLOW_34_in_ruleStopProgramCmd2322); newLeafNode(otherlv_1, grammarAccess.getStopProgramCmdAccess().getStopProgramKeyword_1()); } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleStopProgramCmd" // $ANTLR start "entryRuleTurnCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:990:1: entryRuleTurnCmd returns [EObject current=null] : iv_ruleTurnCmd= ruleTurnCmd EOF ; public final EObject entryRuleTurnCmd() throws RecognitionException { EObject current = null; EObject iv_ruleTurnCmd = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:991:2: (iv_ruleTurnCmd= ruleTurnCmd EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:992:2: iv_ruleTurnCmd= ruleTurnCmd EOF { newCompositeNode(grammarAccess.getTurnCmdRule()); pushFollow(FollowSets000.FOLLOW_ruleTurnCmd_in_entryRuleTurnCmd2358); iv_ruleTurnCmd=ruleTurnCmd(); state._fsp--; current =iv_ruleTurnCmd; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleTurnCmd2368); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleTurnCmd" // $ANTLR start "ruleTurnCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:999:1: ruleTurnCmd returns [EObject current=null] : (otherlv_0= 'turn' otherlv_1= '(' otherlv_2= 'power' otherlv_3= '=' ( (lv_power_4_0= RULE_DOUBLE ) ) otherlv_5= ',' otherlv_6= 'angle' otherlv_7= '=' ( (lv_angle_8_0= RULE_DOUBLE ) ) otherlv_9= ')' ) ; public final EObject ruleTurnCmd() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token otherlv_1=null; Token otherlv_2=null; Token otherlv_3=null; Token lv_power_4_0=null; Token otherlv_5=null; Token otherlv_6=null; Token otherlv_7=null; Token lv_angle_8_0=null; Token otherlv_9=null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1002:28: ( (otherlv_0= 'turn' otherlv_1= '(' otherlv_2= 'power' otherlv_3= '=' ( (lv_power_4_0= RULE_DOUBLE ) ) otherlv_5= ',' otherlv_6= 'angle' otherlv_7= '=' ( (lv_angle_8_0= RULE_DOUBLE ) ) otherlv_9= ')' ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1003:1: (otherlv_0= 'turn' otherlv_1= '(' otherlv_2= 'power' otherlv_3= '=' ( (lv_power_4_0= RULE_DOUBLE ) ) otherlv_5= ',' otherlv_6= 'angle' otherlv_7= '=' ( (lv_angle_8_0= RULE_DOUBLE ) ) otherlv_9= ')' ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1003:1: (otherlv_0= 'turn' otherlv_1= '(' otherlv_2= 'power' otherlv_3= '=' ( (lv_power_4_0= RULE_DOUBLE ) ) otherlv_5= ',' otherlv_6= 'angle' otherlv_7= '=' ( (lv_angle_8_0= RULE_DOUBLE ) ) otherlv_9= ')' ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1003:3: otherlv_0= 'turn' otherlv_1= '(' otherlv_2= 'power' otherlv_3= '=' ( (lv_power_4_0= RULE_DOUBLE ) ) otherlv_5= ',' otherlv_6= 'angle' otherlv_7= '=' ( (lv_angle_8_0= RULE_DOUBLE ) ) otherlv_9= ')' { otherlv_0=(Token)match(input,35,FollowSets000.FOLLOW_35_in_ruleTurnCmd2405); newLeafNode(otherlv_0, grammarAccess.getTurnCmdAccess().getTurnKeyword_0()); otherlv_1=(Token)match(input,20,FollowSets000.FOLLOW_20_in_ruleTurnCmd2417); newLeafNode(otherlv_1, grammarAccess.getTurnCmdAccess().getLeftParenthesisKeyword_1()); otherlv_2=(Token)match(input,25,FollowSets000.FOLLOW_25_in_ruleTurnCmd2429); newLeafNode(otherlv_2, grammarAccess.getTurnCmdAccess().getPowerKeyword_2()); otherlv_3=(Token)match(input,22,FollowSets000.FOLLOW_22_in_ruleTurnCmd2441); newLeafNode(otherlv_3, grammarAccess.getTurnCmdAccess().getEqualsSignKeyword_3()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1019:1: ( (lv_power_4_0= RULE_DOUBLE ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1020:1: (lv_power_4_0= RULE_DOUBLE ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1020:1: (lv_power_4_0= RULE_DOUBLE ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1021:3: lv_power_4_0= RULE_DOUBLE { lv_power_4_0=(Token)match(input,RULE_DOUBLE,FollowSets000.FOLLOW_RULE_DOUBLE_in_ruleTurnCmd2458); newLeafNode(lv_power_4_0, grammarAccess.getTurnCmdAccess().getPowerDOUBLETerminalRuleCall_4_0()); if (current==null) { current = createModelElement(grammarAccess.getTurnCmdRule()); } setWithLastConsumed( current, "power", lv_power_4_0, "DOUBLE"); } } otherlv_5=(Token)match(input,28,FollowSets000.FOLLOW_28_in_ruleTurnCmd2475); newLeafNode(otherlv_5, grammarAccess.getTurnCmdAccess().getCommaKeyword_5()); otherlv_6=(Token)match(input,21,FollowSets000.FOLLOW_21_in_ruleTurnCmd2487); newLeafNode(otherlv_6, grammarAccess.getTurnCmdAccess().getAngleKeyword_6()); otherlv_7=(Token)match(input,22,FollowSets000.FOLLOW_22_in_ruleTurnCmd2499); newLeafNode(otherlv_7, grammarAccess.getTurnCmdAccess().getEqualsSignKeyword_7()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1049:1: ( (lv_angle_8_0= RULE_DOUBLE ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1050:1: (lv_angle_8_0= RULE_DOUBLE ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1050:1: (lv_angle_8_0= RULE_DOUBLE ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1051:3: lv_angle_8_0= RULE_DOUBLE { lv_angle_8_0=(Token)match(input,RULE_DOUBLE,FollowSets000.FOLLOW_RULE_DOUBLE_in_ruleTurnCmd2516); newLeafNode(lv_angle_8_0, grammarAccess.getTurnCmdAccess().getAngleDOUBLETerminalRuleCall_8_0()); if (current==null) { current = createModelElement(grammarAccess.getTurnCmdRule()); } setWithLastConsumed( current, "angle", lv_angle_8_0, "DOUBLE"); } } otherlv_9=(Token)match(input,23,FollowSets000.FOLLOW_23_in_ruleTurnCmd2533); newLeafNode(otherlv_9, grammarAccess.getTurnCmdAccess().getRightParenthesisKeyword_9()); } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleTurnCmd" // $ANTLR start "entryRuleObstacleCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1079:1: entryRuleObstacleCmd returns [EObject current=null] : iv_ruleObstacleCmd= ruleObstacleCmd EOF ; public final EObject entryRuleObstacleCmd() throws RecognitionException { EObject current = null; EObject iv_ruleObstacleCmd = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1080:2: (iv_ruleObstacleCmd= ruleObstacleCmd EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1081:2: iv_ruleObstacleCmd= ruleObstacleCmd EOF { newCompositeNode(grammarAccess.getObstacleCmdRule()); pushFollow(FollowSets000.FOLLOW_ruleObstacleCmd_in_entryRuleObstacleCmd2569); iv_ruleObstacleCmd=ruleObstacleCmd(); state._fsp--; current =iv_ruleObstacleCmd; match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleObstacleCmd2579); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleObstacleCmd" // $ANTLR start "ruleObstacleCmd" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1088:1: ruleObstacleCmd returns [EObject current=null] : (otherlv_0= 'obstacle' otherlv_1= '(' otherlv_2= 'distance' otherlv_3= '=' ( (lv_distance_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) ; public final EObject ruleObstacleCmd() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token otherlv_1=null; Token otherlv_2=null; Token otherlv_3=null; Token lv_distance_4_0=null; Token otherlv_5=null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1091:28: ( (otherlv_0= 'obstacle' otherlv_1= '(' otherlv_2= 'distance' otherlv_3= '=' ( (lv_distance_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1092:1: (otherlv_0= 'obstacle' otherlv_1= '(' otherlv_2= 'distance' otherlv_3= '=' ( (lv_distance_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1092:1: (otherlv_0= 'obstacle' otherlv_1= '(' otherlv_2= 'distance' otherlv_3= '=' ( (lv_distance_4_0= RULE_DOUBLE ) ) otherlv_5= ')' ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1092:3: otherlv_0= 'obstacle' otherlv_1= '(' otherlv_2= 'distance' otherlv_3= '=' ( (lv_distance_4_0= RULE_DOUBLE ) ) otherlv_5= ')' { otherlv_0=(Token)match(input,36,FollowSets000.FOLLOW_36_in_ruleObstacleCmd2616); newLeafNode(otherlv_0, grammarAccess.getObstacleCmdAccess().getObstacleKeyword_0()); otherlv_1=(Token)match(input,20,FollowSets000.FOLLOW_20_in_ruleObstacleCmd2628); newLeafNode(otherlv_1, grammarAccess.getObstacleCmdAccess().getLeftParenthesisKeyword_1()); otherlv_2=(Token)match(input,37,FollowSets000.FOLLOW_37_in_ruleObstacleCmd2640); newLeafNode(otherlv_2, grammarAccess.getObstacleCmdAccess().getDistanceKeyword_2()); otherlv_3=(Token)match(input,22,FollowSets000.FOLLOW_22_in_ruleObstacleCmd2652); newLeafNode(otherlv_3, grammarAccess.getObstacleCmdAccess().getEqualsSignKeyword_3()); // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1108:1: ( (lv_distance_4_0= RULE_DOUBLE ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1109:1: (lv_distance_4_0= RULE_DOUBLE ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1109:1: (lv_distance_4_0= RULE_DOUBLE ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1110:3: lv_distance_4_0= RULE_DOUBLE { lv_distance_4_0=(Token)match(input,RULE_DOUBLE,FollowSets000.FOLLOW_RULE_DOUBLE_in_ruleObstacleCmd2669); newLeafNode(lv_distance_4_0, grammarAccess.getObstacleCmdAccess().getDistanceDOUBLETerminalRuleCall_4_0()); if (current==null) { current = createModelElement(grammarAccess.getObstacleCmdRule()); } setWithLastConsumed( current, "distance", lv_distance_4_0, "DOUBLE"); } } otherlv_5=(Token)match(input,23,FollowSets000.FOLLOW_23_in_ruleObstacleCmd2686); newLeafNode(otherlv_5, grammarAccess.getObstacleCmdAccess().getRightParenthesisKeyword_5()); } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleObstacleCmd" // $ANTLR start "entryRuleBOOLEAN_LITERAL" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1138:1: entryRuleBOOLEAN_LITERAL returns [String current=null] : iv_ruleBOOLEAN_LITERAL= ruleBOOLEAN_LITERAL EOF ; public final String entryRuleBOOLEAN_LITERAL() throws RecognitionException { String current = null; AntlrDatatypeRuleToken iv_ruleBOOLEAN_LITERAL = null; try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1139:2: (iv_ruleBOOLEAN_LITERAL= ruleBOOLEAN_LITERAL EOF ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1140:2: iv_ruleBOOLEAN_LITERAL= ruleBOOLEAN_LITERAL EOF { newCompositeNode(grammarAccess.getBOOLEAN_LITERALRule()); pushFollow(FollowSets000.FOLLOW_ruleBOOLEAN_LITERAL_in_entryRuleBOOLEAN_LITERAL2723); iv_ruleBOOLEAN_LITERAL=ruleBOOLEAN_LITERAL(); state._fsp--; current =iv_ruleBOOLEAN_LITERAL.getText(); match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleBOOLEAN_LITERAL2734); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "entryRuleBOOLEAN_LITERAL" // $ANTLR start "ruleBOOLEAN_LITERAL" // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1147:1: ruleBOOLEAN_LITERAL returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= 'true' | kw= 'false' ) ; public final AntlrDatatypeRuleToken ruleBOOLEAN_LITERAL() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token kw=null; enterRule(); try { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1150:28: ( (kw= 'true' | kw= 'false' ) ) // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1151:1: (kw= 'true' | kw= 'false' ) { // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1151:1: (kw= 'true' | kw= 'false' ) int alt9=2; int LA9_0 = input.LA(1); if ( (LA9_0==38) ) { alt9=1; } else if ( (LA9_0==39) ) { alt9=2; } else { NoViableAltException nvae = new NoViableAltException("", 9, 0, input); throw nvae; } switch (alt9) { case 1 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1152:2: kw= 'true' { kw=(Token)match(input,38,FollowSets000.FOLLOW_38_in_ruleBOOLEAN_LITERAL2772); current.merge(kw); newLeafNode(kw, grammarAccess.getBOOLEAN_LITERALAccess().getTrueKeyword_0()); } break; case 2 : // ../lego.xtext/src-gen/insa/parser/antlr/internal/InternalLego.g:1159:2: kw= 'false' { kw=(Token)match(input,39,FollowSets000.FOLLOW_39_in_ruleBOOLEAN_LITERAL2791); current.merge(kw); newLeafNode(kw, grammarAccess.getBOOLEAN_LITERALAccess().getFalseKeyword_1()); } break; } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } // $ANTLR end "ruleBOOLEAN_LITERAL" // Delegated rules private static class FollowSets000 { public static final BitSet FOLLOW_ruleProgramUnit_in_entryRuleProgramUnit75 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleProgramUnit85 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleExpression_in_ruleProgramUnit130 = new BitSet(new long[]{0x0000001F0509C802L}); public static final BitSet FOLLOW_ruleExpression_in_entryRuleExpression166 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleExpression176 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleWhileLoop_in_ruleExpression223 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleNegExp_in_ruleExpression250 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleAndExp_in_ruleExpression277 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleIfBlock_in_ruleExpression304 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleCommand_in_ruleExpression331 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleBoolExp_in_entryRuleBoolExp366 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleBoolExp376 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleNegExp_in_ruleBoolExp423 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleAndExp_in_ruleBoolExp450 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleHasTurnedCmd_in_ruleBoolExp477 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleObstacleCmd_in_ruleBoolExp504 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleWhileLoop_in_entryRuleWhileLoop539 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleWhileLoop549 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_11_in_ruleWhileLoop586 = new BitSet(new long[]{0x0000001F0509C800L}); public static final BitSet FOLLOW_ruleBoolExp_in_ruleWhileLoop607 = new BitSet(new long[]{0x0000000000001000L}); public static final BitSet FOLLOW_12_in_ruleWhileLoop619 = new BitSet(new long[]{0x0000001F0509E800L}); public static final BitSet FOLLOW_ruleExpression_in_ruleWhileLoop640 = new BitSet(new long[]{0x0000001F0509E800L}); public static final BitSet FOLLOW_13_in_ruleWhileLoop653 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleNegExp_in_entryRuleNegExp689 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleNegExp699 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_14_in_ruleNegExp736 = new BitSet(new long[]{0x0000001F0509C800L}); public static final BitSet FOLLOW_ruleBoolExp_in_ruleNegExp757 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleAndExp_in_entryRuleAndExp793 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleAndExp803 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_15_in_ruleAndExp840 = new BitSet(new long[]{0x0000001F0509C800L}); public static final BitSet FOLLOW_ruleBoolExp_in_ruleAndExp861 = new BitSet(new long[]{0x0000001F0509C800L}); public static final BitSet FOLLOW_ruleBoolExp_in_ruleAndExp882 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleIfBlock_in_entryRuleIfBlock918 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleIfBlock928 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_16_in_ruleIfBlock965 = new BitSet(new long[]{0x0000001F0509C800L}); public static final BitSet FOLLOW_ruleBoolExp_in_ruleIfBlock986 = new BitSet(new long[]{0x0000000000020000L}); public static final BitSet FOLLOW_17_in_ruleIfBlock998 = new BitSet(new long[]{0x0000001F050DE800L}); public static final BitSet FOLLOW_ruleExpression_in_ruleIfBlock1019 = new BitSet(new long[]{0x0000001F050DE800L}); public static final BitSet FOLLOW_18_in_ruleIfBlock1033 = new BitSet(new long[]{0x0000001F0509E800L}); public static final BitSet FOLLOW_ruleExpression_in_ruleIfBlock1054 = new BitSet(new long[]{0x0000001F0509E800L}); public static final BitSet FOLLOW_13_in_ruleIfBlock1069 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleCommand_in_entryRuleCommand1105 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleCommand1115 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleMoveCmd_in_ruleCommand1162 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_rulePrintCmd_in_ruleCommand1189 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleSetTurnAngleCmd_in_ruleCommand1216 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleStopEngineCmd_in_ruleCommand1243 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleStopProgramCmd_in_ruleCommand1270 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleTurnCmd_in_ruleCommand1297 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleHasTurnedCmd_in_ruleCommand1324 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleObstacleCmd_in_ruleCommand1351 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleHasTurnedCmd_in_entryRuleHasTurnedCmd1388 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleHasTurnedCmd1398 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_19_in_ruleHasTurnedCmd1435 = new BitSet(new long[]{0x0000000000100000L}); public static final BitSet FOLLOW_20_in_ruleHasTurnedCmd1447 = new BitSet(new long[]{0x0000000000200000L}); public static final BitSet FOLLOW_21_in_ruleHasTurnedCmd1459 = new BitSet(new long[]{0x0000000000400000L}); public static final BitSet FOLLOW_22_in_ruleHasTurnedCmd1471 = new BitSet(new long[]{0x0000000000000010L}); public static final BitSet FOLLOW_RULE_DOUBLE_in_ruleHasTurnedCmd1488 = new BitSet(new long[]{0x0000000000800000L}); public static final BitSet FOLLOW_23_in_ruleHasTurnedCmd1505 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleMoveCmd_in_entryRuleMoveCmd1541 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleMoveCmd1551 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_24_in_ruleMoveCmd1588 = new BitSet(new long[]{0x0000000000100000L}); public static final BitSet FOLLOW_20_in_ruleMoveCmd1600 = new BitSet(new long[]{0x0000000002000000L}); public static final BitSet FOLLOW_25_in_ruleMoveCmd1612 = new BitSet(new long[]{0x0000000000400000L}); public static final BitSet FOLLOW_22_in_ruleMoveCmd1624 = new BitSet(new long[]{0x0000000000000010L}); public static final BitSet FOLLOW_RULE_DOUBLE_in_ruleMoveCmd1641 = new BitSet(new long[]{0x0000000000800000L}); public static final BitSet FOLLOW_23_in_ruleMoveCmd1658 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_rulePrintCmd_in_entryRulePrintCmd1694 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRulePrintCmd1704 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_26_in_rulePrintCmd1741 = new BitSet(new long[]{0x0000000000100000L}); public static final BitSet FOLLOW_20_in_rulePrintCmd1753 = new BitSet(new long[]{0x0000000008000000L}); public static final BitSet FOLLOW_27_in_rulePrintCmd1765 = new BitSet(new long[]{0x0000000000400000L}); public static final BitSet FOLLOW_22_in_rulePrintCmd1777 = new BitSet(new long[]{0x0000000000000020L}); public static final BitSet FOLLOW_RULE_STRING_in_rulePrintCmd1794 = new BitSet(new long[]{0x0000000010000000L}); public static final BitSet FOLLOW_28_in_rulePrintCmd1811 = new BitSet(new long[]{0x0000000020000000L}); public static final BitSet FOLLOW_29_in_rulePrintCmd1823 = new BitSet(new long[]{0x0000000000400000L}); public static final BitSet FOLLOW_22_in_rulePrintCmd1835 = new BitSet(new long[]{0x0000000000000040L}); public static final BitSet FOLLOW_RULE_INT_in_rulePrintCmd1852 = new BitSet(new long[]{0x0000000010000000L}); public static final BitSet FOLLOW_28_in_rulePrintCmd1869 = new BitSet(new long[]{0x0000000040000000L}); public static final BitSet FOLLOW_30_in_rulePrintCmd1881 = new BitSet(new long[]{0x0000000000400000L}); public static final BitSet FOLLOW_22_in_rulePrintCmd1893 = new BitSet(new long[]{0x0000000000000040L}); public static final BitSet FOLLOW_RULE_INT_in_rulePrintCmd1910 = new BitSet(new long[]{0x0000000010000000L}); public static final BitSet FOLLOW_28_in_rulePrintCmd1927 = new BitSet(new long[]{0x0000000080000000L}); public static final BitSet FOLLOW_31_in_rulePrintCmd1939 = new BitSet(new long[]{0x0000000000400000L}); public static final BitSet FOLLOW_22_in_rulePrintCmd1951 = new BitSet(new long[]{0x0000000000000040L}); public static final BitSet FOLLOW_RULE_INT_in_rulePrintCmd1968 = new BitSet(new long[]{0x0000000000800000L}); public static final BitSet FOLLOW_23_in_rulePrintCmd1985 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleSetTurnAngleCmd_in_entryRuleSetTurnAngleCmd2021 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleSetTurnAngleCmd2031 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_32_in_ruleSetTurnAngleCmd2068 = new BitSet(new long[]{0x0000000000100000L}); public static final BitSet FOLLOW_20_in_ruleSetTurnAngleCmd2080 = new BitSet(new long[]{0x0000000000200000L}); public static final BitSet FOLLOW_21_in_ruleSetTurnAngleCmd2092 = new BitSet(new long[]{0x0000000000400000L}); public static final BitSet FOLLOW_22_in_ruleSetTurnAngleCmd2104 = new BitSet(new long[]{0x0000000000000010L}); public static final BitSet FOLLOW_RULE_DOUBLE_in_ruleSetTurnAngleCmd2121 = new BitSet(new long[]{0x0000000000800000L}); public static final BitSet FOLLOW_23_in_ruleSetTurnAngleCmd2138 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleStopEngineCmd_in_entryRuleStopEngineCmd2174 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleStopEngineCmd2184 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_33_in_ruleStopEngineCmd2230 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleStopProgramCmd_in_entryRuleStopProgramCmd2266 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleStopProgramCmd2276 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_34_in_ruleStopProgramCmd2322 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleTurnCmd_in_entryRuleTurnCmd2358 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleTurnCmd2368 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_35_in_ruleTurnCmd2405 = new BitSet(new long[]{0x0000000000100000L}); public static final BitSet FOLLOW_20_in_ruleTurnCmd2417 = new BitSet(new long[]{0x0000000002000000L}); public static final BitSet FOLLOW_25_in_ruleTurnCmd2429 = new BitSet(new long[]{0x0000000000400000L}); public static final BitSet FOLLOW_22_in_ruleTurnCmd2441 = new BitSet(new long[]{0x0000000000000010L}); public static final BitSet FOLLOW_RULE_DOUBLE_in_ruleTurnCmd2458 = new BitSet(new long[]{0x0000000010000000L}); public static final BitSet FOLLOW_28_in_ruleTurnCmd2475 = new BitSet(new long[]{0x0000000000200000L}); public static final BitSet FOLLOW_21_in_ruleTurnCmd2487 = new BitSet(new long[]{0x0000000000400000L}); public static final BitSet FOLLOW_22_in_ruleTurnCmd2499 = new BitSet(new long[]{0x0000000000000010L}); public static final BitSet FOLLOW_RULE_DOUBLE_in_ruleTurnCmd2516 = new BitSet(new long[]{0x0000000000800000L}); public static final BitSet FOLLOW_23_in_ruleTurnCmd2533 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleObstacleCmd_in_entryRuleObstacleCmd2569 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleObstacleCmd2579 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_36_in_ruleObstacleCmd2616 = new BitSet(new long[]{0x0000000000100000L}); public static final BitSet FOLLOW_20_in_ruleObstacleCmd2628 = new BitSet(new long[]{0x0000002000000000L}); public static final BitSet FOLLOW_37_in_ruleObstacleCmd2640 = new BitSet(new long[]{0x0000000000400000L}); public static final BitSet FOLLOW_22_in_ruleObstacleCmd2652 = new BitSet(new long[]{0x0000000000000010L}); public static final BitSet FOLLOW_RULE_DOUBLE_in_ruleObstacleCmd2669 = new BitSet(new long[]{0x0000000000800000L}); public static final BitSet FOLLOW_23_in_ruleObstacleCmd2686 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_ruleBOOLEAN_LITERAL_in_entryRuleBOOLEAN_LITERAL2723 = new BitSet(new long[]{0x0000000000000000L}); public static final BitSet FOLLOW_EOF_in_entryRuleBOOLEAN_LITERAL2734 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_38_in_ruleBOOLEAN_LITERAL2772 = new BitSet(new long[]{0x0000000000000002L}); public static final BitSet FOLLOW_39_in_ruleBOOLEAN_LITERAL2791 = new BitSet(new long[]{0x0000000000000002L}); } }