input grammar: parser.yy
"abs" "ceiling" "floor" "log2" "loge" "log10" "max" "min" "pow" "sample_rate" "sign" "sin" "start" "time" "time_millis"
0 $accept → program $end 1 program → blocks $end 2 blocks → main_block 3 | block 4 | blocks block 5 block → "also" one_or_more_statements "end" "also" 6 | "when" exp one_or_more_statements "end" "when" 7 main_block → one_or_more_statements 8 zero_or_more_statements → %empty 9 | zero_or_more_statements statement 10 one_or_more_statements → statement 11 | one_or_more_statements statement 12 statement → array_assignment 13 | assignment 14 | clear_statement 15 | continue_statement 16 | exit_statement 17 | for_statement 18 | if_statement 19 | procedure_call 20 | reset_statement 21 | wait_statement 22 | while_statement 23 array_assignment → "identifier" "[" exp "]" "=" exp 24 | "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | "out_port" "[" exp "]" "=" exp 26 | "identifier" "$" "[" exp "]" "=" exp 27 | "identifier" "$" "[" exp "]" "=" string_exp 28 | "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → "identifier" "=" exp 30 | "in_port" "=" exp 31 | "out_port" "=" exp 32 | "identifier" "$" "=" exp 33 | "identifier" "$" "=" string_exp 34 clear_statement → "clear" "all" 35 continue_statement → "continue" "for" 36 | "continue" "while" 37 | "continue" "all" 38 exit_statement → "exit" "for" 39 | "exit" "while" 40 | "exit" "all" 41 for_statement → "for" assignment "to" exp zero_or_more_statements "next" 42 | "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 45 elseif_group → %empty 46 | elseif_group elseif_clause 47 elseif_clause → "elseif" exp "then" zero_or_more_statements 48 if_statement → "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → "print" "(" "out_port" "," string_list ")" 51 | "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → "reset" 53 wait_statement → "wait" exp 54 while_statement → "while" exp zero_or_more_statements "end" "while" 55 expression_list → exp 56 | expression_list "," exp 57 exp → "number" 58 | "note" 59 | "-" "number" 60 | "not" exp 61 | "in_port" 62 | "in_port" "[" exp "]" 63 | "out_port" 64 | "out_port" "[" exp "]" 65 | "identifier" 66 | "identifier" "[" exp "]" 67 | exp "+" exp 68 | exp "-" exp 69 | exp "*" exp 70 | exp "/" exp 71 | exp "comparison" exp 72 | exp "and" exp 73 | exp "or" exp 74 | "zeroargfunc" "(" ")" 75 | "channels" "(" "in_port" ")" 76 | "connected" "(" "in_port" ")" 77 | "connected" "(" "out_port" ")" 78 | "trigger" "(" "in_port" ")" 79 | "oneargfunc" "(" exp ")" 80 | "twoargfunc" "(" exp "," exp ")" 81 | exp "?" exp ":" exp 82 | "(" exp ")" 83 string_list → string_exp 84 | exp 85 | string_list "," string_exp 86 | string_list "," exp 87 string_exp → "quoted_string" 88 | "identifier" "$" 89 | "identifier" "$" "[" exp "]" 90 | "debug" "(" "identifier" ")" 91 | "debug" "(" "identifier" "$" ")" 92 | "debug" "(" "identifier" "[" "]" "," exp "," exp ")" 93 | "debug" "(" "identifier" "$" "[" "]" "," exp "," exp ")"
0 $accept → • program $end 1 program → • blocks $end 2 blocks → • main_block 3 | • block 4 | • blocks block 5 block → • "also" one_or_more_statements "end" "also" 6 | • "when" exp one_or_more_statements "end" "when" 7 main_block → • one_or_more_statements 10 one_or_more_statements → • statement 11 | • one_or_more_statements statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" "also" shift, and go to state 1 "clear" shift, and go to state 2 "continue" shift, and go to state 3 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "when" shift, and go to state 11 "while" shift, and go to state 12 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 program go to state 16 blocks go to state 17 block go to state 18 main_block go to state 19 one_or_more_statements go to state 20 statement go to state 21 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
5 block → "also" • one_or_more_statements "end" "also" 10 one_or_more_statements → • statement 11 | • one_or_more_statements statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" "clear" shift, and go to state 2 "continue" shift, and go to state 3 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "while" shift, and go to state 12 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 one_or_more_statements go to state 33 statement go to state 21 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
34 clear_statement → "clear" • "all" "all" shift, and go to state 34
35 continue_statement → "continue" • "for" 36 | "continue" • "while" 37 | "continue" • "all" "all" shift, and go to state 35 "for" shift, and go to state 36 "while" shift, and go to state 37
38 exit_statement → "exit" • "for" 39 | "exit" • "while" 40 | "exit" • "all" "all" shift, and go to state 38 "for" shift, and go to state 39 "while" shift, and go to state 40
29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 41 for_statement → "for" • assignment "to" exp zero_or_more_statements "next" 42 | "for" • assignment "to" exp "step" exp zero_or_more_statements "next" 43 | "for" • assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | "for" • assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" "identifier" shift, and go to state 41 "in_port" shift, and go to state 14 "out_port" shift, and go to state 42 assignment go to state 43
48 if_statement → "if" • exp "then" zero_or_more_statements elseif_group "end" "if" 49 | "if" • exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 58
50 procedure_call → "print" • "(" "out_port" "," string_list ")" "(" shift, and go to state 59
52 reset_statement → "reset" • $default reduce using rule 52 (reset_statement)
51 procedure_call → "set_channels" • "(" "out_port" "," exp ")" "(" shift, and go to state 60
53 wait_statement → "wait" • exp 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 61
6 block → "when" • exp one_or_more_statements "end" "when" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 62
54 while_statement → "while" • exp zero_or_more_statements "end" "while" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 63
23 array_assignment → "identifier" • "[" exp "]" "=" exp 24 | "identifier" • "[" exp "]" "=" "{" expression_list "}" 26 | "identifier" • "$" "[" exp "]" "=" exp 27 | "identifier" • "$" "[" exp "]" "=" string_exp 28 | "identifier" • "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → "identifier" • "=" exp 32 | "identifier" • "$" "=" exp 33 | "identifier" • "$" "=" string_exp "=" shift, and go to state 64 "[" shift, and go to state 65 "$" shift, and go to state 66
30 assignment → "in_port" • "=" exp "=" shift, and go to state 67
25 array_assignment → "out_port" • "[" exp "]" "=" exp 31 assignment → "out_port" • "=" exp "=" shift, and go to state 68 "[" shift, and go to state 69
0 $accept → program • $end $end shift, and go to state 70
1 program → blocks • $end 4 blocks → blocks • block 5 block → • "also" one_or_more_statements "end" "also" 6 | • "when" exp one_or_more_statements "end" "when" $end shift, and go to state 71 "also" shift, and go to state 1 "when" shift, and go to state 11 block go to state 72
3 blocks → block • $default reduce using rule 3 (blocks)
2 blocks → main_block • $default reduce using rule 2 (blocks)
7 main_block → one_or_more_statements • [$end, "also", "when"] 11 one_or_more_statements → one_or_more_statements • statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" "clear" shift, and go to state 2 "continue" shift, and go to state 3 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "while" shift, and go to state 12 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 $default reduce using rule 7 (main_block) statement go to state 73 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
10 one_or_more_statements → statement • $default reduce using rule 10 (one_or_more_statements)
12 statement → array_assignment • $default reduce using rule 12 (statement)
13 statement → assignment • $default reduce using rule 13 (statement)
14 statement → clear_statement • $default reduce using rule 14 (statement)
15 statement → continue_statement • $default reduce using rule 15 (statement)
16 statement → exit_statement • $default reduce using rule 16 (statement)
17 statement → for_statement • $default reduce using rule 17 (statement)
18 statement → if_statement • $default reduce using rule 18 (statement)
19 statement → procedure_call • $default reduce using rule 19 (statement)
20 statement → reset_statement • $default reduce using rule 20 (statement)
21 statement → wait_statement • $default reduce using rule 21 (statement)
22 statement → while_statement • $default reduce using rule 22 (statement)
5 block → "also" one_or_more_statements • "end" "also" 11 one_or_more_statements → one_or_more_statements • statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" "clear" shift, and go to state 2 "continue" shift, and go to state 3 "end" shift, and go to state 74 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "while" shift, and go to state 12 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 statement go to state 73 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
34 clear_statement → "clear" "all" • $default reduce using rule 34 (clear_statement)
37 continue_statement → "continue" "all" • $default reduce using rule 37 (continue_statement)
35 continue_statement → "continue" "for" • $default reduce using rule 35 (continue_statement)
36 continue_statement → "continue" "while" • $default reduce using rule 36 (continue_statement)
40 exit_statement → "exit" "all" • $default reduce using rule 40 (exit_statement)
38 exit_statement → "exit" "for" • $default reduce using rule 38 (exit_statement)
39 exit_statement → "exit" "while" • $default reduce using rule 39 (exit_statement)
29 assignment → "identifier" • "=" exp 32 | "identifier" • "$" "=" exp 33 | "identifier" • "$" "=" string_exp "=" shift, and go to state 64 "$" shift, and go to state 75
31 assignment → "out_port" • "=" exp "=" shift, and go to state 68
41 for_statement → "for" assignment • "to" exp zero_or_more_statements "next" 42 | "for" assignment • "to" exp "step" exp zero_or_more_statements "next" 43 | "for" assignment • "to" exp zero_or_more_statements "nexthighcpu" 44 | "for" assignment • "to" exp "step" exp zero_or_more_statements "nexthighcpu" "to" shift, and go to state 76
75 exp → "channels" • "(" "in_port" ")" "(" shift, and go to state 77
76 exp → "connected" • "(" "in_port" ")" 77 | "connected" • "(" "out_port" ")" "(" shift, and go to state 78
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 60 | "not" • exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 79
78 exp → "trigger" • "(" "in_port" ")" "(" shift, and go to state 80
59 exp → "-" • "number" "number" shift, and go to state 81
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" 82 | "(" • exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 82
65 exp → "identifier" • [$end, "also", "and", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", "-", "+", "*", "/", ")", "}", "]", ",", "?", ":", "identifier", "in_port", "out_port", "comparison"] 66 | "identifier" • "[" exp "]" "[" shift, and go to state 83 $default reduce using rule 65 (exp)
57 exp → "number" • $default reduce using rule 57 (exp)
58 exp → "note" • $default reduce using rule 58 (exp)
61 exp → "in_port" • [$end, "also", "and", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", "-", "+", "*", "/", ")", "}", "]", ",", "?", ":", "identifier", "in_port", "out_port", "comparison"] 62 | "in_port" • "[" exp "]" "[" shift, and go to state 84 $default reduce using rule 61 (exp)
63 exp → "out_port" • [$end, "also", "and", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", "-", "+", "*", "/", ")", "}", "]", ",", "?", ":", "identifier", "in_port", "out_port", "comparison"] 64 | "out_port" • "[" exp "]" "[" shift, and go to state 85 $default reduce using rule 63 (exp)
74 exp → "zeroargfunc" • "(" ")" "(" shift, and go to state 86
79 exp → "oneargfunc" • "(" exp ")" "(" shift, and go to state 87
80 exp → "twoargfunc" • "(" exp "," exp ")" "(" shift, and go to state 88
48 if_statement → "if" exp • "then" zero_or_more_statements elseif_group "end" "if" 49 | "if" exp • "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "then" shift, and go to state 91 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97
50 procedure_call → "print" "(" • "out_port" "," string_list ")" "out_port" shift, and go to state 98
51 procedure_call → "set_channels" "(" • "out_port" "," exp ")" "out_port" shift, and go to state 99
53 wait_statement → "wait" exp • [$end, "also", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "wait", "when", "while", "identifier", "in_port", "out_port"] 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 53 (wait_statement)
6 block → "when" exp • one_or_more_statements "end" "when" 10 one_or_more_statements → • statement 11 | • one_or_more_statements statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "clear" shift, and go to state 2 "continue" shift, and go to state 3 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "or" shift, and go to state 90 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "while" shift, and go to state 12 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 "comparison" shift, and go to state 97 one_or_more_statements go to state 100 statement go to state 21 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
8 zero_or_more_statements → • %empty ["clear", "continue", "end", "exit", "for", "if", "print", "reset", "set_channels", "wait", "while", "identifier", "in_port", "out_port"] 9 | • zero_or_more_statements statement 54 while_statement → "while" exp • zero_or_more_statements "end" "while" 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 8 (zero_or_more_statements) zero_or_more_statements go to state 101
29 assignment → "identifier" "=" • exp 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 102
23 array_assignment → "identifier" "[" • exp "]" "=" exp 24 | "identifier" "[" • exp "]" "=" "{" expression_list "}" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 103
26 array_assignment → "identifier" "$" • "[" exp "]" "=" exp 27 | "identifier" "$" • "[" exp "]" "=" string_exp 28 | "identifier" "$" • "[" exp "]" "=" "{" string_list "}" 32 assignment → "identifier" "$" • "=" exp 33 | "identifier" "$" • "=" string_exp "=" shift, and go to state 104 "[" shift, and go to state 105
30 assignment → "in_port" "=" • exp 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 106
31 assignment → "out_port" "=" • exp 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 107
25 array_assignment → "out_port" "[" • exp "]" "=" exp 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 108
0 $accept → program $end • $default accept
1 program → blocks $end • $default reduce using rule 1 (program)
4 blocks → blocks block • $default reduce using rule 4 (blocks)
11 one_or_more_statements → one_or_more_statements statement • $default reduce using rule 11 (one_or_more_statements)
5 block → "also" one_or_more_statements "end" • "also" "also" shift, and go to state 109
32 assignment → "identifier" "$" • "=" exp 33 | "identifier" "$" • "=" string_exp "=" shift, and go to state 104
41 for_statement → "for" assignment "to" • exp zero_or_more_statements "next" 42 | "for" assignment "to" • exp "step" exp zero_or_more_statements "next" 43 | "for" assignment "to" • exp zero_or_more_statements "nexthighcpu" 44 | "for" assignment "to" • exp "step" exp zero_or_more_statements "nexthighcpu" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 110
75 exp → "channels" "(" • "in_port" ")" "in_port" shift, and go to state 111
76 exp → "connected" "(" • "in_port" ")" 77 | "connected" "(" • "out_port" ")" "in_port" shift, and go to state 112 "out_port" shift, and go to state 113
60 exp → "not" exp • [$end, "also", "and", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", "-", "+", "*", "/", ")", "}", "]", ",", "?", ":", "identifier", "in_port", "out_port", "comparison"] 67 | exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp $default reduce using rule 60 (exp) Conflict between rule 60 and token "and" resolved as reduce ("and" < NEG). Conflict between rule 60 and token "or" resolved as reduce ("or" < NEG). Conflict between rule 60 and token "-" resolved as reduce ("-" < NEG). Conflict between rule 60 and token "+" resolved as reduce ("+" < NEG). Conflict between rule 60 and token "*" resolved as reduce ("*" < NEG). Conflict between rule 60 and token "/" resolved as reduce ("/" < NEG). Conflict between rule 60 and token "?" resolved as reduce ("?" < NEG). Conflict between rule 60 and token "comparison" resolved as reduce ("comparison" < NEG).
78 exp → "trigger" "(" • "in_port" ")" "in_port" shift, and go to state 114
59 exp → "-" "number" • $default reduce using rule 59 (exp)
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp 82 | "(" exp • ")" "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 ")" shift, and go to state 115 "?" shift, and go to state 96 "comparison" shift, and go to state 97
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 66 | "identifier" "[" • exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 116
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 62 | "in_port" "[" • exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 117
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 64 | "out_port" "[" • exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 118
74 exp → "zeroargfunc" "(" • ")" ")" shift, and go to state 119
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 79 | "oneargfunc" "(" • exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 120
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 80 | "twoargfunc" "(" • exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 121
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 72 | exp "and" • exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 122
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 73 | exp "or" • exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 123
8 zero_or_more_statements → • %empty 9 | • zero_or_more_statements statement 48 if_statement → "if" exp "then" • zero_or_more_statements elseif_group "end" "if" 49 | "if" exp "then" • zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" $default reduce using rule 8 (zero_or_more_statements) zero_or_more_statements go to state 124
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 68 | exp "-" • exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 125
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 67 | exp "+" • exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 126
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 69 | exp "*" • exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 127
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 70 | exp "/" • exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 128
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 81 | exp "?" • exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 129
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 71 | exp "comparison" • exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 130
50 procedure_call → "print" "(" "out_port" • "," string_list ")" "," shift, and go to state 131
51 procedure_call → "set_channels" "(" "out_port" • "," exp ")" "," shift, and go to state 132
6 block → "when" exp one_or_more_statements • "end" "when" 11 one_or_more_statements → one_or_more_statements • statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" "clear" shift, and go to state 2 "continue" shift, and go to state 3 "end" shift, and go to state 133 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "while" shift, and go to state 12 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 statement go to state 73 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
9 zero_or_more_statements → zero_or_more_statements • statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" 54 | "while" exp zero_or_more_statements • "end" "while" "clear" shift, and go to state 2 "continue" shift, and go to state 3 "end" shift, and go to state 134 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "while" shift, and go to state 12 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 statement go to state 135 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
29 assignment → "identifier" "=" exp • [$end, "also", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "to", "wait", "when", "while", "identifier", "in_port", "out_port"] 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 29 (assignment)
23 array_assignment → "identifier" "[" exp • "]" "=" exp 24 | "identifier" "[" exp • "]" "=" "{" expression_list "}" 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "]" shift, and go to state 136 "?" shift, and go to state 96 "comparison" shift, and go to state 97
32 assignment → "identifier" "$" "=" • exp 33 | "identifier" "$" "=" • string_exp 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" 87 string_exp → • "quoted_string" 88 | • "identifier" "$" 89 | • "identifier" "$" "[" exp "]" 90 | • "debug" "(" "identifier" ")" 91 | • "debug" "(" "identifier" "$" ")" 92 | • "debug" "(" "identifier" "[" "]" "," exp "," exp ")" 93 | • "debug" "(" "identifier" "$" "[" "]" "," exp "," exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "debug" shift, and go to state 137 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 138 "quoted_string" shift, and go to state 139 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 140 string_exp go to state 141
26 array_assignment → "identifier" "$" "[" • exp "]" "=" exp 27 | "identifier" "$" "[" • exp "]" "=" string_exp 28 | "identifier" "$" "[" • exp "]" "=" "{" string_list "}" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 142
30 assignment → "in_port" "=" exp • [$end, "also", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "to", "wait", "when", "while", "identifier", "in_port", "out_port"] 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 30 (assignment)
31 assignment → "out_port" "=" exp • [$end, "also", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "to", "wait", "when", "while", "identifier", "in_port", "out_port"] 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 31 (assignment)
25 array_assignment → "out_port" "[" exp • "]" "=" exp 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "]" shift, and go to state 143 "?" shift, and go to state 96 "comparison" shift, and go to state 97
5 block → "also" one_or_more_statements "end" "also" • $default reduce using rule 5 (block)
8 zero_or_more_statements → • %empty ["clear", "continue", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "wait", "while", "identifier", "in_port", "out_port"] 9 | • zero_or_more_statements statement 41 for_statement → "for" assignment "to" exp • zero_or_more_statements "next" 42 | "for" assignment "to" exp • "step" exp zero_or_more_statements "next" 43 | "for" assignment "to" exp • zero_or_more_statements "nexthighcpu" 44 | "for" assignment "to" exp • "step" exp zero_or_more_statements "nexthighcpu" 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "step" shift, and go to state 144 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 8 (zero_or_more_statements) zero_or_more_statements go to state 145
75 exp → "channels" "(" "in_port" • ")" ")" shift, and go to state 146
76 exp → "connected" "(" "in_port" • ")" ")" shift, and go to state 147
77 exp → "connected" "(" "out_port" • ")" ")" shift, and go to state 148
78 exp → "trigger" "(" "in_port" • ")" ")" shift, and go to state 149
82 exp → "(" exp ")" • $default reduce using rule 82 (exp)
66 exp → "identifier" "[" exp • "]" 67 | exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "]" shift, and go to state 150 "?" shift, and go to state 96 "comparison" shift, and go to state 97
62 exp → "in_port" "[" exp • "]" 67 | exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "]" shift, and go to state 151 "?" shift, and go to state 96 "comparison" shift, and go to state 97
64 exp → "out_port" "[" exp • "]" 67 | exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "]" shift, and go to state 152 "?" shift, and go to state 96 "comparison" shift, and go to state 97
74 exp → "zeroargfunc" "(" ")" • $default reduce using rule 74 (exp)
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 79 | "oneargfunc" "(" exp • ")" 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 ")" shift, and go to state 153 "?" shift, and go to state 96 "comparison" shift, and go to state 97
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 80 | "twoargfunc" "(" exp • "," exp ")" 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "," shift, and go to state 154 "?" shift, and go to state 96 "comparison" shift, and go to state 97
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 72 | exp "and" exp • [$end, "also", "and", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", ")", "}", "]", ",", "?", ":", "identifier", "in_port", "out_port"] 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "comparison" shift, and go to state 97 $default reduce using rule 72 (exp) Conflict between rule 72 and token "and" resolved as reduce (%left "and"). Conflict between rule 72 and token "or" resolved as reduce ("or" < "and"). Conflict between rule 72 and token "-" resolved as shift ("and" < "-"). Conflict between rule 72 and token "+" resolved as shift ("and" < "+"). Conflict between rule 72 and token "*" resolved as shift ("and" < "*"). Conflict between rule 72 and token "/" resolved as shift ("and" < "/"). Conflict between rule 72 and token "?" resolved as reduce ("?" < "and"). Conflict between rule 72 and token "comparison" resolved as shift ("and" < "comparison").
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 73 | exp "or" exp • [$end, "also", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", ")", "}", "]", ",", "?", ":", "identifier", "in_port", "out_port"] 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "comparison" shift, and go to state 97 $default reduce using rule 73 (exp) Conflict between rule 73 and token "and" resolved as shift ("or" < "and"). Conflict between rule 73 and token "or" resolved as reduce (%left "or"). Conflict between rule 73 and token "-" resolved as shift ("or" < "-"). Conflict between rule 73 and token "+" resolved as shift ("or" < "+"). Conflict between rule 73 and token "*" resolved as shift ("or" < "*"). Conflict between rule 73 and token "/" resolved as shift ("or" < "/"). Conflict between rule 73 and token "?" resolved as reduce ("?" < "or"). Conflict between rule 73 and token "comparison" resolved as shift ("or" < "comparison").
9 zero_or_more_statements → zero_or_more_statements • statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 45 elseif_group → • %empty ["else", "elseif", "end"] 46 | • elseif_group elseif_clause 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 48 | "if" exp "then" zero_or_more_statements • elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 49 | "if" exp "then" zero_or_more_statements • elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" "clear" shift, and go to state 2 "continue" shift, and go to state 3 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "while" shift, and go to state 12 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 $default reduce using rule 45 (elseif_group) statement go to state 135 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 elseif_group go to state 155 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
67 exp → exp • "+" exp 68 | exp • "-" exp 68 | exp "-" exp • [$end, "also", "and", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", "-", "+", ")", "}", "]", ",", "?", ":", "identifier", "in_port", "out_port", "comparison"] 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "*" shift, and go to state 94 "/" shift, and go to state 95 $default reduce using rule 68 (exp) Conflict between rule 68 and token "and" resolved as reduce ("and" < "-"). Conflict between rule 68 and token "or" resolved as reduce ("or" < "-"). Conflict between rule 68 and token "-" resolved as reduce (%left "-"). Conflict between rule 68 and token "+" resolved as reduce (%left "+"). Conflict between rule 68 and token "*" resolved as shift ("-" < "*"). Conflict between rule 68 and token "/" resolved as shift ("-" < "/"). Conflict between rule 68 and token "?" resolved as reduce ("?" < "-"). Conflict between rule 68 and token "comparison" resolved as reduce ("comparison" < "-").
67 exp → exp • "+" exp 67 | exp "+" exp • [$end, "also", "and", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", "-", "+", ")", "}", "]", ",", "?", ":", "identifier", "in_port", "out_port", "comparison"] 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "*" shift, and go to state 94 "/" shift, and go to state 95 $default reduce using rule 67 (exp) Conflict between rule 67 and token "and" resolved as reduce ("and" < "+"). Conflict between rule 67 and token "or" resolved as reduce ("or" < "+"). Conflict between rule 67 and token "-" resolved as reduce (%left "-"). Conflict between rule 67 and token "+" resolved as reduce (%left "+"). Conflict between rule 67 and token "*" resolved as shift ("+" < "*"). Conflict between rule 67 and token "/" resolved as shift ("+" < "/"). Conflict between rule 67 and token "?" resolved as reduce ("?" < "+"). Conflict between rule 67 and token "comparison" resolved as reduce ("comparison" < "+").
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 69 | exp "*" exp • [$end, "also", "and", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", "-", "+", "*", "/", ")", "}", "]", ",", "?", ":", "identifier", "in_port", "out_port", "comparison"] 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp $default reduce using rule 69 (exp) Conflict between rule 69 and token "and" resolved as reduce ("and" < "*"). Conflict between rule 69 and token "or" resolved as reduce ("or" < "*"). Conflict between rule 69 and token "-" resolved as reduce ("-" < "*"). Conflict between rule 69 and token "+" resolved as reduce ("+" < "*"). Conflict between rule 69 and token "*" resolved as reduce (%left "*"). Conflict between rule 69 and token "/" resolved as reduce (%left "/"). Conflict between rule 69 and token "?" resolved as reduce ("?" < "*"). Conflict between rule 69 and token "comparison" resolved as reduce ("comparison" < "*").
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 70 | exp "/" exp • [$end, "also", "and", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", "-", "+", "*", "/", ")", "}", "]", ",", "?", ":", "identifier", "in_port", "out_port", "comparison"] 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp $default reduce using rule 70 (exp) Conflict between rule 70 and token "and" resolved as reduce ("and" < "/"). Conflict between rule 70 and token "or" resolved as reduce ("or" < "/"). Conflict between rule 70 and token "-" resolved as reduce ("-" < "/"). Conflict between rule 70 and token "+" resolved as reduce ("+" < "/"). Conflict between rule 70 and token "*" resolved as reduce (%left "*"). Conflict between rule 70 and token "/" resolved as reduce (%left "/"). Conflict between rule 70 and token "?" resolved as reduce ("?" < "/"). Conflict between rule 70 and token "comparison" resolved as reduce ("comparison" < "/").
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp 81 | exp "?" exp • ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 ":" shift, and go to state 156 "comparison" shift, and go to state 97
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 71 | exp "comparison" exp • [$end, "also", "and", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", ")", "}", "]", ",", "?", ":", "identifier", "in_port", "out_port", "comparison"] 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 $default reduce using rule 71 (exp) Conflict between rule 71 and token "and" resolved as reduce ("and" < "comparison"). Conflict between rule 71 and token "or" resolved as reduce ("or" < "comparison"). Conflict between rule 71 and token "-" resolved as shift ("comparison" < "-"). Conflict between rule 71 and token "+" resolved as shift ("comparison" < "+"). Conflict between rule 71 and token "*" resolved as shift ("comparison" < "*"). Conflict between rule 71 and token "/" resolved as shift ("comparison" < "/"). Conflict between rule 71 and token "?" resolved as reduce ("?" < "comparison"). Conflict between rule 71 and token "comparison" resolved as reduce (%left "comparison").
50 procedure_call → "print" "(" "out_port" "," • string_list ")" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" 83 string_list → • string_exp 84 | • exp 85 | • string_list "," string_exp 86 | • string_list "," exp 87 string_exp → • "quoted_string" 88 | • "identifier" "$" 89 | • "identifier" "$" "[" exp "]" 90 | • "debug" "(" "identifier" ")" 91 | • "debug" "(" "identifier" "$" ")" 92 | • "debug" "(" "identifier" "[" "]" "," exp "," exp ")" 93 | • "debug" "(" "identifier" "$" "[" "]" "," exp "," exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "debug" shift, and go to state 137 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 138 "quoted_string" shift, and go to state 139 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 157 string_list go to state 158 string_exp go to state 159
51 procedure_call → "set_channels" "(" "out_port" "," • exp ")" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 160
6 block → "when" exp one_or_more_statements "end" • "when" "when" shift, and go to state 161
54 while_statement → "while" exp zero_or_more_statements "end" • "while" "while" shift, and go to state 162
9 zero_or_more_statements → zero_or_more_statements statement • $default reduce using rule 9 (zero_or_more_statements)
23 array_assignment → "identifier" "[" exp "]" • "=" exp 24 | "identifier" "[" exp "]" • "=" "{" expression_list "}" "=" shift, and go to state 163
90 string_exp → "debug" • "(" "identifier" ")" 91 | "debug" • "(" "identifier" "$" ")" 92 | "debug" • "(" "identifier" "[" "]" "," exp "," exp ")" 93 | "debug" • "(" "identifier" "$" "[" "]" "," exp "," exp ")" "(" shift, and go to state 164
65 exp → "identifier" • [$end, "also", "and", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "or", "print", "reset", "set_channels", "to", "wait", "when", "while", "-", "+", "*", "/", ")", "}", ",", "?", "identifier", "in_port", "out_port", "comparison"] 66 | "identifier" • "[" exp "]" 88 string_exp → "identifier" • "$" 89 | "identifier" • "$" "[" exp "]" "[" shift, and go to state 83 "$" shift, and go to state 165 $default reduce using rule 65 (exp)
87 string_exp → "quoted_string" • $default reduce using rule 87 (string_exp)
32 assignment → "identifier" "$" "=" exp • [$end, "also", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "to", "wait", "when", "while", "identifier", "in_port", "out_port"] 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 32 (assignment)
33 assignment → "identifier" "$" "=" string_exp • $default reduce using rule 33 (assignment)
26 array_assignment → "identifier" "$" "[" exp • "]" "=" exp 27 | "identifier" "$" "[" exp • "]" "=" string_exp 28 | "identifier" "$" "[" exp • "]" "=" "{" string_list "}" 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "]" shift, and go to state 166 "?" shift, and go to state 96 "comparison" shift, and go to state 97
25 array_assignment → "out_port" "[" exp "]" • "=" exp "=" shift, and go to state 167
42 for_statement → "for" assignment "to" exp "step" • exp zero_or_more_statements "next" 44 | "for" assignment "to" exp "step" • exp zero_or_more_statements "nexthighcpu" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 168
9 zero_or_more_statements → zero_or_more_statements • statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 41 | "for" assignment "to" exp zero_or_more_statements • "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 43 | "for" assignment "to" exp zero_or_more_statements • "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" "clear" shift, and go to state 2 "continue" shift, and go to state 3 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "next" shift, and go to state 169 "nexthighcpu" shift, and go to state 170 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "while" shift, and go to state 12 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 statement go to state 135 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
75 exp → "channels" "(" "in_port" ")" • $default reduce using rule 75 (exp)
76 exp → "connected" "(" "in_port" ")" • $default reduce using rule 76 (exp)
77 exp → "connected" "(" "out_port" ")" • $default reduce using rule 77 (exp)
78 exp → "trigger" "(" "in_port" ")" • $default reduce using rule 78 (exp)
66 exp → "identifier" "[" exp "]" • $default reduce using rule 66 (exp)
62 exp → "in_port" "[" exp "]" • $default reduce using rule 62 (exp)
64 exp → "out_port" "[" exp "]" • $default reduce using rule 64 (exp)
79 exp → "oneargfunc" "(" exp ")" • $default reduce using rule 79 (exp)
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 80 | "twoargfunc" "(" exp "," • exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 171
46 elseif_group → elseif_group • elseif_clause 47 elseif_clause → • "elseif" exp "then" zero_or_more_statements 48 if_statement → "if" exp "then" zero_or_more_statements elseif_group • "end" "if" 49 | "if" exp "then" zero_or_more_statements elseif_group • "else" zero_or_more_statements "end" "if" "else" shift, and go to state 172 "elseif" shift, and go to state 173 "end" shift, and go to state 174 elseif_clause go to state 175
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 81 | exp "?" exp ":" • exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 176
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp 84 string_list → exp • [")", "}", ","] "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 84 (string_list)
50 procedure_call → "print" "(" "out_port" "," string_list • ")" 85 string_list → string_list • "," string_exp 86 | string_list • "," exp ")" shift, and go to state 177 "," shift, and go to state 178
83 string_list → string_exp • $default reduce using rule 83 (string_list)
51 procedure_call → "set_channels" "(" "out_port" "," exp • ")" 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 ")" shift, and go to state 179 "?" shift, and go to state 96 "comparison" shift, and go to state 97
6 block → "when" exp one_or_more_statements "end" "when" • $default reduce using rule 6 (block)
54 while_statement → "while" exp zero_or_more_statements "end" "while" • $default reduce using rule 54 (while_statement)
23 array_assignment → "identifier" "[" exp "]" "=" • exp 24 | "identifier" "[" exp "]" "=" • "{" expression_list "}" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "{" shift, and go to state 180 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 181
90 string_exp → "debug" "(" • "identifier" ")" 91 | "debug" "(" • "identifier" "$" ")" 92 | "debug" "(" • "identifier" "[" "]" "," exp "," exp ")" 93 | "debug" "(" • "identifier" "$" "[" "]" "," exp "," exp ")" "identifier" shift, and go to state 182
88 string_exp → "identifier" "$" • [$end, "also", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "to", "wait", "when", "while", ")", "}", ",", "identifier", "in_port", "out_port"] 89 | "identifier" "$" • "[" exp "]" "[" shift, and go to state 183 $default reduce using rule 88 (string_exp)
26 array_assignment → "identifier" "$" "[" exp "]" • "=" exp 27 | "identifier" "$" "[" exp "]" • "=" string_exp 28 | "identifier" "$" "[" exp "]" • "=" "{" string_list "}" "=" shift, and go to state 184
25 array_assignment → "out_port" "[" exp "]" "=" • exp 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 185
8 zero_or_more_statements → • %empty ["clear", "continue", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "wait", "while", "identifier", "in_port", "out_port"] 9 | • zero_or_more_statements statement 42 for_statement → "for" assignment "to" exp "step" exp • zero_or_more_statements "next" 44 | "for" assignment "to" exp "step" exp • zero_or_more_statements "nexthighcpu" 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 8 (zero_or_more_statements) zero_or_more_statements go to state 186
41 for_statement → "for" assignment "to" exp zero_or_more_statements "next" • $default reduce using rule 41 (for_statement)
43 for_statement → "for" assignment "to" exp zero_or_more_statements "nexthighcpu" • $default reduce using rule 43 (for_statement)
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 80 | "twoargfunc" "(" exp "," exp • ")" 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 ")" shift, and go to state 187 "?" shift, and go to state 96 "comparison" shift, and go to state 97
8 zero_or_more_statements → • %empty 9 | • zero_or_more_statements statement 49 if_statement → "if" exp "then" zero_or_more_statements elseif_group "else" • zero_or_more_statements "end" "if" $default reduce using rule 8 (zero_or_more_statements) zero_or_more_statements go to state 188
47 elseif_clause → "elseif" • exp "then" zero_or_more_statements 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 189
48 if_statement → "if" exp "then" zero_or_more_statements elseif_group "end" • "if" "if" shift, and go to state 190
46 elseif_group → elseif_group elseif_clause • $default reduce using rule 46 (elseif_group)
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp 81 | exp "?" exp ":" exp • [$end, "also", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "step", "then", "to", "wait", "when", "while", ")", "}", "]", ",", ":", "identifier", "in_port", "out_port"] "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 81 (exp) Conflict between rule 81 and token "and" resolved as shift (":" < "and"). Conflict between rule 81 and token "or" resolved as shift (":" < "or"). Conflict between rule 81 and token "-" resolved as shift (":" < "-"). Conflict between rule 81 and token "+" resolved as shift (":" < "+"). Conflict between rule 81 and token "*" resolved as shift (":" < "*"). Conflict between rule 81 and token "/" resolved as shift (":" < "/"). Conflict between rule 81 and token "?" resolved as shift (%right "?"). Conflict between rule 81 and token "comparison" resolved as shift (":" < "comparison").
50 procedure_call → "print" "(" "out_port" "," string_list ")" • $default reduce using rule 50 (procedure_call)
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" 85 string_list → string_list "," • string_exp 86 | string_list "," • exp 87 string_exp → • "quoted_string" 88 | • "identifier" "$" 89 | • "identifier" "$" "[" exp "]" 90 | • "debug" "(" "identifier" ")" 91 | • "debug" "(" "identifier" "$" ")" 92 | • "debug" "(" "identifier" "[" "]" "," exp "," exp ")" 93 | • "debug" "(" "identifier" "$" "[" "]" "," exp "," exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "debug" shift, and go to state 137 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 138 "quoted_string" shift, and go to state 139 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 191 string_exp go to state 192
51 procedure_call → "set_channels" "(" "out_port" "," exp ")" • $default reduce using rule 51 (procedure_call)
24 array_assignment → "identifier" "[" exp "]" "=" "{" • expression_list "}" 55 expression_list → • exp 56 | • expression_list "," exp 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 expression_list go to state 193 exp go to state 194
23 array_assignment → "identifier" "[" exp "]" "=" exp • [$end, "also", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "wait", "when", "while", "identifier", "in_port", "out_port"] 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 23 (array_assignment)
90 string_exp → "debug" "(" "identifier" • ")" 91 | "debug" "(" "identifier" • "$" ")" 92 | "debug" "(" "identifier" • "[" "]" "," exp "," exp ")" 93 | "debug" "(" "identifier" • "$" "[" "]" "," exp "," exp ")" ")" shift, and go to state 195 "[" shift, and go to state 196 "$" shift, and go to state 197
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" 89 string_exp → "identifier" "$" "[" • exp "]" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 198
26 array_assignment → "identifier" "$" "[" exp "]" "=" • exp 27 | "identifier" "$" "[" exp "]" "=" • string_exp 28 | "identifier" "$" "[" exp "]" "=" • "{" string_list "}" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" 87 string_exp → • "quoted_string" 88 | • "identifier" "$" 89 | • "identifier" "$" "[" exp "]" 90 | • "debug" "(" "identifier" ")" 91 | • "debug" "(" "identifier" "$" ")" 92 | • "debug" "(" "identifier" "[" "]" "," exp "," exp ")" 93 | • "debug" "(" "identifier" "$" "[" "]" "," exp "," exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "debug" shift, and go to state 137 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "{" shift, and go to state 199 "identifier" shift, and go to state 138 "quoted_string" shift, and go to state 139 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 200 string_exp go to state 201
25 array_assignment → "out_port" "[" exp "]" "=" exp • [$end, "also", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "wait", "when", "while", "identifier", "in_port", "out_port"] 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 25 (array_assignment)
9 zero_or_more_statements → zero_or_more_statements • statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 42 | "for" assignment "to" exp "step" exp zero_or_more_statements • "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 44 | "for" assignment "to" exp "step" exp zero_or_more_statements • "nexthighcpu" 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" "clear" shift, and go to state 2 "continue" shift, and go to state 3 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "next" shift, and go to state 202 "nexthighcpu" shift, and go to state 203 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "while" shift, and go to state 12 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 statement go to state 135 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
80 exp → "twoargfunc" "(" exp "," exp ")" • $default reduce using rule 80 (exp)
9 zero_or_more_statements → zero_or_more_statements • statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 49 | "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements • "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" "clear" shift, and go to state 2 "continue" shift, and go to state 3 "end" shift, and go to state 204 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "while" shift, and go to state 12 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 statement go to state 135 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
47 elseif_clause → "elseif" exp • "then" zero_or_more_statements 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "then" shift, and go to state 205 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97
48 if_statement → "if" exp "then" zero_or_more_statements elseif_group "end" "if" • $default reduce using rule 48 (if_statement)
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp 86 string_list → string_list "," exp • [")", "}", ","] "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 86 (string_list)
85 string_list → string_list "," string_exp • $default reduce using rule 85 (string_list)
24 array_assignment → "identifier" "[" exp "]" "=" "{" expression_list • "}" 56 expression_list → expression_list • "," exp "}" shift, and go to state 206 "," shift, and go to state 207
55 expression_list → exp • ["}", ","] 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 55 (expression_list)
90 string_exp → "debug" "(" "identifier" ")" • $default reduce using rule 90 (string_exp)
92 string_exp → "debug" "(" "identifier" "[" • "]" "," exp "," exp ")" "]" shift, and go to state 208
91 string_exp → "debug" "(" "identifier" "$" • ")" 93 | "debug" "(" "identifier" "$" • "[" "]" "," exp "," exp ")" ")" shift, and go to state 209 "[" shift, and go to state 210
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp 89 string_exp → "identifier" "$" "[" exp • "]" "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "]" shift, and go to state 211 "?" shift, and go to state 96 "comparison" shift, and go to state 97
28 array_assignment → "identifier" "$" "[" exp "]" "=" "{" • string_list "}" 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" 83 string_list → • string_exp 84 | • exp 85 | • string_list "," string_exp 86 | • string_list "," exp 87 string_exp → • "quoted_string" 88 | • "identifier" "$" 89 | • "identifier" "$" "[" exp "]" 90 | • "debug" "(" "identifier" ")" 91 | • "debug" "(" "identifier" "$" ")" 92 | • "debug" "(" "identifier" "[" "]" "," exp "," exp ")" 93 | • "debug" "(" "identifier" "$" "[" "]" "," exp "," exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "debug" shift, and go to state 137 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 138 "quoted_string" shift, and go to state 139 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 157 string_list go to state 212 string_exp go to state 159
26 array_assignment → "identifier" "$" "[" exp "]" "=" exp • [$end, "also", "clear", "continue", "else", "elseif", "end", "exit", "for", "if", "next", "nexthighcpu", "print", "reset", "set_channels", "wait", "when", "while", "identifier", "in_port", "out_port"] 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 26 (array_assignment)
27 array_assignment → "identifier" "$" "[" exp "]" "=" string_exp • $default reduce using rule 27 (array_assignment)
42 for_statement → "for" assignment "to" exp "step" exp zero_or_more_statements "next" • $default reduce using rule 42 (for_statement)
44 for_statement → "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" • $default reduce using rule 44 (for_statement)
49 if_statement → "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" • "if" "if" shift, and go to state 213
8 zero_or_more_statements → • %empty 9 | • zero_or_more_statements statement 47 elseif_clause → "elseif" exp "then" • zero_or_more_statements $default reduce using rule 8 (zero_or_more_statements) zero_or_more_statements go to state 214
24 array_assignment → "identifier" "[" exp "]" "=" "{" expression_list "}" • $default reduce using rule 24 (array_assignment)
56 expression_list → expression_list "," • exp 57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 215
92 string_exp → "debug" "(" "identifier" "[" "]" • "," exp "," exp ")" "," shift, and go to state 216
91 string_exp → "debug" "(" "identifier" "$" ")" • $default reduce using rule 91 (string_exp)
93 string_exp → "debug" "(" "identifier" "$" "[" • "]" "," exp "," exp ")" "]" shift, and go to state 217
89 string_exp → "identifier" "$" "[" exp "]" • $default reduce using rule 89 (string_exp)
28 array_assignment → "identifier" "$" "[" exp "]" "=" "{" string_list • "}" 85 string_list → string_list • "," string_exp 86 | string_list • "," exp "}" shift, and go to state 218 "," shift, and go to state 178
49 if_statement → "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" • $default reduce using rule 49 (if_statement)
9 zero_or_more_statements → zero_or_more_statements • statement 12 statement → • array_assignment 13 | • assignment 14 | • clear_statement 15 | • continue_statement 16 | • exit_statement 17 | • for_statement 18 | • if_statement 19 | • procedure_call 20 | • reset_statement 21 | • wait_statement 22 | • while_statement 23 array_assignment → • "identifier" "[" exp "]" "=" exp 24 | • "identifier" "[" exp "]" "=" "{" expression_list "}" 25 | • "out_port" "[" exp "]" "=" exp 26 | • "identifier" "$" "[" exp "]" "=" exp 27 | • "identifier" "$" "[" exp "]" "=" string_exp 28 | • "identifier" "$" "[" exp "]" "=" "{" string_list "}" 29 assignment → • "identifier" "=" exp 30 | • "in_port" "=" exp 31 | • "out_port" "=" exp 32 | • "identifier" "$" "=" exp 33 | • "identifier" "$" "=" string_exp 34 clear_statement → • "clear" "all" 35 continue_statement → • "continue" "for" 36 | • "continue" "while" 37 | • "continue" "all" 38 exit_statement → • "exit" "for" 39 | • "exit" "while" 40 | • "exit" "all" 41 for_statement → • "for" assignment "to" exp zero_or_more_statements "next" 42 | • "for" assignment "to" exp "step" exp zero_or_more_statements "next" 43 | • "for" assignment "to" exp zero_or_more_statements "nexthighcpu" 44 | • "for" assignment "to" exp "step" exp zero_or_more_statements "nexthighcpu" 47 elseif_clause → "elseif" exp "then" zero_or_more_statements • ["else", "elseif", "end"] 48 if_statement → • "if" exp "then" zero_or_more_statements elseif_group "end" "if" 49 | • "if" exp "then" zero_or_more_statements elseif_group "else" zero_or_more_statements "end" "if" 50 procedure_call → • "print" "(" "out_port" "," string_list ")" 51 | • "set_channels" "(" "out_port" "," exp ")" 52 reset_statement → • "reset" 53 wait_statement → • "wait" exp 54 while_statement → • "while" exp zero_or_more_statements "end" "while" "clear" shift, and go to state 2 "continue" shift, and go to state 3 "exit" shift, and go to state 4 "for" shift, and go to state 5 "if" shift, and go to state 6 "print" shift, and go to state 7 "reset" shift, and go to state 8 "set_channels" shift, and go to state 9 "wait" shift, and go to state 10 "while" shift, and go to state 12 "identifier" shift, and go to state 13 "in_port" shift, and go to state 14 "out_port" shift, and go to state 15 $default reduce using rule 47 (elseif_clause) statement go to state 135 array_assignment go to state 22 assignment go to state 23 clear_statement go to state 24 continue_statement go to state 25 exit_statement go to state 26 for_statement go to state 27 if_statement go to state 28 procedure_call go to state 29 reset_statement go to state 30 wait_statement go to state 31 while_statement go to state 32
56 expression_list → expression_list "," exp • ["}", ","] 67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "?" shift, and go to state 96 "comparison" shift, and go to state 97 $default reduce using rule 56 (expression_list)
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" 92 string_exp → "debug" "(" "identifier" "[" "]" "," • exp "," exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 219
93 string_exp → "debug" "(" "identifier" "$" "[" "]" • "," exp "," exp ")" "," shift, and go to state 220
28 array_assignment → "identifier" "$" "[" exp "]" "=" "{" string_list "}" • $default reduce using rule 28 (array_assignment)
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp 92 string_exp → "debug" "(" "identifier" "[" "]" "," exp • "," exp ")" "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "," shift, and go to state 221 "?" shift, and go to state 96 "comparison" shift, and go to state 97
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" 93 string_exp → "debug" "(" "identifier" "$" "[" "]" "," • exp "," exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 222
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" 92 string_exp → "debug" "(" "identifier" "[" "]" "," exp "," • exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 223
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp 93 string_exp → "debug" "(" "identifier" "$" "[" "]" "," exp • "," exp ")" "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 "," shift, and go to state 224 "?" shift, and go to state 96 "comparison" shift, and go to state 97
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp 92 string_exp → "debug" "(" "identifier" "[" "]" "," exp "," exp • ")" "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 ")" shift, and go to state 225 "?" shift, and go to state 96 "comparison" shift, and go to state 97
57 exp → • "number" 58 | • "note" 59 | • "-" "number" 60 | • "not" exp 61 | • "in_port" 62 | • "in_port" "[" exp "]" 63 | • "out_port" 64 | • "out_port" "[" exp "]" 65 | • "identifier" 66 | • "identifier" "[" exp "]" 67 | • exp "+" exp 68 | • exp "-" exp 69 | • exp "*" exp 70 | • exp "/" exp 71 | • exp "comparison" exp 72 | • exp "and" exp 73 | • exp "or" exp 74 | • "zeroargfunc" "(" ")" 75 | • "channels" "(" "in_port" ")" 76 | • "connected" "(" "in_port" ")" 77 | • "connected" "(" "out_port" ")" 78 | • "trigger" "(" "in_port" ")" 79 | • "oneargfunc" "(" exp ")" 80 | • "twoargfunc" "(" exp "," exp ")" 81 | • exp "?" exp ":" exp 82 | • "(" exp ")" 93 string_exp → "debug" "(" "identifier" "$" "[" "]" "," exp "," • exp ")" "channels" shift, and go to state 44 "connected" shift, and go to state 45 "not" shift, and go to state 46 "trigger" shift, and go to state 47 "-" shift, and go to state 48 "(" shift, and go to state 49 "identifier" shift, and go to state 50 "number" shift, and go to state 51 "note" shift, and go to state 52 "in_port" shift, and go to state 53 "out_port" shift, and go to state 54 "zeroargfunc" shift, and go to state 55 "oneargfunc" shift, and go to state 56 "twoargfunc" shift, and go to state 57 exp go to state 226
92 string_exp → "debug" "(" "identifier" "[" "]" "," exp "," exp ")" • $default reduce using rule 92 (string_exp)
67 exp → exp • "+" exp 68 | exp • "-" exp 69 | exp • "*" exp 70 | exp • "/" exp 71 | exp • "comparison" exp 72 | exp • "and" exp 73 | exp • "or" exp 81 | exp • "?" exp ":" exp 93 string_exp → "debug" "(" "identifier" "$" "[" "]" "," exp "," exp • ")" "and" shift, and go to state 89 "or" shift, and go to state 90 "-" shift, and go to state 92 "+" shift, and go to state 93 "*" shift, and go to state 94 "/" shift, and go to state 95 ")" shift, and go to state 227 "?" shift, and go to state 96 "comparison" shift, and go to state 97
93 string_exp → "debug" "(" "identifier" "$" "[" "]" "," exp "," exp ")" • $default reduce using rule 93 (string_exp)