diff --git a/final_lang/exec.py b/final_lang/exec.py index c610d40..a5d4117 100644 --- a/final_lang/exec.py +++ b/final_lang/exec.py @@ -4,6 +4,7 @@ import sys normalOperators = ['+', '-', '*', '/', '>', '<', '<=', '>=', '==', '/=', '.and.', '.or.'] +programStack = [] class VarTable: def __init__(self): @@ -62,6 +63,9 @@ def splitQuad(string): skip = False tokens = string.split() for token in tokens: + if skip: + skip = False + continue if isStringOpen: buffer += ' ' buffer += token @@ -70,6 +74,10 @@ def splitQuad(string): isStringOpen = False else: if token[0] == '\'': + if token == "'": + result.append("' '") + skip = True + continue if token[len(token) - 1] == '\'': result.append(token) else: @@ -165,6 +173,14 @@ def execute(quads): elif tokens[0] == 'goto': currentQuad = int(tokens[1]) continue + elif tokens[0] == 'call': + programStack.append(currentQuad + 1) + currentQuad = int(tokens[1]) + continue + elif tokens[0] == 'goback': + newQuad = programStack.pop() + currentQuad = newQuad + continue currentQuad += 1 diff --git a/final_lang/fort.py b/final_lang/fort.py index f984602..9a2be7d 100644 --- a/final_lang/fort.py +++ b/final_lang/fort.py @@ -46,12 +46,11 @@ globalIndex2 = 0 # Adds a symbol to the symbols table. -def addSymbol(name, symbolType): +def addSymbol(name, symbolType, value = 0): global currentIndex - initialValue = 0 if symbolType == 'integer' else 0.0 symbols[name] = { 'type': symbolType, - 'value': initialValue, + 'value': value, 'direction': currentIndex, 'dimension1': globalDimension1, 'dimension2': globalDimension2, @@ -223,7 +222,7 @@ lexer = lex.lex() def p_programa(p): ''' - programa : program id V F B end program + programa : program action_37 id V F action_38 B end program ''' print('+++ Valid program') @@ -267,7 +266,7 @@ def p_Dim(p): def p_F(p): ''' - F : F subroutine id B end subroutine + F : F subroutine id action_39 B end subroutine action_40 | ''' @@ -281,8 +280,8 @@ def p_B(p): def p_S(p): ''' - S : Dimensional action_7 equals EA action_8 - | id parens + S : Dimensional equals EA action_8 + | id parens action_41 | read RDimensional | print RDimOrString | if action_16 Relif ElseOrEmpty end if action_20 @@ -290,7 +289,6 @@ def p_S(p): | do then action_21 B action_22 end do | swap Dimensional coma Dimensional | exit action_23 - | id openParen closedParen ''' # Adjust the action to support matrices @@ -298,7 +296,7 @@ def p_S(p): def p_Dimensional(p): ''' - Dimensional : id DimensionsOrEmpty + Dimensional : id DimensionsOrEmpty action_1 ''' p[0] = p[1] @@ -319,8 +317,8 @@ def p_ComaEAOrEmpty(p): def p_RDimensional(p): ''' - RDimensional : Dimensional action_1 action_36 - | RDimensional coma Dimensional action_1 action_36 + RDimensional : Dimensional action_36 + | RDimensional coma Dimensional action_36 ''' @@ -333,7 +331,7 @@ def p_RDimOrString(p): def p_DimOrString(p): ''' - DimOrString : Dimensional action_1 action_33 + DimOrString : Dimensional action_33 | string action_34 | endline action_34 ''' @@ -421,7 +419,7 @@ def p_Equality(p): def p_EItem(p): ''' - EItem : Dimensional action_1 + EItem : Dimensional | int action_2 | rea action_2_rea ''' @@ -456,13 +454,13 @@ def p_action_1(p): global quadrupletIndex global resultQuadruplets global avail - if p[-1] not in symbols: - raise Exception(f'The variable {p[-1]} was not declared') - direction = symbols[p[-1]]['direction'] - dimension1 = symbols[p[-1]]['dimension1'] - dimension2 = symbols[p[-1]]['dimension2'] + if p[-2] not in symbols: + raise Exception(f'The variable {p[-2]} was not declared') + direction = symbols[p[-2]]['direction'] + dimension1 = symbols[p[-2]]['dimension1'] + dimension2 = symbols[p[-2]]['dimension2'] if dimension2 is not 0: - indirectPointer = symbols[p[-1]]['indirectPointer'] + indirectPointer = symbols[p[-2]]['indirectPointer'] if isDirection(globalIndex1) or isDirection(globalIndex2): resultQuadruplets.append( f'* {globalIndex1} {dimension1} {indirectPointer}\n') @@ -477,8 +475,10 @@ def p_action_1(p): else: direction += globalIndex2 + (globalIndex1 * dimension1) operandsStack.append(f'${direction}') + globalIndex1 = 0 + globalIndex2 = 0 elif dimension1 is not 0: - indirectPointer = symbols[p[-1]]['indirectPointer'] + indirectPointer = symbols[p[-2]]['indirectPointer'] if isDirection(globalIndex1): resultQuadruplets.append( f'+ {direction} {globalIndex1} {indirectPointer}\n') @@ -487,13 +487,12 @@ def p_action_1(p): else: direction += globalIndex1 operandsStack.append(f'${direction}') + globalIndex1 = 0 else: operandsStack.append(f'${direction}') - sType = symbols[p[-1]]['type'] + sType = symbols[p[-2]]['type'] # operandsStack.append(f'${direction}') typesStack.append(sType) - globalIndex1 = 0 - globalIndex2 = 0 def p_action_2(p): @@ -564,53 +563,6 @@ def p_action_6(p): avail = [operand1] + avail -def p_action_7(p): - "action_7 :" - global globalIndex1 - global globalIndex2 - global quadrupletIndex - global resultQuadruplets - global avail - if p[-1] not in symbols: - raise Exception(f'The variable {p[-1]} was not declared') - direction = symbols[p[-1]]['direction'] - dimension1 = symbols[p[-1]]['dimension1'] - dimension2 = symbols[p[-1]]['dimension2'] - if dimension2 is not 0: - indirectPointer = symbols[p[-1]]['indirectPointer'] - if isDirection(globalIndex1) or isDirection(globalIndex2): - resultQuadruplets.append( - f'* {globalIndex1} {dimension1} {indirectPointer}\n') - quadrupletIndex += 1 - resultQuadruplets.append( - f'+ {globalIndex2} {indirectPointer} {indirectPointer}\n') - quadrupletIndex += 1 - resultQuadruplets.append( - f'+ {direction} {indirectPointer} {indirectPointer}\n') - quadrupletIndex += 1 - operandsStack.append(indirectPointer.replace('$', '*')) - else: - direction += globalIndex2 + (globalIndex1 * dimension1) - operandsStack.append(f'${direction}') - elif dimension1 is not 0: - indirectPointer = symbols[p[-1]]['indirectPointer'] - if isDirection(globalIndex1): - resultQuadruplets.append( - f'+ {direction} {globalIndex1} {indirectPointer}\n') - quadrupletIndex += 1 - operandsStack.append(indirectPointer.replace('$', '*')) - else: - direction += globalIndex1 - operandsStack.append(f'${direction}') - else: - operandsStack.append(f'${direction}') - sType = symbols[p[-1]]['type'] - # operandsStack.append(f'${direction}') - typesStack.append(sType) - globalIndex1 = 0 - globalIndex2 = 0 - - def p_action_8(p): "action_8 :" global quadrupletIndex @@ -941,28 +893,61 @@ def p_action_34(p): quadrupletIndex += 1 -# def p_action_35(p): -# "action_35 :" -# global quadrupletIndex -# resultQuadruplets.append('print endline\n') -# quadrupletIndex += 1 - - def p_action_36(p): "action_36 :" global quadrupletIndex operand1 = operandsStack.pop() - type1 = typesStack.pop() + typesStack.pop() resultQuadruplets.append(f'read {operand1}\n') quadrupletIndex += 1 +def p_action_37(p): + "action_37 :" + global quadrupletIndex + resultQuadruplets.append('goto _\n') + quadrupletIndex += 1 + + +def p_action_38(p): + "action_38 :" + global quadrupletIndex + fillGoto(1, quadrupletIndex) + + +def p_action_39(p): + "action_39 :" + global quadrupletIndex + subroutineId = p[-1] + addSymbol(subroutineId, 'method', quadrupletIndex) + + +def p_action_40(p): + "action_40 :" + global quadrupletIndex + resultQuadruplets.append('goback\n') + quadrupletIndex += 1 + + +def p_action_41(p): + "action_41 :" + global quadrupletIndex + if p[-2] not in symbols: + raise Exception(f'The variable {p[-2]} was not declared') + if symbols[p[-2]]['type'] is not 'method': + raise Exception(f'{p[-2]} is not a function') + value = symbols[p[-2]]['value'] + resultQuadruplets.append(f'call {value}\n') + quadrupletIndex += 1 + + + + def p_action_setDim1(p): "action_setDim1 :" global globalIndex1 operand1 = operandsStack.pop() type1 = typesStack.pop() - print(f'Tipo del index {type1}') if (type1 == 'integer'): globalIndex1 = operand1 else: @@ -974,7 +959,6 @@ def p_action_setDim2(p): global globalIndex2 operand1 = operandsStack.pop() type1 = typesStack.pop() - print(f'Tipo del index {type1}') if (type1 == 'integer'): globalIndex2 = operand1 else: diff --git a/final_lang/parser.out b/final_lang/parser.out index 8075a04..9f6080c 100644 --- a/final_lang/parser.out +++ b/final_lang/parser.out @@ -3,7 +3,7 @@ Created by PLY version 3.11 (http://www.dabeaz.com/ply) Grammar Rule 0 S' -> programa -Rule 1 programa -> program id V F B end program +Rule 1 programa -> program action_37 id V F action_38 B end program Rule 2 V -> V Tipo Dim doubleColon Rid action_addSymbols action_32 Rule 3 V -> Rule 4 Rid -> id @@ -13,12 +13,12 @@ Rule 7 Tipo -> real Rule 8 Dim -> openBra int action_30 closedBra Rule 9 Dim -> openBra int action_30 closedBra openBra int action_31 closedBra Rule 10 Dim -> -Rule 11 F -> F subroutine id B end subroutine +Rule 11 F -> F subroutine id action_39 B end subroutine action_40 Rule 12 F -> Rule 13 B -> B S Rule 14 B -> -Rule 15 S -> Dimensional action_7 equals EA action_8 -Rule 16 S -> id parens +Rule 15 S -> Dimensional equals EA action_8 +Rule 16 S -> id parens action_41 Rule 17 S -> read RDimensional Rule 18 S -> print RDimOrString Rule 19 S -> if action_16 Relif ElseOrEmpty end if action_20 @@ -26,175 +26,178 @@ Rule 20 S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty Rule 21 S -> do then action_21 B action_22 end do Rule 22 S -> swap Dimensional coma Dimensional Rule 23 S -> exit action_23 -Rule 24 S -> id openParen closedParen -Rule 25 Dimensional -> id DimensionsOrEmpty -Rule 26 DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen -Rule 27 DimensionsOrEmpty -> -Rule 28 ComaEAOrEmpty -> coma EA action_setDim2 -Rule 29 ComaEAOrEmpty -> -Rule 30 RDimensional -> Dimensional action_1 action_36 -Rule 31 RDimensional -> RDimensional coma Dimensional action_1 action_36 -Rule 32 RDimOrString -> DimOrString -Rule 33 RDimOrString -> RDimOrString coma DimOrString -Rule 34 DimOrString -> Dimensional action_1 action_33 -Rule 35 DimOrString -> string action_34 -Rule 36 DimOrString -> endline action_34 -Rule 37 Relif -> openParen EL closedParen action_17 then B -Rule 38 Relif -> Relif elif action_18 openParen EL closedParen action_17 then B -Rule 39 ElseOrEmpty -> else action_19 B -Rule 40 ElseOrEmpty -> -Rule 41 IntOrEmpty -> coma int action_28 -Rule 42 IntOrEmpty -> action_27 -Rule 43 EA -> MultDiv -Rule 44 EA -> EA SumOrSub action_3 MultDiv action_4 -Rule 45 SumOrSub -> plus -Rule 46 SumOrSub -> minus -Rule 47 MultDiv -> EAParens -Rule 48 MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 -Rule 49 MDSymbols -> mul -Rule 50 MDSymbols -> div -Rule 51 EAParens -> EItem -Rule 52 EAParens -> openParen EA closedParen -Rule 53 EL -> AND -Rule 54 EL -> EL or action_10 AND action_9 -Rule 55 AND -> Equality -Rule 56 AND -> AND and action_12 Equality action_11 -Rule 57 Equality -> EItem EQSymbols action_13 EItem action_14 -Rule 58 Equality -> openParen EL closedParen -Rule 59 Equality -> not EL action_15 -Rule 60 EItem -> Dimensional action_1 -Rule 61 EItem -> int action_2 -Rule 62 EItem -> rea action_2_rea -Rule 63 EQSymbols -> less -Rule 64 EQSymbols -> more -Rule 65 EQSymbols -> doubleEquals -Rule 66 EQSymbols -> notEquals -Rule 67 EQSymbols -> lessEquals -Rule 68 EQSymbols -> moreEquals -Rule 69 action_addSymbols -> -Rule 70 action_1 -> -Rule 71 action_2 -> -Rule 72 action_2_rea -> -Rule 73 action_3 -> -Rule 74 action_4 -> -Rule 75 action_5 -> -Rule 76 action_6 -> -Rule 77 action_7 -> -Rule 78 action_8 -> -Rule 79 action_9 -> -Rule 80 action_10 -> -Rule 81 action_11 -> -Rule 82 action_12 -> -Rule 83 action_13 -> -Rule 84 action_14 -> -Rule 85 action_15 -> -Rule 86 action_16 -> -Rule 87 action_17 -> -Rule 88 action_18 -> -Rule 89 action_19 -> -Rule 90 action_20 -> -Rule 91 action_21 -> -Rule 92 action_22 -> -Rule 93 action_23 -> -Rule 94 action_24 -> -Rule 95 action_25 -> -Rule 96 action_26 -> -Rule 97 action_27 -> -Rule 98 action_28 -> -Rule 99 action_29 -> -Rule 100 action_30 -> -Rule 101 action_31 -> -Rule 102 action_32 -> -Rule 103 action_33 -> -Rule 104 action_34 -> -Rule 105 action_36 -> -Rule 106 action_setDim1 -> -Rule 107 action_setDim2 -> +Rule 24 Dimensional -> id DimensionsOrEmpty action_1 +Rule 25 DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen +Rule 26 DimensionsOrEmpty -> +Rule 27 ComaEAOrEmpty -> coma EA action_setDim2 +Rule 28 ComaEAOrEmpty -> +Rule 29 RDimensional -> Dimensional action_36 +Rule 30 RDimensional -> RDimensional coma Dimensional action_36 +Rule 31 RDimOrString -> DimOrString +Rule 32 RDimOrString -> RDimOrString coma DimOrString +Rule 33 DimOrString -> Dimensional action_33 +Rule 34 DimOrString -> string action_34 +Rule 35 DimOrString -> endline action_34 +Rule 36 Relif -> openParen EL closedParen action_17 then B +Rule 37 Relif -> Relif elif action_18 openParen EL closedParen action_17 then B +Rule 38 ElseOrEmpty -> else action_19 B +Rule 39 ElseOrEmpty -> +Rule 40 IntOrEmpty -> coma int action_28 +Rule 41 IntOrEmpty -> action_27 +Rule 42 EA -> MultDiv +Rule 43 EA -> EA SumOrSub action_3 MultDiv action_4 +Rule 44 SumOrSub -> plus +Rule 45 SumOrSub -> minus +Rule 46 MultDiv -> EAParens +Rule 47 MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 +Rule 48 MDSymbols -> mul +Rule 49 MDSymbols -> div +Rule 50 EAParens -> EItem +Rule 51 EAParens -> openParen EA closedParen +Rule 52 EL -> AND +Rule 53 EL -> EL or action_10 AND action_9 +Rule 54 AND -> Equality +Rule 55 AND -> AND and action_12 Equality action_11 +Rule 56 Equality -> EItem EQSymbols action_13 EItem action_14 +Rule 57 Equality -> openParen EL closedParen +Rule 58 Equality -> not EL action_15 +Rule 59 EItem -> Dimensional +Rule 60 EItem -> int action_2 +Rule 61 EItem -> rea action_2_rea +Rule 62 EQSymbols -> less +Rule 63 EQSymbols -> more +Rule 64 EQSymbols -> doubleEquals +Rule 65 EQSymbols -> notEquals +Rule 66 EQSymbols -> lessEquals +Rule 67 EQSymbols -> moreEquals +Rule 68 action_addSymbols -> +Rule 69 action_1 -> +Rule 70 action_2 -> +Rule 71 action_2_rea -> +Rule 72 action_3 -> +Rule 73 action_4 -> +Rule 74 action_5 -> +Rule 75 action_6 -> +Rule 76 action_8 -> +Rule 77 action_9 -> +Rule 78 action_10 -> +Rule 79 action_11 -> +Rule 80 action_12 -> +Rule 81 action_13 -> +Rule 82 action_14 -> +Rule 83 action_15 -> +Rule 84 action_16 -> +Rule 85 action_17 -> +Rule 86 action_18 -> +Rule 87 action_19 -> +Rule 88 action_20 -> +Rule 89 action_21 -> +Rule 90 action_22 -> +Rule 91 action_23 -> +Rule 92 action_24 -> +Rule 93 action_25 -> +Rule 94 action_26 -> +Rule 95 action_27 -> +Rule 96 action_28 -> +Rule 97 action_29 -> +Rule 98 action_30 -> +Rule 99 action_31 -> +Rule 100 action_32 -> +Rule 101 action_33 -> +Rule 102 action_34 -> +Rule 103 action_36 -> +Rule 104 action_37 -> +Rule 105 action_38 -> +Rule 106 action_39 -> +Rule 107 action_40 -> +Rule 108 action_41 -> +Rule 109 action_setDim1 -> +Rule 110 action_setDim2 -> Terminals, with rules where they appear -and : 56 +and : 55 closedBra : 8 9 9 -closedParen : 24 26 37 38 52 58 -coma : 5 20 22 28 31 33 41 -div : 50 +closedParen : 25 36 37 51 57 +coma : 5 20 22 27 30 32 40 +div : 49 do : 20 20 21 21 doubleColon : 2 -doubleEquals : 65 -elif : 38 -else : 39 +doubleEquals : 64 +elif : 37 +else : 38 end : 1 11 19 20 21 -endline : 36 +endline : 35 equals : 15 20 error : exit : 23 -id : 1 4 5 11 16 20 24 25 +id : 1 4 5 11 16 20 24 if : 19 19 -int : 8 9 9 41 61 +int : 8 9 9 40 60 integer : 6 -less : 63 -lessEquals : 67 -minus : 46 -more : 64 -moreEquals : 68 -mul : 49 -not : 59 -notEquals : 66 +less : 62 +lessEquals : 66 +minus : 45 +more : 63 +moreEquals : 67 +mul : 48 +not : 58 +notEquals : 65 openBra : 8 9 9 -openParen : 24 26 37 38 52 58 -or : 54 +openParen : 25 36 37 51 57 +or : 53 parens : 16 -plus : 45 +plus : 44 print : 18 program : 1 1 -rea : 62 +rea : 61 read : 17 real : 7 -string : 35 +string : 34 subroutine : 11 11 swap : 22 -then : 20 21 37 38 +then : 20 21 36 37 Nonterminals, with rules where they appear -AND : 53 54 56 -B : 1 11 13 20 21 37 38 39 -ComaEAOrEmpty : 26 +AND : 52 53 55 +B : 1 11 13 20 21 36 37 38 +ComaEAOrEmpty : 25 Dim : 2 -DimOrString : 32 33 -Dimensional : 15 22 22 30 31 34 60 -DimensionsOrEmpty : 25 -EA : 15 20 20 26 28 44 52 -EAParens : 47 48 -EItem : 51 57 57 -EL : 37 38 54 58 59 -EQSymbols : 57 +DimOrString : 31 32 +Dimensional : 15 22 22 29 30 33 59 +DimensionsOrEmpty : 24 +EA : 15 20 20 25 27 43 51 +EAParens : 46 47 +EItem : 50 56 56 +EL : 36 37 53 57 58 +EQSymbols : 56 ElseOrEmpty : 19 -Equality : 55 56 +Equality : 54 55 F : 1 11 IntOrEmpty : 20 -MDSymbols : 48 -MultDiv : 43 44 48 -RDimOrString : 18 33 -RDimensional : 17 31 -Relif : 19 38 +MDSymbols : 47 +MultDiv : 42 43 47 +RDimOrString : 18 32 +RDimensional : 17 30 +Relif : 19 37 Rid : 2 5 S : 13 -SumOrSub : 44 +SumOrSub : 43 Tipo : 2 V : 1 2 -action_1 : 30 31 34 60 -action_10 : 54 -action_11 : 56 -action_12 : 56 -action_13 : 57 -action_14 : 57 -action_15 : 59 +action_1 : 24 +action_10 : 53 +action_11 : 55 +action_12 : 55 +action_13 : 56 +action_14 : 56 +action_15 : 58 action_16 : 19 -action_17 : 37 38 -action_18 : 38 -action_19 : 39 -action_2 : 61 +action_17 : 36 37 +action_18 : 37 +action_19 : 38 +action_2 : 60 action_20 : 19 action_21 : 21 action_22 : 21 @@ -202,26 +205,30 @@ action_23 : 23 action_24 : 20 action_25 : 20 action_26 : 20 -action_27 : 42 -action_28 : 41 +action_27 : 41 +action_28 : 40 action_29 : 20 -action_2_rea : 62 -action_3 : 44 +action_2_rea : 61 +action_3 : 43 action_30 : 8 9 action_31 : 9 action_32 : 2 -action_33 : 34 -action_34 : 35 36 -action_36 : 30 31 -action_4 : 44 -action_5 : 48 -action_6 : 48 -action_7 : 15 +action_33 : 33 +action_34 : 34 35 +action_36 : 29 30 +action_37 : 1 +action_38 : 1 +action_39 : 11 +action_4 : 43 +action_40 : 11 +action_41 : 16 +action_5 : 47 +action_6 : 47 action_8 : 15 -action_9 : 54 +action_9 : 53 action_addSymbols : 2 -action_setDim1 : 26 -action_setDim2 : 28 +action_setDim1 : 25 +action_setDim2 : 27 programa : 0 Parsing method: LALR @@ -229,7 +236,7 @@ Parsing method: LALR state 0 (0) S' -> . programa - (1) programa -> . program id V F B end program + (1) programa -> . program action_37 id V F action_38 B end program program shift and go to state 2 @@ -243,14 +250,23 @@ state 1 state 2 - (1) programa -> program . id V F B end program + (1) programa -> program . action_37 id V F action_38 B end program + (104) action_37 -> . - id shift and go to state 3 + id reduce using rule 104 (action_37 -> .) + action_37 shift and go to state 3 state 3 - (1) programa -> program id . V F B end program + (1) programa -> program action_37 . id V F action_38 B end program + + id shift and go to state 4 + + +state 4 + + (1) programa -> program action_37 id . V F action_38 B end program (2) V -> . V Tipo Dim doubleColon Rid action_addSymbols action_32 (3) V -> . @@ -266,13 +282,13 @@ state 3 swap reduce using rule 3 (V -> .) exit reduce using rule 3 (V -> .) - V shift and go to state 4 + V shift and go to state 5 -state 4 +state 5 - (1) programa -> program id V . F B end program + (1) programa -> program action_37 id V . F action_38 B end program (2) V -> V . Tipo Dim doubleColon Rid action_addSymbols action_32 - (11) F -> . F subroutine id B end subroutine + (11) F -> . F subroutine id action_39 B end subroutine action_40 (12) F -> . (6) Tipo -> . integer (7) Tipo -> . real @@ -286,20 +302,64 @@ state 4 do reduce using rule 12 (F -> .) swap reduce using rule 12 (F -> .) exit reduce using rule 12 (F -> .) - integer shift and go to state 7 - real shift and go to state 8 + integer shift and go to state 8 + real shift and go to state 9 - F shift and go to state 5 - Tipo shift and go to state 6 + F shift and go to state 6 + Tipo shift and go to state 7 -state 5 +state 6 - (1) programa -> program id V F . B end program - (11) F -> F . subroutine id B end subroutine + (1) programa -> program action_37 id V F . action_38 B end program + (11) F -> F . subroutine id action_39 B end subroutine action_40 + (105) action_38 -> . + + subroutine shift and go to state 11 + end reduce using rule 105 (action_38 -> .) + id reduce using rule 105 (action_38 -> .) + read reduce using rule 105 (action_38 -> .) + print reduce using rule 105 (action_38 -> .) + if reduce using rule 105 (action_38 -> .) + do reduce using rule 105 (action_38 -> .) + swap reduce using rule 105 (action_38 -> .) + exit reduce using rule 105 (action_38 -> .) + + action_38 shift and go to state 10 + +state 7 + + (2) V -> V Tipo . Dim doubleColon Rid action_addSymbols action_32 + (8) Dim -> . openBra int action_30 closedBra + (9) Dim -> . openBra int action_30 closedBra openBra int action_31 closedBra + (10) Dim -> . + + openBra shift and go to state 13 + doubleColon reduce using rule 10 (Dim -> .) + + Dim shift and go to state 12 + +state 8 + + (6) Tipo -> integer . + + openBra reduce using rule 6 (Tipo -> integer .) + doubleColon reduce using rule 6 (Tipo -> integer .) + + +state 9 + + (7) Tipo -> real . + + openBra reduce using rule 7 (Tipo -> real .) + doubleColon reduce using rule 7 (Tipo -> real .) + + +state 10 + + (1) programa -> program action_37 id V F action_38 . B end program (13) B -> . B S (14) B -> . - subroutine shift and go to state 10 end reduce using rule 14 (B -> .) id reduce using rule 14 (B -> .) read reduce using rule 14 (B -> .) @@ -309,42 +369,36 @@ state 5 swap reduce using rule 14 (B -> .) exit reduce using rule 14 (B -> .) - B shift and go to state 9 + B shift and go to state 14 -state 6 +state 11 - (2) V -> V Tipo . Dim doubleColon Rid action_addSymbols action_32 - (8) Dim -> . openBra int action_30 closedBra - (9) Dim -> . openBra int action_30 closedBra openBra int action_31 closedBra - (10) Dim -> . + (11) F -> F subroutine . id action_39 B end subroutine action_40 - openBra shift and go to state 12 - doubleColon reduce using rule 10 (Dim -> .) - - Dim shift and go to state 11 - -state 7 - - (6) Tipo -> integer . - - openBra reduce using rule 6 (Tipo -> integer .) - doubleColon reduce using rule 6 (Tipo -> integer .) + id shift and go to state 15 -state 8 +state 12 - (7) Tipo -> real . + (2) V -> V Tipo Dim . doubleColon Rid action_addSymbols action_32 - openBra reduce using rule 7 (Tipo -> real .) - doubleColon reduce using rule 7 (Tipo -> real .) + doubleColon shift and go to state 16 -state 9 +state 13 - (1) programa -> program id V F B . end program + (8) Dim -> openBra . int action_30 closedBra + (9) Dim -> openBra . int action_30 closedBra openBra int action_31 closedBra + + int shift and go to state 17 + + +state 14 + + (1) programa -> program action_37 id V F action_38 B . end program (13) B -> B . S - (15) S -> . Dimensional action_7 equals EA action_8 - (16) S -> . id parens + (15) S -> . Dimensional equals EA action_8 + (16) S -> . id parens action_41 (17) S -> . read RDimensional (18) S -> . print RDimOrString (19) S -> . if action_16 Relif ElseOrEmpty end if action_20 @@ -352,66 +406,78 @@ state 9 (21) S -> . do then action_21 B action_22 end do (22) S -> . swap Dimensional coma Dimensional (23) S -> . exit action_23 - (24) S -> . id openParen closedParen - (25) Dimensional -> . id DimensionsOrEmpty + (24) Dimensional -> . id DimensionsOrEmpty action_1 - end shift and go to state 14 - id shift and go to state 13 - read shift and go to state 17 - print shift and go to state 18 - if shift and go to state 19 - do shift and go to state 20 - swap shift and go to state 21 - exit shift and go to state 22 - - S shift and go to state 15 - Dimensional shift and go to state 16 - -state 10 - - (11) F -> F subroutine . id B end subroutine - - id shift and go to state 23 - - -state 11 - - (2) V -> V Tipo Dim . doubleColon Rid action_addSymbols action_32 - - doubleColon shift and go to state 24 - - -state 12 - - (8) Dim -> openBra . int action_30 closedBra - (9) Dim -> openBra . int action_30 closedBra openBra int action_31 closedBra - - int shift and go to state 25 - - -state 13 - - (16) S -> id . parens - (24) S -> id . openParen closedParen - (25) Dimensional -> id . DimensionsOrEmpty - (26) DimensionsOrEmpty -> . openParen EA action_setDim1 ComaEAOrEmpty closedParen - (27) DimensionsOrEmpty -> . - - parens shift and go to state 26 - openParen shift and go to state 27 - equals reduce using rule 27 (DimensionsOrEmpty -> .) - - DimensionsOrEmpty shift and go to state 28 - -state 14 - - (1) programa -> program id V F B end . program - - program shift and go to state 29 + end shift and go to state 19 + id shift and go to state 18 + read shift and go to state 22 + print shift and go to state 23 + if shift and go to state 24 + do shift and go to state 25 + swap shift and go to state 26 + exit shift and go to state 27 + S shift and go to state 20 + Dimensional shift and go to state 21 state 15 + (11) F -> F subroutine id . action_39 B end subroutine action_40 + (106) action_39 -> . + + end reduce using rule 106 (action_39 -> .) + id reduce using rule 106 (action_39 -> .) + read reduce using rule 106 (action_39 -> .) + print reduce using rule 106 (action_39 -> .) + if reduce using rule 106 (action_39 -> .) + do reduce using rule 106 (action_39 -> .) + swap reduce using rule 106 (action_39 -> .) + exit reduce using rule 106 (action_39 -> .) + + action_39 shift and go to state 28 + +state 16 + + (2) V -> V Tipo Dim doubleColon . Rid action_addSymbols action_32 + (4) Rid -> . id + (5) Rid -> . Rid coma id + + id shift and go to state 30 + + Rid shift and go to state 29 + +state 17 + + (8) Dim -> openBra int . action_30 closedBra + (9) Dim -> openBra int . action_30 closedBra openBra int action_31 closedBra + (98) action_30 -> . + + closedBra reduce using rule 98 (action_30 -> .) + + action_30 shift and go to state 31 + +state 18 + + (16) S -> id . parens action_41 + (24) Dimensional -> id . DimensionsOrEmpty action_1 + (25) DimensionsOrEmpty -> . openParen EA action_setDim1 ComaEAOrEmpty closedParen + (26) DimensionsOrEmpty -> . + + parens shift and go to state 32 + openParen shift and go to state 34 + equals reduce using rule 26 (DimensionsOrEmpty -> .) + + DimensionsOrEmpty shift and go to state 33 + +state 19 + + (1) programa -> program action_37 id V F action_38 B end . program + + program shift and go to state 35 + + +state 20 + (13) B -> B S . end reduce using rule 13 (B -> B S .) @@ -426,93 +492,91 @@ state 15 else reduce using rule 13 (B -> B S .) -state 16 +state 21 - (15) S -> Dimensional . action_7 equals EA action_8 - (77) action_7 -> . + (15) S -> Dimensional . equals EA action_8 - equals reduce using rule 77 (action_7 -> .) + equals shift and go to state 36 - action_7 shift and go to state 30 -state 17 +state 22 (17) S -> read . RDimensional - (30) RDimensional -> . Dimensional action_1 action_36 - (31) RDimensional -> . RDimensional coma Dimensional action_1 action_36 - (25) Dimensional -> . id DimensionsOrEmpty + (29) RDimensional -> . Dimensional action_36 + (30) RDimensional -> . RDimensional coma Dimensional action_36 + (24) Dimensional -> . id DimensionsOrEmpty action_1 - id shift and go to state 33 + id shift and go to state 39 - RDimensional shift and go to state 31 - Dimensional shift and go to state 32 + RDimensional shift and go to state 37 + Dimensional shift and go to state 38 -state 18 +state 23 (18) S -> print . RDimOrString - (32) RDimOrString -> . DimOrString - (33) RDimOrString -> . RDimOrString coma DimOrString - (34) DimOrString -> . Dimensional action_1 action_33 - (35) DimOrString -> . string action_34 - (36) DimOrString -> . endline action_34 - (25) Dimensional -> . id DimensionsOrEmpty + (31) RDimOrString -> . DimOrString + (32) RDimOrString -> . RDimOrString coma DimOrString + (33) DimOrString -> . Dimensional action_33 + (34) DimOrString -> . string action_34 + (35) DimOrString -> . endline action_34 + (24) Dimensional -> . id DimensionsOrEmpty action_1 - string shift and go to state 37 - endline shift and go to state 38 - id shift and go to state 33 + string shift and go to state 43 + endline shift and go to state 44 + id shift and go to state 39 - RDimOrString shift and go to state 34 - DimOrString shift and go to state 35 - Dimensional shift and go to state 36 + RDimOrString shift and go to state 40 + DimOrString shift and go to state 41 + Dimensional shift and go to state 42 -state 19 +state 24 (19) S -> if . action_16 Relif ElseOrEmpty end if action_20 - (86) action_16 -> . + (84) action_16 -> . - openParen reduce using rule 86 (action_16 -> .) + openParen reduce using rule 84 (action_16 -> .) - action_16 shift and go to state 39 + action_16 shift and go to state 45 -state 20 +state 25 (20) S -> do . id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do (21) S -> do . then action_21 B action_22 end do - id shift and go to state 40 - then shift and go to state 41 + id shift and go to state 46 + then shift and go to state 47 -state 21 +state 26 (22) S -> swap . Dimensional coma Dimensional - (25) Dimensional -> . id DimensionsOrEmpty + (24) Dimensional -> . id DimensionsOrEmpty action_1 - id shift and go to state 33 + id shift and go to state 39 - Dimensional shift and go to state 42 + Dimensional shift and go to state 48 -state 22 +state 27 (23) S -> exit . action_23 - (93) action_23 -> . + (91) action_23 -> . - end reduce using rule 93 (action_23 -> .) - id reduce using rule 93 (action_23 -> .) - read reduce using rule 93 (action_23 -> .) - print reduce using rule 93 (action_23 -> .) - if reduce using rule 93 (action_23 -> .) - do reduce using rule 93 (action_23 -> .) - swap reduce using rule 93 (action_23 -> .) - exit reduce using rule 93 (action_23 -> .) - elif reduce using rule 93 (action_23 -> .) - else reduce using rule 93 (action_23 -> .) + end reduce using rule 91 (action_23 -> .) + id reduce using rule 91 (action_23 -> .) + read reduce using rule 91 (action_23 -> .) + print reduce using rule 91 (action_23 -> .) + if reduce using rule 91 (action_23 -> .) + do reduce using rule 91 (action_23 -> .) + swap reduce using rule 91 (action_23 -> .) + exit reduce using rule 91 (action_23 -> .) + elif reduce using rule 91 (action_23 -> .) + else reduce using rule 91 (action_23 -> .) - action_23 shift and go to state 43 + action_23 shift and go to state 49 -state 23 +state 28 - (11) F -> F subroutine id . B end subroutine + (11) F -> F subroutine id action_39 . B end subroutine action_40 (13) B -> . B S (14) B -> . @@ -525,389 +589,30 @@ state 23 swap reduce using rule 14 (B -> .) exit reduce using rule 14 (B -> .) - B shift and go to state 44 - -state 24 - - (2) V -> V Tipo Dim doubleColon . Rid action_addSymbols action_32 - (4) Rid -> . id - (5) Rid -> . Rid coma id - - id shift and go to state 46 - - Rid shift and go to state 45 - -state 25 - - (8) Dim -> openBra int . action_30 closedBra - (9) Dim -> openBra int . action_30 closedBra openBra int action_31 closedBra - (100) action_30 -> . - - closedBra reduce using rule 100 (action_30 -> .) - - action_30 shift and go to state 47 - -state 26 - - (16) S -> id parens . - - end reduce using rule 16 (S -> id parens .) - id reduce using rule 16 (S -> id parens .) - read reduce using rule 16 (S -> id parens .) - print reduce using rule 16 (S -> id parens .) - if reduce using rule 16 (S -> id parens .) - do reduce using rule 16 (S -> id parens .) - swap reduce using rule 16 (S -> id parens .) - exit reduce using rule 16 (S -> id parens .) - elif reduce using rule 16 (S -> id parens .) - else reduce using rule 16 (S -> id parens .) - - -state 27 - - (24) S -> id openParen . closedParen - (26) DimensionsOrEmpty -> openParen . EA action_setDim1 ComaEAOrEmpty closedParen - (43) EA -> . MultDiv - (44) EA -> . EA SumOrSub action_3 MultDiv action_4 - (47) MultDiv -> . EAParens - (48) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 - (51) EAParens -> . EItem - (52) EAParens -> . openParen EA closedParen - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty - - closedParen shift and go to state 49 - openParen shift and go to state 48 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 - - EA shift and go to state 50 - MultDiv shift and go to state 51 - EAParens shift and go to state 52 - EItem shift and go to state 53 - Dimensional shift and go to state 54 - -state 28 - - (25) Dimensional -> id DimensionsOrEmpty . - - equals reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - coma reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - end reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - id reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - read reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - print reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - if reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - do reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - swap reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - exit reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - elif reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - else reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - mul reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - div reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - plus reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - minus reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - closedParen reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - less reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - more reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - doubleEquals reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - notEquals reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - lessEquals reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - moreEquals reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - then reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - and reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - or reduce using rule 25 (Dimensional -> id DimensionsOrEmpty .) - + B shift and go to state 50 state 29 - (1) programa -> program id V F B end program . - - $end reduce using rule 1 (programa -> program id V F B end program .) - - -state 30 - - (15) S -> Dimensional action_7 . equals EA action_8 - - equals shift and go to state 57 - - -state 31 - - (17) S -> read RDimensional . - (31) RDimensional -> RDimensional . coma Dimensional action_1 action_36 - - end reduce using rule 17 (S -> read RDimensional .) - id reduce using rule 17 (S -> read RDimensional .) - read reduce using rule 17 (S -> read RDimensional .) - print reduce using rule 17 (S -> read RDimensional .) - if reduce using rule 17 (S -> read RDimensional .) - do reduce using rule 17 (S -> read RDimensional .) - swap reduce using rule 17 (S -> read RDimensional .) - exit reduce using rule 17 (S -> read RDimensional .) - elif reduce using rule 17 (S -> read RDimensional .) - else reduce using rule 17 (S -> read RDimensional .) - coma shift and go to state 58 - - -state 32 - - (30) RDimensional -> Dimensional . action_1 action_36 - (70) action_1 -> . - - coma reduce using rule 70 (action_1 -> .) - end reduce using rule 70 (action_1 -> .) - id reduce using rule 70 (action_1 -> .) - read reduce using rule 70 (action_1 -> .) - print reduce using rule 70 (action_1 -> .) - if reduce using rule 70 (action_1 -> .) - do reduce using rule 70 (action_1 -> .) - swap reduce using rule 70 (action_1 -> .) - exit reduce using rule 70 (action_1 -> .) - elif reduce using rule 70 (action_1 -> .) - else reduce using rule 70 (action_1 -> .) - - action_1 shift and go to state 59 - -state 33 - - (25) Dimensional -> id . DimensionsOrEmpty - (26) DimensionsOrEmpty -> . openParen EA action_setDim1 ComaEAOrEmpty closedParen - (27) DimensionsOrEmpty -> . - - openParen shift and go to state 60 - coma reduce using rule 27 (DimensionsOrEmpty -> .) - end reduce using rule 27 (DimensionsOrEmpty -> .) - id reduce using rule 27 (DimensionsOrEmpty -> .) - read reduce using rule 27 (DimensionsOrEmpty -> .) - print reduce using rule 27 (DimensionsOrEmpty -> .) - if reduce using rule 27 (DimensionsOrEmpty -> .) - do reduce using rule 27 (DimensionsOrEmpty -> .) - swap reduce using rule 27 (DimensionsOrEmpty -> .) - exit reduce using rule 27 (DimensionsOrEmpty -> .) - elif reduce using rule 27 (DimensionsOrEmpty -> .) - else reduce using rule 27 (DimensionsOrEmpty -> .) - mul reduce using rule 27 (DimensionsOrEmpty -> .) - div reduce using rule 27 (DimensionsOrEmpty -> .) - plus reduce using rule 27 (DimensionsOrEmpty -> .) - minus reduce using rule 27 (DimensionsOrEmpty -> .) - closedParen reduce using rule 27 (DimensionsOrEmpty -> .) - less reduce using rule 27 (DimensionsOrEmpty -> .) - more reduce using rule 27 (DimensionsOrEmpty -> .) - doubleEquals reduce using rule 27 (DimensionsOrEmpty -> .) - notEquals reduce using rule 27 (DimensionsOrEmpty -> .) - lessEquals reduce using rule 27 (DimensionsOrEmpty -> .) - moreEquals reduce using rule 27 (DimensionsOrEmpty -> .) - then reduce using rule 27 (DimensionsOrEmpty -> .) - and reduce using rule 27 (DimensionsOrEmpty -> .) - or reduce using rule 27 (DimensionsOrEmpty -> .) - - DimensionsOrEmpty shift and go to state 28 - -state 34 - - (18) S -> print RDimOrString . - (33) RDimOrString -> RDimOrString . coma DimOrString - - end reduce using rule 18 (S -> print RDimOrString .) - id reduce using rule 18 (S -> print RDimOrString .) - read reduce using rule 18 (S -> print RDimOrString .) - print reduce using rule 18 (S -> print RDimOrString .) - if reduce using rule 18 (S -> print RDimOrString .) - do reduce using rule 18 (S -> print RDimOrString .) - swap reduce using rule 18 (S -> print RDimOrString .) - exit reduce using rule 18 (S -> print RDimOrString .) - elif reduce using rule 18 (S -> print RDimOrString .) - else reduce using rule 18 (S -> print RDimOrString .) - coma shift and go to state 61 - - -state 35 - - (32) RDimOrString -> DimOrString . - - coma reduce using rule 32 (RDimOrString -> DimOrString .) - end reduce using rule 32 (RDimOrString -> DimOrString .) - id reduce using rule 32 (RDimOrString -> DimOrString .) - read reduce using rule 32 (RDimOrString -> DimOrString .) - print reduce using rule 32 (RDimOrString -> DimOrString .) - if reduce using rule 32 (RDimOrString -> DimOrString .) - do reduce using rule 32 (RDimOrString -> DimOrString .) - swap reduce using rule 32 (RDimOrString -> DimOrString .) - exit reduce using rule 32 (RDimOrString -> DimOrString .) - elif reduce using rule 32 (RDimOrString -> DimOrString .) - else reduce using rule 32 (RDimOrString -> DimOrString .) - - -state 36 - - (34) DimOrString -> Dimensional . action_1 action_33 - (70) action_1 -> . - - coma reduce using rule 70 (action_1 -> .) - end reduce using rule 70 (action_1 -> .) - id reduce using rule 70 (action_1 -> .) - read reduce using rule 70 (action_1 -> .) - print reduce using rule 70 (action_1 -> .) - if reduce using rule 70 (action_1 -> .) - do reduce using rule 70 (action_1 -> .) - swap reduce using rule 70 (action_1 -> .) - exit reduce using rule 70 (action_1 -> .) - elif reduce using rule 70 (action_1 -> .) - else reduce using rule 70 (action_1 -> .) - - action_1 shift and go to state 62 - -state 37 - - (35) DimOrString -> string . action_34 - (104) action_34 -> . - - coma reduce using rule 104 (action_34 -> .) - end reduce using rule 104 (action_34 -> .) - id reduce using rule 104 (action_34 -> .) - read reduce using rule 104 (action_34 -> .) - print reduce using rule 104 (action_34 -> .) - if reduce using rule 104 (action_34 -> .) - do reduce using rule 104 (action_34 -> .) - swap reduce using rule 104 (action_34 -> .) - exit reduce using rule 104 (action_34 -> .) - elif reduce using rule 104 (action_34 -> .) - else reduce using rule 104 (action_34 -> .) - - action_34 shift and go to state 63 - -state 38 - - (36) DimOrString -> endline . action_34 - (104) action_34 -> . - - coma reduce using rule 104 (action_34 -> .) - end reduce using rule 104 (action_34 -> .) - id reduce using rule 104 (action_34 -> .) - read reduce using rule 104 (action_34 -> .) - print reduce using rule 104 (action_34 -> .) - if reduce using rule 104 (action_34 -> .) - do reduce using rule 104 (action_34 -> .) - swap reduce using rule 104 (action_34 -> .) - exit reduce using rule 104 (action_34 -> .) - elif reduce using rule 104 (action_34 -> .) - else reduce using rule 104 (action_34 -> .) - - action_34 shift and go to state 64 - -state 39 - - (19) S -> if action_16 . Relif ElseOrEmpty end if action_20 - (37) Relif -> . openParen EL closedParen action_17 then B - (38) Relif -> . Relif elif action_18 openParen EL closedParen action_17 then B - - openParen shift and go to state 66 - - Relif shift and go to state 65 - -state 40 - - (20) S -> do id . action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do - (94) action_24 -> . - - equals reduce using rule 94 (action_24 -> .) - - action_24 shift and go to state 67 - -state 41 - - (21) S -> do then . action_21 B action_22 end do - (91) action_21 -> . - - id reduce using rule 91 (action_21 -> .) - read reduce using rule 91 (action_21 -> .) - print reduce using rule 91 (action_21 -> .) - if reduce using rule 91 (action_21 -> .) - do reduce using rule 91 (action_21 -> .) - swap reduce using rule 91 (action_21 -> .) - exit reduce using rule 91 (action_21 -> .) - end reduce using rule 91 (action_21 -> .) - - action_21 shift and go to state 68 - -state 42 - - (22) S -> swap Dimensional . coma Dimensional - - coma shift and go to state 69 - - -state 43 - - (23) S -> exit action_23 . - - end reduce using rule 23 (S -> exit action_23 .) - id reduce using rule 23 (S -> exit action_23 .) - read reduce using rule 23 (S -> exit action_23 .) - print reduce using rule 23 (S -> exit action_23 .) - if reduce using rule 23 (S -> exit action_23 .) - do reduce using rule 23 (S -> exit action_23 .) - swap reduce using rule 23 (S -> exit action_23 .) - exit reduce using rule 23 (S -> exit action_23 .) - elif reduce using rule 23 (S -> exit action_23 .) - else reduce using rule 23 (S -> exit action_23 .) - - -state 44 - - (11) F -> F subroutine id B . end subroutine - (13) B -> B . S - (15) S -> . Dimensional action_7 equals EA action_8 - (16) S -> . id parens - (17) S -> . read RDimensional - (18) S -> . print RDimOrString - (19) S -> . if action_16 Relif ElseOrEmpty end if action_20 - (20) S -> . do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do - (21) S -> . do then action_21 B action_22 end do - (22) S -> . swap Dimensional coma Dimensional - (23) S -> . exit action_23 - (24) S -> . id openParen closedParen - (25) Dimensional -> . id DimensionsOrEmpty - - end shift and go to state 70 - id shift and go to state 13 - read shift and go to state 17 - print shift and go to state 18 - if shift and go to state 19 - do shift and go to state 20 - swap shift and go to state 21 - exit shift and go to state 22 - - S shift and go to state 15 - Dimensional shift and go to state 16 - -state 45 - (2) V -> V Tipo Dim doubleColon Rid . action_addSymbols action_32 (5) Rid -> Rid . coma id - (69) action_addSymbols -> . + (68) action_addSymbols -> . - coma shift and go to state 72 - integer reduce using rule 69 (action_addSymbols -> .) - real reduce using rule 69 (action_addSymbols -> .) - subroutine reduce using rule 69 (action_addSymbols -> .) - end reduce using rule 69 (action_addSymbols -> .) - id reduce using rule 69 (action_addSymbols -> .) - read reduce using rule 69 (action_addSymbols -> .) - print reduce using rule 69 (action_addSymbols -> .) - if reduce using rule 69 (action_addSymbols -> .) - do reduce using rule 69 (action_addSymbols -> .) - swap reduce using rule 69 (action_addSymbols -> .) - exit reduce using rule 69 (action_addSymbols -> .) + coma shift and go to state 52 + integer reduce using rule 68 (action_addSymbols -> .) + real reduce using rule 68 (action_addSymbols -> .) + subroutine reduce using rule 68 (action_addSymbols -> .) + end reduce using rule 68 (action_addSymbols -> .) + id reduce using rule 68 (action_addSymbols -> .) + read reduce using rule 68 (action_addSymbols -> .) + print reduce using rule 68 (action_addSymbols -> .) + if reduce using rule 68 (action_addSymbols -> .) + do reduce using rule 68 (action_addSymbols -> .) + swap reduce using rule 68 (action_addSymbols -> .) + exit reduce using rule 68 (action_addSymbols -> .) - action_addSymbols shift and go to state 71 + action_addSymbols shift and go to state 51 -state 46 +state 30 (4) Rid -> id . @@ -925,438 +630,831 @@ state 46 exit reduce using rule 4 (Rid -> id .) -state 47 +state 31 (8) Dim -> openBra int action_30 . closedBra (9) Dim -> openBra int action_30 . closedBra openBra int action_31 closedBra - closedBra shift and go to state 73 + closedBra shift and go to state 53 +state 32 + + (16) S -> id parens . action_41 + (108) action_41 -> . + + end reduce using rule 108 (action_41 -> .) + id reduce using rule 108 (action_41 -> .) + read reduce using rule 108 (action_41 -> .) + print reduce using rule 108 (action_41 -> .) + if reduce using rule 108 (action_41 -> .) + do reduce using rule 108 (action_41 -> .) + swap reduce using rule 108 (action_41 -> .) + exit reduce using rule 108 (action_41 -> .) + elif reduce using rule 108 (action_41 -> .) + else reduce using rule 108 (action_41 -> .) + + action_41 shift and go to state 54 + +state 33 + + (24) Dimensional -> id DimensionsOrEmpty . action_1 + (69) action_1 -> . + + equals reduce using rule 69 (action_1 -> .) + coma reduce using rule 69 (action_1 -> .) + end reduce using rule 69 (action_1 -> .) + id reduce using rule 69 (action_1 -> .) + read reduce using rule 69 (action_1 -> .) + print reduce using rule 69 (action_1 -> .) + if reduce using rule 69 (action_1 -> .) + do reduce using rule 69 (action_1 -> .) + swap reduce using rule 69 (action_1 -> .) + exit reduce using rule 69 (action_1 -> .) + elif reduce using rule 69 (action_1 -> .) + else reduce using rule 69 (action_1 -> .) + mul reduce using rule 69 (action_1 -> .) + div reduce using rule 69 (action_1 -> .) + plus reduce using rule 69 (action_1 -> .) + minus reduce using rule 69 (action_1 -> .) + closedParen reduce using rule 69 (action_1 -> .) + less reduce using rule 69 (action_1 -> .) + more reduce using rule 69 (action_1 -> .) + doubleEquals reduce using rule 69 (action_1 -> .) + notEquals reduce using rule 69 (action_1 -> .) + lessEquals reduce using rule 69 (action_1 -> .) + moreEquals reduce using rule 69 (action_1 -> .) + then reduce using rule 69 (action_1 -> .) + and reduce using rule 69 (action_1 -> .) + or reduce using rule 69 (action_1 -> .) + + action_1 shift and go to state 55 + +state 34 + + (25) DimensionsOrEmpty -> openParen . EA action_setDim1 ComaEAOrEmpty closedParen + (42) EA -> . MultDiv + (43) EA -> . EA SumOrSub action_3 MultDiv action_4 + (46) MultDiv -> . EAParens + (47) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 + (50) EAParens -> . EItem + (51) EAParens -> . openParen EA closedParen + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 + + openParen shift and go to state 56 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 + + EA shift and go to state 57 + MultDiv shift and go to state 58 + EAParens shift and go to state 59 + EItem shift and go to state 60 + Dimensional shift and go to state 61 + +state 35 + + (1) programa -> program action_37 id V F action_38 B end program . + + $end reduce using rule 1 (programa -> program action_37 id V F action_38 B end program .) + + +state 36 + + (15) S -> Dimensional equals . EA action_8 + (42) EA -> . MultDiv + (43) EA -> . EA SumOrSub action_3 MultDiv action_4 + (46) MultDiv -> . EAParens + (47) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 + (50) EAParens -> . EItem + (51) EAParens -> . openParen EA closedParen + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 + + openParen shift and go to state 56 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 + + Dimensional shift and go to state 61 + EA shift and go to state 64 + MultDiv shift and go to state 58 + EAParens shift and go to state 59 + EItem shift and go to state 60 + +state 37 + + (17) S -> read RDimensional . + (30) RDimensional -> RDimensional . coma Dimensional action_36 + + end reduce using rule 17 (S -> read RDimensional .) + id reduce using rule 17 (S -> read RDimensional .) + read reduce using rule 17 (S -> read RDimensional .) + print reduce using rule 17 (S -> read RDimensional .) + if reduce using rule 17 (S -> read RDimensional .) + do reduce using rule 17 (S -> read RDimensional .) + swap reduce using rule 17 (S -> read RDimensional .) + exit reduce using rule 17 (S -> read RDimensional .) + elif reduce using rule 17 (S -> read RDimensional .) + else reduce using rule 17 (S -> read RDimensional .) + coma shift and go to state 65 + + +state 38 + + (29) RDimensional -> Dimensional . action_36 + (103) action_36 -> . + + coma reduce using rule 103 (action_36 -> .) + end reduce using rule 103 (action_36 -> .) + id reduce using rule 103 (action_36 -> .) + read reduce using rule 103 (action_36 -> .) + print reduce using rule 103 (action_36 -> .) + if reduce using rule 103 (action_36 -> .) + do reduce using rule 103 (action_36 -> .) + swap reduce using rule 103 (action_36 -> .) + exit reduce using rule 103 (action_36 -> .) + elif reduce using rule 103 (action_36 -> .) + else reduce using rule 103 (action_36 -> .) + + action_36 shift and go to state 66 + +state 39 + + (24) Dimensional -> id . DimensionsOrEmpty action_1 + (25) DimensionsOrEmpty -> . openParen EA action_setDim1 ComaEAOrEmpty closedParen + (26) DimensionsOrEmpty -> . + + openParen shift and go to state 34 + coma reduce using rule 26 (DimensionsOrEmpty -> .) + end reduce using rule 26 (DimensionsOrEmpty -> .) + id reduce using rule 26 (DimensionsOrEmpty -> .) + read reduce using rule 26 (DimensionsOrEmpty -> .) + print reduce using rule 26 (DimensionsOrEmpty -> .) + if reduce using rule 26 (DimensionsOrEmpty -> .) + do reduce using rule 26 (DimensionsOrEmpty -> .) + swap reduce using rule 26 (DimensionsOrEmpty -> .) + exit reduce using rule 26 (DimensionsOrEmpty -> .) + elif reduce using rule 26 (DimensionsOrEmpty -> .) + else reduce using rule 26 (DimensionsOrEmpty -> .) + mul reduce using rule 26 (DimensionsOrEmpty -> .) + div reduce using rule 26 (DimensionsOrEmpty -> .) + plus reduce using rule 26 (DimensionsOrEmpty -> .) + minus reduce using rule 26 (DimensionsOrEmpty -> .) + closedParen reduce using rule 26 (DimensionsOrEmpty -> .) + less reduce using rule 26 (DimensionsOrEmpty -> .) + more reduce using rule 26 (DimensionsOrEmpty -> .) + doubleEquals reduce using rule 26 (DimensionsOrEmpty -> .) + notEquals reduce using rule 26 (DimensionsOrEmpty -> .) + lessEquals reduce using rule 26 (DimensionsOrEmpty -> .) + moreEquals reduce using rule 26 (DimensionsOrEmpty -> .) + then reduce using rule 26 (DimensionsOrEmpty -> .) + and reduce using rule 26 (DimensionsOrEmpty -> .) + or reduce using rule 26 (DimensionsOrEmpty -> .) + + DimensionsOrEmpty shift and go to state 33 + +state 40 + + (18) S -> print RDimOrString . + (32) RDimOrString -> RDimOrString . coma DimOrString + + end reduce using rule 18 (S -> print RDimOrString .) + id reduce using rule 18 (S -> print RDimOrString .) + read reduce using rule 18 (S -> print RDimOrString .) + print reduce using rule 18 (S -> print RDimOrString .) + if reduce using rule 18 (S -> print RDimOrString .) + do reduce using rule 18 (S -> print RDimOrString .) + swap reduce using rule 18 (S -> print RDimOrString .) + exit reduce using rule 18 (S -> print RDimOrString .) + elif reduce using rule 18 (S -> print RDimOrString .) + else reduce using rule 18 (S -> print RDimOrString .) + coma shift and go to state 67 + + +state 41 + + (31) RDimOrString -> DimOrString . + + coma reduce using rule 31 (RDimOrString -> DimOrString .) + end reduce using rule 31 (RDimOrString -> DimOrString .) + id reduce using rule 31 (RDimOrString -> DimOrString .) + read reduce using rule 31 (RDimOrString -> DimOrString .) + print reduce using rule 31 (RDimOrString -> DimOrString .) + if reduce using rule 31 (RDimOrString -> DimOrString .) + do reduce using rule 31 (RDimOrString -> DimOrString .) + swap reduce using rule 31 (RDimOrString -> DimOrString .) + exit reduce using rule 31 (RDimOrString -> DimOrString .) + elif reduce using rule 31 (RDimOrString -> DimOrString .) + else reduce using rule 31 (RDimOrString -> DimOrString .) + + +state 42 + + (33) DimOrString -> Dimensional . action_33 + (101) action_33 -> . + + coma reduce using rule 101 (action_33 -> .) + end reduce using rule 101 (action_33 -> .) + id reduce using rule 101 (action_33 -> .) + read reduce using rule 101 (action_33 -> .) + print reduce using rule 101 (action_33 -> .) + if reduce using rule 101 (action_33 -> .) + do reduce using rule 101 (action_33 -> .) + swap reduce using rule 101 (action_33 -> .) + exit reduce using rule 101 (action_33 -> .) + elif reduce using rule 101 (action_33 -> .) + else reduce using rule 101 (action_33 -> .) + + action_33 shift and go to state 68 + +state 43 + + (34) DimOrString -> string . action_34 + (102) action_34 -> . + + coma reduce using rule 102 (action_34 -> .) + end reduce using rule 102 (action_34 -> .) + id reduce using rule 102 (action_34 -> .) + read reduce using rule 102 (action_34 -> .) + print reduce using rule 102 (action_34 -> .) + if reduce using rule 102 (action_34 -> .) + do reduce using rule 102 (action_34 -> .) + swap reduce using rule 102 (action_34 -> .) + exit reduce using rule 102 (action_34 -> .) + elif reduce using rule 102 (action_34 -> .) + else reduce using rule 102 (action_34 -> .) + + action_34 shift and go to state 69 + +state 44 + + (35) DimOrString -> endline . action_34 + (102) action_34 -> . + + coma reduce using rule 102 (action_34 -> .) + end reduce using rule 102 (action_34 -> .) + id reduce using rule 102 (action_34 -> .) + read reduce using rule 102 (action_34 -> .) + print reduce using rule 102 (action_34 -> .) + if reduce using rule 102 (action_34 -> .) + do reduce using rule 102 (action_34 -> .) + swap reduce using rule 102 (action_34 -> .) + exit reduce using rule 102 (action_34 -> .) + elif reduce using rule 102 (action_34 -> .) + else reduce using rule 102 (action_34 -> .) + + action_34 shift and go to state 70 + +state 45 + + (19) S -> if action_16 . Relif ElseOrEmpty end if action_20 + (36) Relif -> . openParen EL closedParen action_17 then B + (37) Relif -> . Relif elif action_18 openParen EL closedParen action_17 then B + + openParen shift and go to state 72 + + Relif shift and go to state 71 + +state 46 + + (20) S -> do id . action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do + (92) action_24 -> . + + equals reduce using rule 92 (action_24 -> .) + + action_24 shift and go to state 73 + +state 47 + + (21) S -> do then . action_21 B action_22 end do + (89) action_21 -> . + + id reduce using rule 89 (action_21 -> .) + read reduce using rule 89 (action_21 -> .) + print reduce using rule 89 (action_21 -> .) + if reduce using rule 89 (action_21 -> .) + do reduce using rule 89 (action_21 -> .) + swap reduce using rule 89 (action_21 -> .) + exit reduce using rule 89 (action_21 -> .) + end reduce using rule 89 (action_21 -> .) + + action_21 shift and go to state 74 + state 48 - (52) EAParens -> openParen . EA closedParen - (43) EA -> . MultDiv - (44) EA -> . EA SumOrSub action_3 MultDiv action_4 - (47) MultDiv -> . EAParens - (48) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 - (51) EAParens -> . EItem - (52) EAParens -> . openParen EA closedParen - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (22) S -> swap Dimensional . coma Dimensional - openParen shift and go to state 48 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + coma shift and go to state 75 - EA shift and go to state 74 - MultDiv shift and go to state 51 - EAParens shift and go to state 52 - EItem shift and go to state 53 - Dimensional shift and go to state 54 state 49 - (24) S -> id openParen closedParen . + (23) S -> exit action_23 . - end reduce using rule 24 (S -> id openParen closedParen .) - id reduce using rule 24 (S -> id openParen closedParen .) - read reduce using rule 24 (S -> id openParen closedParen .) - print reduce using rule 24 (S -> id openParen closedParen .) - if reduce using rule 24 (S -> id openParen closedParen .) - do reduce using rule 24 (S -> id openParen closedParen .) - swap reduce using rule 24 (S -> id openParen closedParen .) - exit reduce using rule 24 (S -> id openParen closedParen .) - elif reduce using rule 24 (S -> id openParen closedParen .) - else reduce using rule 24 (S -> id openParen closedParen .) + end reduce using rule 23 (S -> exit action_23 .) + id reduce using rule 23 (S -> exit action_23 .) + read reduce using rule 23 (S -> exit action_23 .) + print reduce using rule 23 (S -> exit action_23 .) + if reduce using rule 23 (S -> exit action_23 .) + do reduce using rule 23 (S -> exit action_23 .) + swap reduce using rule 23 (S -> exit action_23 .) + exit reduce using rule 23 (S -> exit action_23 .) + elif reduce using rule 23 (S -> exit action_23 .) + else reduce using rule 23 (S -> exit action_23 .) state 50 - (26) DimensionsOrEmpty -> openParen EA . action_setDim1 ComaEAOrEmpty closedParen - (44) EA -> EA . SumOrSub action_3 MultDiv action_4 - (106) action_setDim1 -> . - (45) SumOrSub -> . plus - (46) SumOrSub -> . minus + (11) F -> F subroutine id action_39 B . end subroutine action_40 + (13) B -> B . S + (15) S -> . Dimensional equals EA action_8 + (16) S -> . id parens action_41 + (17) S -> . read RDimensional + (18) S -> . print RDimOrString + (19) S -> . if action_16 Relif ElseOrEmpty end if action_20 + (20) S -> . do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do + (21) S -> . do then action_21 B action_22 end do + (22) S -> . swap Dimensional coma Dimensional + (23) S -> . exit action_23 + (24) Dimensional -> . id DimensionsOrEmpty action_1 - coma reduce using rule 106 (action_setDim1 -> .) - closedParen reduce using rule 106 (action_setDim1 -> .) - plus shift and go to state 77 - minus shift and go to state 78 + end shift and go to state 76 + id shift and go to state 18 + read shift and go to state 22 + print shift and go to state 23 + if shift and go to state 24 + do shift and go to state 25 + swap shift and go to state 26 + exit shift and go to state 27 - action_setDim1 shift and go to state 75 - SumOrSub shift and go to state 76 + S shift and go to state 20 + Dimensional shift and go to state 21 state 51 - (43) EA -> MultDiv . - (48) MultDiv -> MultDiv . MDSymbols action_5 EAParens action_6 - (49) MDSymbols -> . mul - (50) MDSymbols -> . div + (2) V -> V Tipo Dim doubleColon Rid action_addSymbols . action_32 + (100) action_32 -> . - plus reduce using rule 43 (EA -> MultDiv .) - minus reduce using rule 43 (EA -> MultDiv .) - coma reduce using rule 43 (EA -> MultDiv .) - closedParen reduce using rule 43 (EA -> MultDiv .) - end reduce using rule 43 (EA -> MultDiv .) - id reduce using rule 43 (EA -> MultDiv .) - read reduce using rule 43 (EA -> MultDiv .) - print reduce using rule 43 (EA -> MultDiv .) - if reduce using rule 43 (EA -> MultDiv .) - do reduce using rule 43 (EA -> MultDiv .) - swap reduce using rule 43 (EA -> MultDiv .) - exit reduce using rule 43 (EA -> MultDiv .) - elif reduce using rule 43 (EA -> MultDiv .) - else reduce using rule 43 (EA -> MultDiv .) - then reduce using rule 43 (EA -> MultDiv .) - mul shift and go to state 80 - div shift and go to state 81 + integer reduce using rule 100 (action_32 -> .) + real reduce using rule 100 (action_32 -> .) + subroutine reduce using rule 100 (action_32 -> .) + end reduce using rule 100 (action_32 -> .) + id reduce using rule 100 (action_32 -> .) + read reduce using rule 100 (action_32 -> .) + print reduce using rule 100 (action_32 -> .) + if reduce using rule 100 (action_32 -> .) + do reduce using rule 100 (action_32 -> .) + swap reduce using rule 100 (action_32 -> .) + exit reduce using rule 100 (action_32 -> .) - MDSymbols shift and go to state 79 + action_32 shift and go to state 77 state 52 - (47) MultDiv -> EAParens . + (5) Rid -> Rid coma . id - mul reduce using rule 47 (MultDiv -> EAParens .) - div reduce using rule 47 (MultDiv -> EAParens .) - plus reduce using rule 47 (MultDiv -> EAParens .) - minus reduce using rule 47 (MultDiv -> EAParens .) - coma reduce using rule 47 (MultDiv -> EAParens .) - closedParen reduce using rule 47 (MultDiv -> EAParens .) - end reduce using rule 47 (MultDiv -> EAParens .) - id reduce using rule 47 (MultDiv -> EAParens .) - read reduce using rule 47 (MultDiv -> EAParens .) - print reduce using rule 47 (MultDiv -> EAParens .) - if reduce using rule 47 (MultDiv -> EAParens .) - do reduce using rule 47 (MultDiv -> EAParens .) - swap reduce using rule 47 (MultDiv -> EAParens .) - exit reduce using rule 47 (MultDiv -> EAParens .) - elif reduce using rule 47 (MultDiv -> EAParens .) - else reduce using rule 47 (MultDiv -> EAParens .) - then reduce using rule 47 (MultDiv -> EAParens .) + id shift and go to state 78 state 53 - (51) EAParens -> EItem . + (8) Dim -> openBra int action_30 closedBra . + (9) Dim -> openBra int action_30 closedBra . openBra int action_31 closedBra - mul reduce using rule 51 (EAParens -> EItem .) - div reduce using rule 51 (EAParens -> EItem .) - plus reduce using rule 51 (EAParens -> EItem .) - minus reduce using rule 51 (EAParens -> EItem .) - coma reduce using rule 51 (EAParens -> EItem .) - closedParen reduce using rule 51 (EAParens -> EItem .) - end reduce using rule 51 (EAParens -> EItem .) - id reduce using rule 51 (EAParens -> EItem .) - read reduce using rule 51 (EAParens -> EItem .) - print reduce using rule 51 (EAParens -> EItem .) - if reduce using rule 51 (EAParens -> EItem .) - do reduce using rule 51 (EAParens -> EItem .) - swap reduce using rule 51 (EAParens -> EItem .) - exit reduce using rule 51 (EAParens -> EItem .) - elif reduce using rule 51 (EAParens -> EItem .) - else reduce using rule 51 (EAParens -> EItem .) - then reduce using rule 51 (EAParens -> EItem .) + doubleColon reduce using rule 8 (Dim -> openBra int action_30 closedBra .) + openBra shift and go to state 79 state 54 - (60) EItem -> Dimensional . action_1 - (70) action_1 -> . + (16) S -> id parens action_41 . - mul reduce using rule 70 (action_1 -> .) - div reduce using rule 70 (action_1 -> .) - plus reduce using rule 70 (action_1 -> .) - minus reduce using rule 70 (action_1 -> .) - coma reduce using rule 70 (action_1 -> .) - closedParen reduce using rule 70 (action_1 -> .) - end reduce using rule 70 (action_1 -> .) - id reduce using rule 70 (action_1 -> .) - read reduce using rule 70 (action_1 -> .) - print reduce using rule 70 (action_1 -> .) - if reduce using rule 70 (action_1 -> .) - do reduce using rule 70 (action_1 -> .) - swap reduce using rule 70 (action_1 -> .) - exit reduce using rule 70 (action_1 -> .) - elif reduce using rule 70 (action_1 -> .) - else reduce using rule 70 (action_1 -> .) - less reduce using rule 70 (action_1 -> .) - more reduce using rule 70 (action_1 -> .) - doubleEquals reduce using rule 70 (action_1 -> .) - notEquals reduce using rule 70 (action_1 -> .) - lessEquals reduce using rule 70 (action_1 -> .) - moreEquals reduce using rule 70 (action_1 -> .) - then reduce using rule 70 (action_1 -> .) - and reduce using rule 70 (action_1 -> .) - or reduce using rule 70 (action_1 -> .) + end reduce using rule 16 (S -> id parens action_41 .) + id reduce using rule 16 (S -> id parens action_41 .) + read reduce using rule 16 (S -> id parens action_41 .) + print reduce using rule 16 (S -> id parens action_41 .) + if reduce using rule 16 (S -> id parens action_41 .) + do reduce using rule 16 (S -> id parens action_41 .) + swap reduce using rule 16 (S -> id parens action_41 .) + exit reduce using rule 16 (S -> id parens action_41 .) + elif reduce using rule 16 (S -> id parens action_41 .) + else reduce using rule 16 (S -> id parens action_41 .) - action_1 shift and go to state 82 state 55 - (61) EItem -> int . action_2 - (71) action_2 -> . + (24) Dimensional -> id DimensionsOrEmpty action_1 . - mul reduce using rule 71 (action_2 -> .) - div reduce using rule 71 (action_2 -> .) - plus reduce using rule 71 (action_2 -> .) - minus reduce using rule 71 (action_2 -> .) - coma reduce using rule 71 (action_2 -> .) - closedParen reduce using rule 71 (action_2 -> .) - end reduce using rule 71 (action_2 -> .) - id reduce using rule 71 (action_2 -> .) - read reduce using rule 71 (action_2 -> .) - print reduce using rule 71 (action_2 -> .) - if reduce using rule 71 (action_2 -> .) - do reduce using rule 71 (action_2 -> .) - swap reduce using rule 71 (action_2 -> .) - exit reduce using rule 71 (action_2 -> .) - elif reduce using rule 71 (action_2 -> .) - else reduce using rule 71 (action_2 -> .) - less reduce using rule 71 (action_2 -> .) - more reduce using rule 71 (action_2 -> .) - doubleEquals reduce using rule 71 (action_2 -> .) - notEquals reduce using rule 71 (action_2 -> .) - lessEquals reduce using rule 71 (action_2 -> .) - moreEquals reduce using rule 71 (action_2 -> .) - then reduce using rule 71 (action_2 -> .) - and reduce using rule 71 (action_2 -> .) - or reduce using rule 71 (action_2 -> .) + equals reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + coma reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + end reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + id reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + read reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + print reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + if reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + do reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + swap reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + exit reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + elif reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + else reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + mul reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + div reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + plus reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + minus reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + closedParen reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + less reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + more reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + doubleEquals reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + notEquals reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + lessEquals reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + moreEquals reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + then reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + and reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) + or reduce using rule 24 (Dimensional -> id DimensionsOrEmpty action_1 .) - action_2 shift and go to state 83 state 56 - (62) EItem -> rea . action_2_rea - (72) action_2_rea -> . + (51) EAParens -> openParen . EA closedParen + (42) EA -> . MultDiv + (43) EA -> . EA SumOrSub action_3 MultDiv action_4 + (46) MultDiv -> . EAParens + (47) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 + (50) EAParens -> . EItem + (51) EAParens -> . openParen EA closedParen + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 - mul reduce using rule 72 (action_2_rea -> .) - div reduce using rule 72 (action_2_rea -> .) - plus reduce using rule 72 (action_2_rea -> .) - minus reduce using rule 72 (action_2_rea -> .) - coma reduce using rule 72 (action_2_rea -> .) - closedParen reduce using rule 72 (action_2_rea -> .) - end reduce using rule 72 (action_2_rea -> .) - id reduce using rule 72 (action_2_rea -> .) - read reduce using rule 72 (action_2_rea -> .) - print reduce using rule 72 (action_2_rea -> .) - if reduce using rule 72 (action_2_rea -> .) - do reduce using rule 72 (action_2_rea -> .) - swap reduce using rule 72 (action_2_rea -> .) - exit reduce using rule 72 (action_2_rea -> .) - elif reduce using rule 72 (action_2_rea -> .) - else reduce using rule 72 (action_2_rea -> .) - less reduce using rule 72 (action_2_rea -> .) - more reduce using rule 72 (action_2_rea -> .) - doubleEquals reduce using rule 72 (action_2_rea -> .) - notEquals reduce using rule 72 (action_2_rea -> .) - lessEquals reduce using rule 72 (action_2_rea -> .) - moreEquals reduce using rule 72 (action_2_rea -> .) - then reduce using rule 72 (action_2_rea -> .) - and reduce using rule 72 (action_2_rea -> .) - or reduce using rule 72 (action_2_rea -> .) + openParen shift and go to state 56 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 - action_2_rea shift and go to state 84 + EA shift and go to state 80 + MultDiv shift and go to state 58 + EAParens shift and go to state 59 + EItem shift and go to state 60 + Dimensional shift and go to state 61 state 57 - (15) S -> Dimensional action_7 equals . EA action_8 - (43) EA -> . MultDiv - (44) EA -> . EA SumOrSub action_3 MultDiv action_4 - (47) MultDiv -> . EAParens - (48) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 - (51) EAParens -> . EItem - (52) EAParens -> . openParen EA closedParen - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (25) DimensionsOrEmpty -> openParen EA . action_setDim1 ComaEAOrEmpty closedParen + (43) EA -> EA . SumOrSub action_3 MultDiv action_4 + (109) action_setDim1 -> . + (44) SumOrSub -> . plus + (45) SumOrSub -> . minus - openParen shift and go to state 48 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + coma reduce using rule 109 (action_setDim1 -> .) + closedParen reduce using rule 109 (action_setDim1 -> .) + plus shift and go to state 83 + minus shift and go to state 84 - Dimensional shift and go to state 54 - EA shift and go to state 85 - MultDiv shift and go to state 51 - EAParens shift and go to state 52 - EItem shift and go to state 53 + action_setDim1 shift and go to state 81 + SumOrSub shift and go to state 82 state 58 - (31) RDimensional -> RDimensional coma . Dimensional action_1 action_36 - (25) Dimensional -> . id DimensionsOrEmpty + (42) EA -> MultDiv . + (47) MultDiv -> MultDiv . MDSymbols action_5 EAParens action_6 + (48) MDSymbols -> . mul + (49) MDSymbols -> . div - id shift and go to state 33 + plus reduce using rule 42 (EA -> MultDiv .) + minus reduce using rule 42 (EA -> MultDiv .) + coma reduce using rule 42 (EA -> MultDiv .) + closedParen reduce using rule 42 (EA -> MultDiv .) + end reduce using rule 42 (EA -> MultDiv .) + id reduce using rule 42 (EA -> MultDiv .) + read reduce using rule 42 (EA -> MultDiv .) + print reduce using rule 42 (EA -> MultDiv .) + if reduce using rule 42 (EA -> MultDiv .) + do reduce using rule 42 (EA -> MultDiv .) + swap reduce using rule 42 (EA -> MultDiv .) + exit reduce using rule 42 (EA -> MultDiv .) + elif reduce using rule 42 (EA -> MultDiv .) + else reduce using rule 42 (EA -> MultDiv .) + then reduce using rule 42 (EA -> MultDiv .) + mul shift and go to state 86 + div shift and go to state 87 - Dimensional shift and go to state 86 + MDSymbols shift and go to state 85 state 59 - (30) RDimensional -> Dimensional action_1 . action_36 - (105) action_36 -> . + (46) MultDiv -> EAParens . - coma reduce using rule 105 (action_36 -> .) - end reduce using rule 105 (action_36 -> .) - id reduce using rule 105 (action_36 -> .) - read reduce using rule 105 (action_36 -> .) - print reduce using rule 105 (action_36 -> .) - if reduce using rule 105 (action_36 -> .) - do reduce using rule 105 (action_36 -> .) - swap reduce using rule 105 (action_36 -> .) - exit reduce using rule 105 (action_36 -> .) - elif reduce using rule 105 (action_36 -> .) - else reduce using rule 105 (action_36 -> .) + mul reduce using rule 46 (MultDiv -> EAParens .) + div reduce using rule 46 (MultDiv -> EAParens .) + plus reduce using rule 46 (MultDiv -> EAParens .) + minus reduce using rule 46 (MultDiv -> EAParens .) + coma reduce using rule 46 (MultDiv -> EAParens .) + closedParen reduce using rule 46 (MultDiv -> EAParens .) + end reduce using rule 46 (MultDiv -> EAParens .) + id reduce using rule 46 (MultDiv -> EAParens .) + read reduce using rule 46 (MultDiv -> EAParens .) + print reduce using rule 46 (MultDiv -> EAParens .) + if reduce using rule 46 (MultDiv -> EAParens .) + do reduce using rule 46 (MultDiv -> EAParens .) + swap reduce using rule 46 (MultDiv -> EAParens .) + exit reduce using rule 46 (MultDiv -> EAParens .) + elif reduce using rule 46 (MultDiv -> EAParens .) + else reduce using rule 46 (MultDiv -> EAParens .) + then reduce using rule 46 (MultDiv -> EAParens .) - action_36 shift and go to state 87 state 60 - (26) DimensionsOrEmpty -> openParen . EA action_setDim1 ComaEAOrEmpty closedParen - (43) EA -> . MultDiv - (44) EA -> . EA SumOrSub action_3 MultDiv action_4 - (47) MultDiv -> . EAParens - (48) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 - (51) EAParens -> . EItem - (52) EAParens -> . openParen EA closedParen - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (50) EAParens -> EItem . - openParen shift and go to state 48 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + mul reduce using rule 50 (EAParens -> EItem .) + div reduce using rule 50 (EAParens -> EItem .) + plus reduce using rule 50 (EAParens -> EItem .) + minus reduce using rule 50 (EAParens -> EItem .) + coma reduce using rule 50 (EAParens -> EItem .) + closedParen reduce using rule 50 (EAParens -> EItem .) + end reduce using rule 50 (EAParens -> EItem .) + id reduce using rule 50 (EAParens -> EItem .) + read reduce using rule 50 (EAParens -> EItem .) + print reduce using rule 50 (EAParens -> EItem .) + if reduce using rule 50 (EAParens -> EItem .) + do reduce using rule 50 (EAParens -> EItem .) + swap reduce using rule 50 (EAParens -> EItem .) + exit reduce using rule 50 (EAParens -> EItem .) + elif reduce using rule 50 (EAParens -> EItem .) + else reduce using rule 50 (EAParens -> EItem .) + then reduce using rule 50 (EAParens -> EItem .) - EA shift and go to state 50 - MultDiv shift and go to state 51 - EAParens shift and go to state 52 - EItem shift and go to state 53 - Dimensional shift and go to state 54 state 61 - (33) RDimOrString -> RDimOrString coma . DimOrString - (34) DimOrString -> . Dimensional action_1 action_33 - (35) DimOrString -> . string action_34 - (36) DimOrString -> . endline action_34 - (25) Dimensional -> . id DimensionsOrEmpty + (59) EItem -> Dimensional . - string shift and go to state 37 - endline shift and go to state 38 - id shift and go to state 33 + mul reduce using rule 59 (EItem -> Dimensional .) + div reduce using rule 59 (EItem -> Dimensional .) + plus reduce using rule 59 (EItem -> Dimensional .) + minus reduce using rule 59 (EItem -> Dimensional .) + coma reduce using rule 59 (EItem -> Dimensional .) + closedParen reduce using rule 59 (EItem -> Dimensional .) + end reduce using rule 59 (EItem -> Dimensional .) + id reduce using rule 59 (EItem -> Dimensional .) + read reduce using rule 59 (EItem -> Dimensional .) + print reduce using rule 59 (EItem -> Dimensional .) + if reduce using rule 59 (EItem -> Dimensional .) + do reduce using rule 59 (EItem -> Dimensional .) + swap reduce using rule 59 (EItem -> Dimensional .) + exit reduce using rule 59 (EItem -> Dimensional .) + elif reduce using rule 59 (EItem -> Dimensional .) + else reduce using rule 59 (EItem -> Dimensional .) + less reduce using rule 59 (EItem -> Dimensional .) + more reduce using rule 59 (EItem -> Dimensional .) + doubleEquals reduce using rule 59 (EItem -> Dimensional .) + notEquals reduce using rule 59 (EItem -> Dimensional .) + lessEquals reduce using rule 59 (EItem -> Dimensional .) + moreEquals reduce using rule 59 (EItem -> Dimensional .) + then reduce using rule 59 (EItem -> Dimensional .) + and reduce using rule 59 (EItem -> Dimensional .) + or reduce using rule 59 (EItem -> Dimensional .) - DimOrString shift and go to state 88 - Dimensional shift and go to state 36 state 62 - (34) DimOrString -> Dimensional action_1 . action_33 - (103) action_33 -> . + (60) EItem -> int . action_2 + (70) action_2 -> . - coma reduce using rule 103 (action_33 -> .) - end reduce using rule 103 (action_33 -> .) - id reduce using rule 103 (action_33 -> .) - read reduce using rule 103 (action_33 -> .) - print reduce using rule 103 (action_33 -> .) - if reduce using rule 103 (action_33 -> .) - do reduce using rule 103 (action_33 -> .) - swap reduce using rule 103 (action_33 -> .) - exit reduce using rule 103 (action_33 -> .) - elif reduce using rule 103 (action_33 -> .) - else reduce using rule 103 (action_33 -> .) + mul reduce using rule 70 (action_2 -> .) + div reduce using rule 70 (action_2 -> .) + plus reduce using rule 70 (action_2 -> .) + minus reduce using rule 70 (action_2 -> .) + coma reduce using rule 70 (action_2 -> .) + closedParen reduce using rule 70 (action_2 -> .) + end reduce using rule 70 (action_2 -> .) + id reduce using rule 70 (action_2 -> .) + read reduce using rule 70 (action_2 -> .) + print reduce using rule 70 (action_2 -> .) + if reduce using rule 70 (action_2 -> .) + do reduce using rule 70 (action_2 -> .) + swap reduce using rule 70 (action_2 -> .) + exit reduce using rule 70 (action_2 -> .) + elif reduce using rule 70 (action_2 -> .) + else reduce using rule 70 (action_2 -> .) + less reduce using rule 70 (action_2 -> .) + more reduce using rule 70 (action_2 -> .) + doubleEquals reduce using rule 70 (action_2 -> .) + notEquals reduce using rule 70 (action_2 -> .) + lessEquals reduce using rule 70 (action_2 -> .) + moreEquals reduce using rule 70 (action_2 -> .) + then reduce using rule 70 (action_2 -> .) + and reduce using rule 70 (action_2 -> .) + or reduce using rule 70 (action_2 -> .) - action_33 shift and go to state 89 + action_2 shift and go to state 88 state 63 - (35) DimOrString -> string action_34 . + (61) EItem -> rea . action_2_rea + (71) action_2_rea -> . - coma reduce using rule 35 (DimOrString -> string action_34 .) - end reduce using rule 35 (DimOrString -> string action_34 .) - id reduce using rule 35 (DimOrString -> string action_34 .) - read reduce using rule 35 (DimOrString -> string action_34 .) - print reduce using rule 35 (DimOrString -> string action_34 .) - if reduce using rule 35 (DimOrString -> string action_34 .) - do reduce using rule 35 (DimOrString -> string action_34 .) - swap reduce using rule 35 (DimOrString -> string action_34 .) - exit reduce using rule 35 (DimOrString -> string action_34 .) - elif reduce using rule 35 (DimOrString -> string action_34 .) - else reduce using rule 35 (DimOrString -> string action_34 .) + mul reduce using rule 71 (action_2_rea -> .) + div reduce using rule 71 (action_2_rea -> .) + plus reduce using rule 71 (action_2_rea -> .) + minus reduce using rule 71 (action_2_rea -> .) + coma reduce using rule 71 (action_2_rea -> .) + closedParen reduce using rule 71 (action_2_rea -> .) + end reduce using rule 71 (action_2_rea -> .) + id reduce using rule 71 (action_2_rea -> .) + read reduce using rule 71 (action_2_rea -> .) + print reduce using rule 71 (action_2_rea -> .) + if reduce using rule 71 (action_2_rea -> .) + do reduce using rule 71 (action_2_rea -> .) + swap reduce using rule 71 (action_2_rea -> .) + exit reduce using rule 71 (action_2_rea -> .) + elif reduce using rule 71 (action_2_rea -> .) + else reduce using rule 71 (action_2_rea -> .) + less reduce using rule 71 (action_2_rea -> .) + more reduce using rule 71 (action_2_rea -> .) + doubleEquals reduce using rule 71 (action_2_rea -> .) + notEquals reduce using rule 71 (action_2_rea -> .) + lessEquals reduce using rule 71 (action_2_rea -> .) + moreEquals reduce using rule 71 (action_2_rea -> .) + then reduce using rule 71 (action_2_rea -> .) + and reduce using rule 71 (action_2_rea -> .) + or reduce using rule 71 (action_2_rea -> .) + action_2_rea shift and go to state 89 state 64 - (36) DimOrString -> endline action_34 . + (15) S -> Dimensional equals EA . action_8 + (43) EA -> EA . SumOrSub action_3 MultDiv action_4 + (76) action_8 -> . + (44) SumOrSub -> . plus + (45) SumOrSub -> . minus - coma reduce using rule 36 (DimOrString -> endline action_34 .) - end reduce using rule 36 (DimOrString -> endline action_34 .) - id reduce using rule 36 (DimOrString -> endline action_34 .) - read reduce using rule 36 (DimOrString -> endline action_34 .) - print reduce using rule 36 (DimOrString -> endline action_34 .) - if reduce using rule 36 (DimOrString -> endline action_34 .) - do reduce using rule 36 (DimOrString -> endline action_34 .) - swap reduce using rule 36 (DimOrString -> endline action_34 .) - exit reduce using rule 36 (DimOrString -> endline action_34 .) - elif reduce using rule 36 (DimOrString -> endline action_34 .) - else reduce using rule 36 (DimOrString -> endline action_34 .) + end reduce using rule 76 (action_8 -> .) + id reduce using rule 76 (action_8 -> .) + read reduce using rule 76 (action_8 -> .) + print reduce using rule 76 (action_8 -> .) + if reduce using rule 76 (action_8 -> .) + do reduce using rule 76 (action_8 -> .) + swap reduce using rule 76 (action_8 -> .) + exit reduce using rule 76 (action_8 -> .) + elif reduce using rule 76 (action_8 -> .) + else reduce using rule 76 (action_8 -> .) + plus shift and go to state 83 + minus shift and go to state 84 + action_8 shift and go to state 90 + SumOrSub shift and go to state 82 state 65 - (19) S -> if action_16 Relif . ElseOrEmpty end if action_20 - (38) Relif -> Relif . elif action_18 openParen EL closedParen action_17 then B - (39) ElseOrEmpty -> . else action_19 B - (40) ElseOrEmpty -> . + (30) RDimensional -> RDimensional coma . Dimensional action_36 + (24) Dimensional -> . id DimensionsOrEmpty action_1 - elif shift and go to state 91 - else shift and go to state 92 - end reduce using rule 40 (ElseOrEmpty -> .) + id shift and go to state 39 - ElseOrEmpty shift and go to state 90 + Dimensional shift and go to state 91 state 66 - (37) Relif -> openParen . EL closedParen action_17 then B - (53) EL -> . AND - (54) EL -> . EL or action_10 AND action_9 - (55) AND -> . Equality - (56) AND -> . AND and action_12 Equality action_11 - (57) Equality -> . EItem EQSymbols action_13 EItem action_14 - (58) Equality -> . openParen EL closedParen - (59) Equality -> . not EL action_15 - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (29) RDimensional -> Dimensional action_36 . - openParen shift and go to state 93 - not shift and go to state 98 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + coma reduce using rule 29 (RDimensional -> Dimensional action_36 .) + end reduce using rule 29 (RDimensional -> Dimensional action_36 .) + id reduce using rule 29 (RDimensional -> Dimensional action_36 .) + read reduce using rule 29 (RDimensional -> Dimensional action_36 .) + print reduce using rule 29 (RDimensional -> Dimensional action_36 .) + if reduce using rule 29 (RDimensional -> Dimensional action_36 .) + do reduce using rule 29 (RDimensional -> Dimensional action_36 .) + swap reduce using rule 29 (RDimensional -> Dimensional action_36 .) + exit reduce using rule 29 (RDimensional -> Dimensional action_36 .) + elif reduce using rule 29 (RDimensional -> Dimensional action_36 .) + else reduce using rule 29 (RDimensional -> Dimensional action_36 .) - EL shift and go to state 94 - AND shift and go to state 95 - Equality shift and go to state 96 - EItem shift and go to state 97 - Dimensional shift and go to state 54 state 67 - (20) S -> do id action_24 . equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do + (32) RDimOrString -> RDimOrString coma . DimOrString + (33) DimOrString -> . Dimensional action_33 + (34) DimOrString -> . string action_34 + (35) DimOrString -> . endline action_34 + (24) Dimensional -> . id DimensionsOrEmpty action_1 - equals shift and go to state 99 + string shift and go to state 43 + endline shift and go to state 44 + id shift and go to state 39 + DimOrString shift and go to state 92 + Dimensional shift and go to state 42 state 68 + (33) DimOrString -> Dimensional action_33 . + + coma reduce using rule 33 (DimOrString -> Dimensional action_33 .) + end reduce using rule 33 (DimOrString -> Dimensional action_33 .) + id reduce using rule 33 (DimOrString -> Dimensional action_33 .) + read reduce using rule 33 (DimOrString -> Dimensional action_33 .) + print reduce using rule 33 (DimOrString -> Dimensional action_33 .) + if reduce using rule 33 (DimOrString -> Dimensional action_33 .) + do reduce using rule 33 (DimOrString -> Dimensional action_33 .) + swap reduce using rule 33 (DimOrString -> Dimensional action_33 .) + exit reduce using rule 33 (DimOrString -> Dimensional action_33 .) + elif reduce using rule 33 (DimOrString -> Dimensional action_33 .) + else reduce using rule 33 (DimOrString -> Dimensional action_33 .) + + +state 69 + + (34) DimOrString -> string action_34 . + + coma reduce using rule 34 (DimOrString -> string action_34 .) + end reduce using rule 34 (DimOrString -> string action_34 .) + id reduce using rule 34 (DimOrString -> string action_34 .) + read reduce using rule 34 (DimOrString -> string action_34 .) + print reduce using rule 34 (DimOrString -> string action_34 .) + if reduce using rule 34 (DimOrString -> string action_34 .) + do reduce using rule 34 (DimOrString -> string action_34 .) + swap reduce using rule 34 (DimOrString -> string action_34 .) + exit reduce using rule 34 (DimOrString -> string action_34 .) + elif reduce using rule 34 (DimOrString -> string action_34 .) + else reduce using rule 34 (DimOrString -> string action_34 .) + + +state 70 + + (35) DimOrString -> endline action_34 . + + coma reduce using rule 35 (DimOrString -> endline action_34 .) + end reduce using rule 35 (DimOrString -> endline action_34 .) + id reduce using rule 35 (DimOrString -> endline action_34 .) + read reduce using rule 35 (DimOrString -> endline action_34 .) + print reduce using rule 35 (DimOrString -> endline action_34 .) + if reduce using rule 35 (DimOrString -> endline action_34 .) + do reduce using rule 35 (DimOrString -> endline action_34 .) + swap reduce using rule 35 (DimOrString -> endline action_34 .) + exit reduce using rule 35 (DimOrString -> endline action_34 .) + elif reduce using rule 35 (DimOrString -> endline action_34 .) + else reduce using rule 35 (DimOrString -> endline action_34 .) + + +state 71 + + (19) S -> if action_16 Relif . ElseOrEmpty end if action_20 + (37) Relif -> Relif . elif action_18 openParen EL closedParen action_17 then B + (38) ElseOrEmpty -> . else action_19 B + (39) ElseOrEmpty -> . + + elif shift and go to state 94 + else shift and go to state 95 + end reduce using rule 39 (ElseOrEmpty -> .) + + ElseOrEmpty shift and go to state 93 + +state 72 + + (36) Relif -> openParen . EL closedParen action_17 then B + (52) EL -> . AND + (53) EL -> . EL or action_10 AND action_9 + (54) AND -> . Equality + (55) AND -> . AND and action_12 Equality action_11 + (56) Equality -> . EItem EQSymbols action_13 EItem action_14 + (57) Equality -> . openParen EL closedParen + (58) Equality -> . not EL action_15 + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 + + openParen shift and go to state 96 + not shift and go to state 101 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 + + EL shift and go to state 97 + AND shift and go to state 98 + Equality shift and go to state 99 + EItem shift and go to state 100 + Dimensional shift and go to state 61 + +state 73 + + (20) S -> do id action_24 . equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do + + equals shift and go to state 102 + + +state 74 + (21) S -> do then action_21 . B action_22 end do (13) B -> . B S (14) B -> . @@ -1370,558 +1468,26 @@ state 68 exit reduce using rule 14 (B -> .) end reduce using rule 14 (B -> .) - B shift and go to state 100 - -state 69 - - (22) S -> swap Dimensional coma . Dimensional - (25) Dimensional -> . id DimensionsOrEmpty - - id shift and go to state 33 - - Dimensional shift and go to state 101 - -state 70 - - (11) F -> F subroutine id B end . subroutine - - subroutine shift and go to state 102 - - -state 71 - - (2) V -> V Tipo Dim doubleColon Rid action_addSymbols . action_32 - (102) action_32 -> . - - integer reduce using rule 102 (action_32 -> .) - real reduce using rule 102 (action_32 -> .) - subroutine reduce using rule 102 (action_32 -> .) - end reduce using rule 102 (action_32 -> .) - id reduce using rule 102 (action_32 -> .) - read reduce using rule 102 (action_32 -> .) - print reduce using rule 102 (action_32 -> .) - if reduce using rule 102 (action_32 -> .) - do reduce using rule 102 (action_32 -> .) - swap reduce using rule 102 (action_32 -> .) - exit reduce using rule 102 (action_32 -> .) - - action_32 shift and go to state 103 - -state 72 - - (5) Rid -> Rid coma . id - - id shift and go to state 104 - - -state 73 - - (8) Dim -> openBra int action_30 closedBra . - (9) Dim -> openBra int action_30 closedBra . openBra int action_31 closedBra - - doubleColon reduce using rule 8 (Dim -> openBra int action_30 closedBra .) - openBra shift and go to state 105 - - -state 74 - - (52) EAParens -> openParen EA . closedParen - (44) EA -> EA . SumOrSub action_3 MultDiv action_4 - (45) SumOrSub -> . plus - (46) SumOrSub -> . minus - - closedParen shift and go to state 106 - plus shift and go to state 77 - minus shift and go to state 78 - - SumOrSub shift and go to state 76 + B shift and go to state 103 state 75 - (26) DimensionsOrEmpty -> openParen EA action_setDim1 . ComaEAOrEmpty closedParen - (28) ComaEAOrEmpty -> . coma EA action_setDim2 - (29) ComaEAOrEmpty -> . + (22) S -> swap Dimensional coma . Dimensional + (24) Dimensional -> . id DimensionsOrEmpty action_1 - coma shift and go to state 108 - closedParen reduce using rule 29 (ComaEAOrEmpty -> .) + id shift and go to state 39 - ComaEAOrEmpty shift and go to state 107 + Dimensional shift and go to state 104 state 76 - (44) EA -> EA SumOrSub . action_3 MultDiv action_4 - (73) action_3 -> . + (11) F -> F subroutine id action_39 B end . subroutine action_40 - openParen reduce using rule 73 (action_3 -> .) - int reduce using rule 73 (action_3 -> .) - rea reduce using rule 73 (action_3 -> .) - id reduce using rule 73 (action_3 -> .) + subroutine shift and go to state 105 - action_3 shift and go to state 109 state 77 - (45) SumOrSub -> plus . - - openParen reduce using rule 45 (SumOrSub -> plus .) - int reduce using rule 45 (SumOrSub -> plus .) - rea reduce using rule 45 (SumOrSub -> plus .) - id reduce using rule 45 (SumOrSub -> plus .) - - -state 78 - - (46) SumOrSub -> minus . - - openParen reduce using rule 46 (SumOrSub -> minus .) - int reduce using rule 46 (SumOrSub -> minus .) - rea reduce using rule 46 (SumOrSub -> minus .) - id reduce using rule 46 (SumOrSub -> minus .) - - -state 79 - - (48) MultDiv -> MultDiv MDSymbols . action_5 EAParens action_6 - (75) action_5 -> . - - openParen reduce using rule 75 (action_5 -> .) - int reduce using rule 75 (action_5 -> .) - rea reduce using rule 75 (action_5 -> .) - id reduce using rule 75 (action_5 -> .) - - action_5 shift and go to state 110 - -state 80 - - (49) MDSymbols -> mul . - - openParen reduce using rule 49 (MDSymbols -> mul .) - int reduce using rule 49 (MDSymbols -> mul .) - rea reduce using rule 49 (MDSymbols -> mul .) - id reduce using rule 49 (MDSymbols -> mul .) - - -state 81 - - (50) MDSymbols -> div . - - openParen reduce using rule 50 (MDSymbols -> div .) - int reduce using rule 50 (MDSymbols -> div .) - rea reduce using rule 50 (MDSymbols -> div .) - id reduce using rule 50 (MDSymbols -> div .) - - -state 82 - - (60) EItem -> Dimensional action_1 . - - mul reduce using rule 60 (EItem -> Dimensional action_1 .) - div reduce using rule 60 (EItem -> Dimensional action_1 .) - plus reduce using rule 60 (EItem -> Dimensional action_1 .) - minus reduce using rule 60 (EItem -> Dimensional action_1 .) - coma reduce using rule 60 (EItem -> Dimensional action_1 .) - closedParen reduce using rule 60 (EItem -> Dimensional action_1 .) - end reduce using rule 60 (EItem -> Dimensional action_1 .) - id reduce using rule 60 (EItem -> Dimensional action_1 .) - read reduce using rule 60 (EItem -> Dimensional action_1 .) - print reduce using rule 60 (EItem -> Dimensional action_1 .) - if reduce using rule 60 (EItem -> Dimensional action_1 .) - do reduce using rule 60 (EItem -> Dimensional action_1 .) - swap reduce using rule 60 (EItem -> Dimensional action_1 .) - exit reduce using rule 60 (EItem -> Dimensional action_1 .) - elif reduce using rule 60 (EItem -> Dimensional action_1 .) - else reduce using rule 60 (EItem -> Dimensional action_1 .) - less reduce using rule 60 (EItem -> Dimensional action_1 .) - more reduce using rule 60 (EItem -> Dimensional action_1 .) - doubleEquals reduce using rule 60 (EItem -> Dimensional action_1 .) - notEquals reduce using rule 60 (EItem -> Dimensional action_1 .) - lessEquals reduce using rule 60 (EItem -> Dimensional action_1 .) - moreEquals reduce using rule 60 (EItem -> Dimensional action_1 .) - then reduce using rule 60 (EItem -> Dimensional action_1 .) - and reduce using rule 60 (EItem -> Dimensional action_1 .) - or reduce using rule 60 (EItem -> Dimensional action_1 .) - - -state 83 - - (61) EItem -> int action_2 . - - mul reduce using rule 61 (EItem -> int action_2 .) - div reduce using rule 61 (EItem -> int action_2 .) - plus reduce using rule 61 (EItem -> int action_2 .) - minus reduce using rule 61 (EItem -> int action_2 .) - coma reduce using rule 61 (EItem -> int action_2 .) - closedParen reduce using rule 61 (EItem -> int action_2 .) - end reduce using rule 61 (EItem -> int action_2 .) - id reduce using rule 61 (EItem -> int action_2 .) - read reduce using rule 61 (EItem -> int action_2 .) - print reduce using rule 61 (EItem -> int action_2 .) - if reduce using rule 61 (EItem -> int action_2 .) - do reduce using rule 61 (EItem -> int action_2 .) - swap reduce using rule 61 (EItem -> int action_2 .) - exit reduce using rule 61 (EItem -> int action_2 .) - elif reduce using rule 61 (EItem -> int action_2 .) - else reduce using rule 61 (EItem -> int action_2 .) - less reduce using rule 61 (EItem -> int action_2 .) - more reduce using rule 61 (EItem -> int action_2 .) - doubleEquals reduce using rule 61 (EItem -> int action_2 .) - notEquals reduce using rule 61 (EItem -> int action_2 .) - lessEquals reduce using rule 61 (EItem -> int action_2 .) - moreEquals reduce using rule 61 (EItem -> int action_2 .) - then reduce using rule 61 (EItem -> int action_2 .) - and reduce using rule 61 (EItem -> int action_2 .) - or reduce using rule 61 (EItem -> int action_2 .) - - -state 84 - - (62) EItem -> rea action_2_rea . - - mul reduce using rule 62 (EItem -> rea action_2_rea .) - div reduce using rule 62 (EItem -> rea action_2_rea .) - plus reduce using rule 62 (EItem -> rea action_2_rea .) - minus reduce using rule 62 (EItem -> rea action_2_rea .) - coma reduce using rule 62 (EItem -> rea action_2_rea .) - closedParen reduce using rule 62 (EItem -> rea action_2_rea .) - end reduce using rule 62 (EItem -> rea action_2_rea .) - id reduce using rule 62 (EItem -> rea action_2_rea .) - read reduce using rule 62 (EItem -> rea action_2_rea .) - print reduce using rule 62 (EItem -> rea action_2_rea .) - if reduce using rule 62 (EItem -> rea action_2_rea .) - do reduce using rule 62 (EItem -> rea action_2_rea .) - swap reduce using rule 62 (EItem -> rea action_2_rea .) - exit reduce using rule 62 (EItem -> rea action_2_rea .) - elif reduce using rule 62 (EItem -> rea action_2_rea .) - else reduce using rule 62 (EItem -> rea action_2_rea .) - less reduce using rule 62 (EItem -> rea action_2_rea .) - more reduce using rule 62 (EItem -> rea action_2_rea .) - doubleEquals reduce using rule 62 (EItem -> rea action_2_rea .) - notEquals reduce using rule 62 (EItem -> rea action_2_rea .) - lessEquals reduce using rule 62 (EItem -> rea action_2_rea .) - moreEquals reduce using rule 62 (EItem -> rea action_2_rea .) - then reduce using rule 62 (EItem -> rea action_2_rea .) - and reduce using rule 62 (EItem -> rea action_2_rea .) - or reduce using rule 62 (EItem -> rea action_2_rea .) - - -state 85 - - (15) S -> Dimensional action_7 equals EA . action_8 - (44) EA -> EA . SumOrSub action_3 MultDiv action_4 - (78) action_8 -> . - (45) SumOrSub -> . plus - (46) SumOrSub -> . minus - - end reduce using rule 78 (action_8 -> .) - id reduce using rule 78 (action_8 -> .) - read reduce using rule 78 (action_8 -> .) - print reduce using rule 78 (action_8 -> .) - if reduce using rule 78 (action_8 -> .) - do reduce using rule 78 (action_8 -> .) - swap reduce using rule 78 (action_8 -> .) - exit reduce using rule 78 (action_8 -> .) - elif reduce using rule 78 (action_8 -> .) - else reduce using rule 78 (action_8 -> .) - plus shift and go to state 77 - minus shift and go to state 78 - - action_8 shift and go to state 111 - SumOrSub shift and go to state 76 - -state 86 - - (31) RDimensional -> RDimensional coma Dimensional . action_1 action_36 - (70) action_1 -> . - - coma reduce using rule 70 (action_1 -> .) - end reduce using rule 70 (action_1 -> .) - id reduce using rule 70 (action_1 -> .) - read reduce using rule 70 (action_1 -> .) - print reduce using rule 70 (action_1 -> .) - if reduce using rule 70 (action_1 -> .) - do reduce using rule 70 (action_1 -> .) - swap reduce using rule 70 (action_1 -> .) - exit reduce using rule 70 (action_1 -> .) - elif reduce using rule 70 (action_1 -> .) - else reduce using rule 70 (action_1 -> .) - - action_1 shift and go to state 112 - -state 87 - - (30) RDimensional -> Dimensional action_1 action_36 . - - coma reduce using rule 30 (RDimensional -> Dimensional action_1 action_36 .) - end reduce using rule 30 (RDimensional -> Dimensional action_1 action_36 .) - id reduce using rule 30 (RDimensional -> Dimensional action_1 action_36 .) - read reduce using rule 30 (RDimensional -> Dimensional action_1 action_36 .) - print reduce using rule 30 (RDimensional -> Dimensional action_1 action_36 .) - if reduce using rule 30 (RDimensional -> Dimensional action_1 action_36 .) - do reduce using rule 30 (RDimensional -> Dimensional action_1 action_36 .) - swap reduce using rule 30 (RDimensional -> Dimensional action_1 action_36 .) - exit reduce using rule 30 (RDimensional -> Dimensional action_1 action_36 .) - elif reduce using rule 30 (RDimensional -> Dimensional action_1 action_36 .) - else reduce using rule 30 (RDimensional -> Dimensional action_1 action_36 .) - - -state 88 - - (33) RDimOrString -> RDimOrString coma DimOrString . - - coma reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) - end reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) - id reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) - read reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) - print reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) - if reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) - do reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) - swap reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) - exit reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) - elif reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) - else reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) - - -state 89 - - (34) DimOrString -> Dimensional action_1 action_33 . - - coma reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) - end reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) - id reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) - read reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) - print reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) - if reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) - do reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) - swap reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) - exit reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) - elif reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) - else reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) - - -state 90 - - (19) S -> if action_16 Relif ElseOrEmpty . end if action_20 - - end shift and go to state 113 - - -state 91 - - (38) Relif -> Relif elif . action_18 openParen EL closedParen action_17 then B - (88) action_18 -> . - - openParen reduce using rule 88 (action_18 -> .) - - action_18 shift and go to state 114 - -state 92 - - (39) ElseOrEmpty -> else . action_19 B - (89) action_19 -> . - - id reduce using rule 89 (action_19 -> .) - read reduce using rule 89 (action_19 -> .) - print reduce using rule 89 (action_19 -> .) - if reduce using rule 89 (action_19 -> .) - do reduce using rule 89 (action_19 -> .) - swap reduce using rule 89 (action_19 -> .) - exit reduce using rule 89 (action_19 -> .) - end reduce using rule 89 (action_19 -> .) - - action_19 shift and go to state 115 - -state 93 - - (58) Equality -> openParen . EL closedParen - (53) EL -> . AND - (54) EL -> . EL or action_10 AND action_9 - (55) AND -> . Equality - (56) AND -> . AND and action_12 Equality action_11 - (57) Equality -> . EItem EQSymbols action_13 EItem action_14 - (58) Equality -> . openParen EL closedParen - (59) Equality -> . not EL action_15 - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty - - openParen shift and go to state 93 - not shift and go to state 98 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 - - EL shift and go to state 116 - AND shift and go to state 95 - Equality shift and go to state 96 - EItem shift and go to state 97 - Dimensional shift and go to state 54 - -state 94 - - (37) Relif -> openParen EL . closedParen action_17 then B - (54) EL -> EL . or action_10 AND action_9 - - closedParen shift and go to state 117 - or shift and go to state 118 - - -state 95 - - (53) EL -> AND . - (56) AND -> AND . and action_12 Equality action_11 - - ! shift/reduce conflict for and resolved as shift - closedParen reduce using rule 53 (EL -> AND .) - or reduce using rule 53 (EL -> AND .) - and shift and go to state 119 - - ! and [ reduce using rule 53 (EL -> AND .) ] - - -state 96 - - (55) AND -> Equality . - - and reduce using rule 55 (AND -> Equality .) - closedParen reduce using rule 55 (AND -> Equality .) - or reduce using rule 55 (AND -> Equality .) - - -state 97 - - (57) Equality -> EItem . EQSymbols action_13 EItem action_14 - (63) EQSymbols -> . less - (64) EQSymbols -> . more - (65) EQSymbols -> . doubleEquals - (66) EQSymbols -> . notEquals - (67) EQSymbols -> . lessEquals - (68) EQSymbols -> . moreEquals - - less shift and go to state 121 - more shift and go to state 122 - doubleEquals shift and go to state 123 - notEquals shift and go to state 124 - lessEquals shift and go to state 125 - moreEquals shift and go to state 126 - - EQSymbols shift and go to state 120 - -state 98 - - (59) Equality -> not . EL action_15 - (53) EL -> . AND - (54) EL -> . EL or action_10 AND action_9 - (55) AND -> . Equality - (56) AND -> . AND and action_12 Equality action_11 - (57) Equality -> . EItem EQSymbols action_13 EItem action_14 - (58) Equality -> . openParen EL closedParen - (59) Equality -> . not EL action_15 - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty - - openParen shift and go to state 93 - not shift and go to state 98 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 - - EL shift and go to state 127 - AND shift and go to state 95 - Equality shift and go to state 96 - EItem shift and go to state 97 - Dimensional shift and go to state 54 - -state 99 - - (20) S -> do id action_24 equals . EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do - (43) EA -> . MultDiv - (44) EA -> . EA SumOrSub action_3 MultDiv action_4 - (47) MultDiv -> . EAParens - (48) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 - (51) EAParens -> . EItem - (52) EAParens -> . openParen EA closedParen - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty - - openParen shift and go to state 48 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 - - EA shift and go to state 128 - MultDiv shift and go to state 51 - EAParens shift and go to state 52 - EItem shift and go to state 53 - Dimensional shift and go to state 54 - -state 100 - - (21) S -> do then action_21 B . action_22 end do - (13) B -> B . S - (92) action_22 -> . - (15) S -> . Dimensional action_7 equals EA action_8 - (16) S -> . id parens - (17) S -> . read RDimensional - (18) S -> . print RDimOrString - (19) S -> . if action_16 Relif ElseOrEmpty end if action_20 - (20) S -> . do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do - (21) S -> . do then action_21 B action_22 end do - (22) S -> . swap Dimensional coma Dimensional - (23) S -> . exit action_23 - (24) S -> . id openParen closedParen - (25) Dimensional -> . id DimensionsOrEmpty - - end reduce using rule 92 (action_22 -> .) - id shift and go to state 13 - read shift and go to state 17 - print shift and go to state 18 - if shift and go to state 19 - do shift and go to state 20 - swap shift and go to state 21 - exit shift and go to state 22 - - action_22 shift and go to state 129 - S shift and go to state 15 - Dimensional shift and go to state 16 - -state 101 - - (22) S -> swap Dimensional coma Dimensional . - - end reduce using rule 22 (S -> swap Dimensional coma Dimensional .) - id reduce using rule 22 (S -> swap Dimensional coma Dimensional .) - read reduce using rule 22 (S -> swap Dimensional coma Dimensional .) - print reduce using rule 22 (S -> swap Dimensional coma Dimensional .) - if reduce using rule 22 (S -> swap Dimensional coma Dimensional .) - do reduce using rule 22 (S -> swap Dimensional coma Dimensional .) - swap reduce using rule 22 (S -> swap Dimensional coma Dimensional .) - exit reduce using rule 22 (S -> swap Dimensional coma Dimensional .) - elif reduce using rule 22 (S -> swap Dimensional coma Dimensional .) - else reduce using rule 22 (S -> swap Dimensional coma Dimensional .) - - -state 102 - - (11) F -> F subroutine id B end subroutine . - - subroutine reduce using rule 11 (F -> F subroutine id B end subroutine .) - end reduce using rule 11 (F -> F subroutine id B end subroutine .) - id reduce using rule 11 (F -> F subroutine id B end subroutine .) - read reduce using rule 11 (F -> F subroutine id B end subroutine .) - print reduce using rule 11 (F -> F subroutine id B end subroutine .) - if reduce using rule 11 (F -> F subroutine id B end subroutine .) - do reduce using rule 11 (F -> F subroutine id B end subroutine .) - swap reduce using rule 11 (F -> F subroutine id B end subroutine .) - exit reduce using rule 11 (F -> F subroutine id B end subroutine .) - - -state 103 - (2) V -> V Tipo Dim doubleColon Rid action_addSymbols action_32 . integer reduce using rule 2 (V -> V Tipo Dim doubleColon Rid action_addSymbols action_32 .) @@ -1937,7 +1503,7 @@ state 103 exit reduce using rule 2 (V -> V Tipo Dim doubleColon Rid action_addSymbols action_32 .) -state 104 +state 78 (5) Rid -> Rid coma id . @@ -1955,143 +1521,559 @@ state 104 exit reduce using rule 5 (Rid -> Rid coma id .) -state 105 +state 79 (9) Dim -> openBra int action_30 closedBra openBra . int action_31 closedBra - int shift and go to state 130 + int shift and go to state 106 +state 80 + + (51) EAParens -> openParen EA . closedParen + (43) EA -> EA . SumOrSub action_3 MultDiv action_4 + (44) SumOrSub -> . plus + (45) SumOrSub -> . minus + + closedParen shift and go to state 107 + plus shift and go to state 83 + minus shift and go to state 84 + + SumOrSub shift and go to state 82 + +state 81 + + (25) DimensionsOrEmpty -> openParen EA action_setDim1 . ComaEAOrEmpty closedParen + (27) ComaEAOrEmpty -> . coma EA action_setDim2 + (28) ComaEAOrEmpty -> . + + coma shift and go to state 109 + closedParen reduce using rule 28 (ComaEAOrEmpty -> .) + + ComaEAOrEmpty shift and go to state 108 + +state 82 + + (43) EA -> EA SumOrSub . action_3 MultDiv action_4 + (72) action_3 -> . + + openParen reduce using rule 72 (action_3 -> .) + int reduce using rule 72 (action_3 -> .) + rea reduce using rule 72 (action_3 -> .) + id reduce using rule 72 (action_3 -> .) + + action_3 shift and go to state 110 + +state 83 + + (44) SumOrSub -> plus . + + openParen reduce using rule 44 (SumOrSub -> plus .) + int reduce using rule 44 (SumOrSub -> plus .) + rea reduce using rule 44 (SumOrSub -> plus .) + id reduce using rule 44 (SumOrSub -> plus .) + + +state 84 + + (45) SumOrSub -> minus . + + openParen reduce using rule 45 (SumOrSub -> minus .) + int reduce using rule 45 (SumOrSub -> minus .) + rea reduce using rule 45 (SumOrSub -> minus .) + id reduce using rule 45 (SumOrSub -> minus .) + + +state 85 + + (47) MultDiv -> MultDiv MDSymbols . action_5 EAParens action_6 + (74) action_5 -> . + + openParen reduce using rule 74 (action_5 -> .) + int reduce using rule 74 (action_5 -> .) + rea reduce using rule 74 (action_5 -> .) + id reduce using rule 74 (action_5 -> .) + + action_5 shift and go to state 111 + +state 86 + + (48) MDSymbols -> mul . + + openParen reduce using rule 48 (MDSymbols -> mul .) + int reduce using rule 48 (MDSymbols -> mul .) + rea reduce using rule 48 (MDSymbols -> mul .) + id reduce using rule 48 (MDSymbols -> mul .) + + +state 87 + + (49) MDSymbols -> div . + + openParen reduce using rule 49 (MDSymbols -> div .) + int reduce using rule 49 (MDSymbols -> div .) + rea reduce using rule 49 (MDSymbols -> div .) + id reduce using rule 49 (MDSymbols -> div .) + + +state 88 + + (60) EItem -> int action_2 . + + mul reduce using rule 60 (EItem -> int action_2 .) + div reduce using rule 60 (EItem -> int action_2 .) + plus reduce using rule 60 (EItem -> int action_2 .) + minus reduce using rule 60 (EItem -> int action_2 .) + coma reduce using rule 60 (EItem -> int action_2 .) + closedParen reduce using rule 60 (EItem -> int action_2 .) + end reduce using rule 60 (EItem -> int action_2 .) + id reduce using rule 60 (EItem -> int action_2 .) + read reduce using rule 60 (EItem -> int action_2 .) + print reduce using rule 60 (EItem -> int action_2 .) + if reduce using rule 60 (EItem -> int action_2 .) + do reduce using rule 60 (EItem -> int action_2 .) + swap reduce using rule 60 (EItem -> int action_2 .) + exit reduce using rule 60 (EItem -> int action_2 .) + elif reduce using rule 60 (EItem -> int action_2 .) + else reduce using rule 60 (EItem -> int action_2 .) + less reduce using rule 60 (EItem -> int action_2 .) + more reduce using rule 60 (EItem -> int action_2 .) + doubleEquals reduce using rule 60 (EItem -> int action_2 .) + notEquals reduce using rule 60 (EItem -> int action_2 .) + lessEquals reduce using rule 60 (EItem -> int action_2 .) + moreEquals reduce using rule 60 (EItem -> int action_2 .) + then reduce using rule 60 (EItem -> int action_2 .) + and reduce using rule 60 (EItem -> int action_2 .) + or reduce using rule 60 (EItem -> int action_2 .) + + +state 89 + + (61) EItem -> rea action_2_rea . + + mul reduce using rule 61 (EItem -> rea action_2_rea .) + div reduce using rule 61 (EItem -> rea action_2_rea .) + plus reduce using rule 61 (EItem -> rea action_2_rea .) + minus reduce using rule 61 (EItem -> rea action_2_rea .) + coma reduce using rule 61 (EItem -> rea action_2_rea .) + closedParen reduce using rule 61 (EItem -> rea action_2_rea .) + end reduce using rule 61 (EItem -> rea action_2_rea .) + id reduce using rule 61 (EItem -> rea action_2_rea .) + read reduce using rule 61 (EItem -> rea action_2_rea .) + print reduce using rule 61 (EItem -> rea action_2_rea .) + if reduce using rule 61 (EItem -> rea action_2_rea .) + do reduce using rule 61 (EItem -> rea action_2_rea .) + swap reduce using rule 61 (EItem -> rea action_2_rea .) + exit reduce using rule 61 (EItem -> rea action_2_rea .) + elif reduce using rule 61 (EItem -> rea action_2_rea .) + else reduce using rule 61 (EItem -> rea action_2_rea .) + less reduce using rule 61 (EItem -> rea action_2_rea .) + more reduce using rule 61 (EItem -> rea action_2_rea .) + doubleEquals reduce using rule 61 (EItem -> rea action_2_rea .) + notEquals reduce using rule 61 (EItem -> rea action_2_rea .) + lessEquals reduce using rule 61 (EItem -> rea action_2_rea .) + moreEquals reduce using rule 61 (EItem -> rea action_2_rea .) + then reduce using rule 61 (EItem -> rea action_2_rea .) + and reduce using rule 61 (EItem -> rea action_2_rea .) + or reduce using rule 61 (EItem -> rea action_2_rea .) + + +state 90 + + (15) S -> Dimensional equals EA action_8 . + + end reduce using rule 15 (S -> Dimensional equals EA action_8 .) + id reduce using rule 15 (S -> Dimensional equals EA action_8 .) + read reduce using rule 15 (S -> Dimensional equals EA action_8 .) + print reduce using rule 15 (S -> Dimensional equals EA action_8 .) + if reduce using rule 15 (S -> Dimensional equals EA action_8 .) + do reduce using rule 15 (S -> Dimensional equals EA action_8 .) + swap reduce using rule 15 (S -> Dimensional equals EA action_8 .) + exit reduce using rule 15 (S -> Dimensional equals EA action_8 .) + elif reduce using rule 15 (S -> Dimensional equals EA action_8 .) + else reduce using rule 15 (S -> Dimensional equals EA action_8 .) + + +state 91 + + (30) RDimensional -> RDimensional coma Dimensional . action_36 + (103) action_36 -> . + + coma reduce using rule 103 (action_36 -> .) + end reduce using rule 103 (action_36 -> .) + id reduce using rule 103 (action_36 -> .) + read reduce using rule 103 (action_36 -> .) + print reduce using rule 103 (action_36 -> .) + if reduce using rule 103 (action_36 -> .) + do reduce using rule 103 (action_36 -> .) + swap reduce using rule 103 (action_36 -> .) + exit reduce using rule 103 (action_36 -> .) + elif reduce using rule 103 (action_36 -> .) + else reduce using rule 103 (action_36 -> .) + + action_36 shift and go to state 112 + +state 92 + + (32) RDimOrString -> RDimOrString coma DimOrString . + + coma reduce using rule 32 (RDimOrString -> RDimOrString coma DimOrString .) + end reduce using rule 32 (RDimOrString -> RDimOrString coma DimOrString .) + id reduce using rule 32 (RDimOrString -> RDimOrString coma DimOrString .) + read reduce using rule 32 (RDimOrString -> RDimOrString coma DimOrString .) + print reduce using rule 32 (RDimOrString -> RDimOrString coma DimOrString .) + if reduce using rule 32 (RDimOrString -> RDimOrString coma DimOrString .) + do reduce using rule 32 (RDimOrString -> RDimOrString coma DimOrString .) + swap reduce using rule 32 (RDimOrString -> RDimOrString coma DimOrString .) + exit reduce using rule 32 (RDimOrString -> RDimOrString coma DimOrString .) + elif reduce using rule 32 (RDimOrString -> RDimOrString coma DimOrString .) + else reduce using rule 32 (RDimOrString -> RDimOrString coma DimOrString .) + + +state 93 + + (19) S -> if action_16 Relif ElseOrEmpty . end if action_20 + + end shift and go to state 113 + + +state 94 + + (37) Relif -> Relif elif . action_18 openParen EL closedParen action_17 then B + (86) action_18 -> . + + openParen reduce using rule 86 (action_18 -> .) + + action_18 shift and go to state 114 + +state 95 + + (38) ElseOrEmpty -> else . action_19 B + (87) action_19 -> . + + id reduce using rule 87 (action_19 -> .) + read reduce using rule 87 (action_19 -> .) + print reduce using rule 87 (action_19 -> .) + if reduce using rule 87 (action_19 -> .) + do reduce using rule 87 (action_19 -> .) + swap reduce using rule 87 (action_19 -> .) + exit reduce using rule 87 (action_19 -> .) + end reduce using rule 87 (action_19 -> .) + + action_19 shift and go to state 115 + +state 96 + + (57) Equality -> openParen . EL closedParen + (52) EL -> . AND + (53) EL -> . EL or action_10 AND action_9 + (54) AND -> . Equality + (55) AND -> . AND and action_12 Equality action_11 + (56) Equality -> . EItem EQSymbols action_13 EItem action_14 + (57) Equality -> . openParen EL closedParen + (58) Equality -> . not EL action_15 + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 + + openParen shift and go to state 96 + not shift and go to state 101 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 + + EL shift and go to state 116 + AND shift and go to state 98 + Equality shift and go to state 99 + EItem shift and go to state 100 + Dimensional shift and go to state 61 + +state 97 + + (36) Relif -> openParen EL . closedParen action_17 then B + (53) EL -> EL . or action_10 AND action_9 + + closedParen shift and go to state 117 + or shift and go to state 118 + + +state 98 + + (52) EL -> AND . + (55) AND -> AND . and action_12 Equality action_11 + + ! shift/reduce conflict for and resolved as shift + closedParen reduce using rule 52 (EL -> AND .) + or reduce using rule 52 (EL -> AND .) + and shift and go to state 119 + + ! and [ reduce using rule 52 (EL -> AND .) ] + + +state 99 + + (54) AND -> Equality . + + and reduce using rule 54 (AND -> Equality .) + closedParen reduce using rule 54 (AND -> Equality .) + or reduce using rule 54 (AND -> Equality .) + + +state 100 + + (56) Equality -> EItem . EQSymbols action_13 EItem action_14 + (62) EQSymbols -> . less + (63) EQSymbols -> . more + (64) EQSymbols -> . doubleEquals + (65) EQSymbols -> . notEquals + (66) EQSymbols -> . lessEquals + (67) EQSymbols -> . moreEquals + + less shift and go to state 121 + more shift and go to state 122 + doubleEquals shift and go to state 123 + notEquals shift and go to state 124 + lessEquals shift and go to state 125 + moreEquals shift and go to state 126 + + EQSymbols shift and go to state 120 + +state 101 + + (58) Equality -> not . EL action_15 + (52) EL -> . AND + (53) EL -> . EL or action_10 AND action_9 + (54) AND -> . Equality + (55) AND -> . AND and action_12 Equality action_11 + (56) Equality -> . EItem EQSymbols action_13 EItem action_14 + (57) Equality -> . openParen EL closedParen + (58) Equality -> . not EL action_15 + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 + + openParen shift and go to state 96 + not shift and go to state 101 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 + + EL shift and go to state 127 + AND shift and go to state 98 + Equality shift and go to state 99 + EItem shift and go to state 100 + Dimensional shift and go to state 61 + +state 102 + + (20) S -> do id action_24 equals . EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do + (42) EA -> . MultDiv + (43) EA -> . EA SumOrSub action_3 MultDiv action_4 + (46) MultDiv -> . EAParens + (47) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 + (50) EAParens -> . EItem + (51) EAParens -> . openParen EA closedParen + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 + + openParen shift and go to state 56 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 + + EA shift and go to state 128 + MultDiv shift and go to state 58 + EAParens shift and go to state 59 + EItem shift and go to state 60 + Dimensional shift and go to state 61 + +state 103 + + (21) S -> do then action_21 B . action_22 end do + (13) B -> B . S + (90) action_22 -> . + (15) S -> . Dimensional equals EA action_8 + (16) S -> . id parens action_41 + (17) S -> . read RDimensional + (18) S -> . print RDimOrString + (19) S -> . if action_16 Relif ElseOrEmpty end if action_20 + (20) S -> . do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do + (21) S -> . do then action_21 B action_22 end do + (22) S -> . swap Dimensional coma Dimensional + (23) S -> . exit action_23 + (24) Dimensional -> . id DimensionsOrEmpty action_1 + + end reduce using rule 90 (action_22 -> .) + id shift and go to state 18 + read shift and go to state 22 + print shift and go to state 23 + if shift and go to state 24 + do shift and go to state 25 + swap shift and go to state 26 + exit shift and go to state 27 + + action_22 shift and go to state 129 + S shift and go to state 20 + Dimensional shift and go to state 21 + +state 104 + + (22) S -> swap Dimensional coma Dimensional . + + end reduce using rule 22 (S -> swap Dimensional coma Dimensional .) + id reduce using rule 22 (S -> swap Dimensional coma Dimensional .) + read reduce using rule 22 (S -> swap Dimensional coma Dimensional .) + print reduce using rule 22 (S -> swap Dimensional coma Dimensional .) + if reduce using rule 22 (S -> swap Dimensional coma Dimensional .) + do reduce using rule 22 (S -> swap Dimensional coma Dimensional .) + swap reduce using rule 22 (S -> swap Dimensional coma Dimensional .) + exit reduce using rule 22 (S -> swap Dimensional coma Dimensional .) + elif reduce using rule 22 (S -> swap Dimensional coma Dimensional .) + else reduce using rule 22 (S -> swap Dimensional coma Dimensional .) + + +state 105 + + (11) F -> F subroutine id action_39 B end subroutine . action_40 + (107) action_40 -> . + + subroutine reduce using rule 107 (action_40 -> .) + end reduce using rule 107 (action_40 -> .) + id reduce using rule 107 (action_40 -> .) + read reduce using rule 107 (action_40 -> .) + print reduce using rule 107 (action_40 -> .) + if reduce using rule 107 (action_40 -> .) + do reduce using rule 107 (action_40 -> .) + swap reduce using rule 107 (action_40 -> .) + exit reduce using rule 107 (action_40 -> .) + + action_40 shift and go to state 130 + state 106 - (52) EAParens -> openParen EA closedParen . + (9) Dim -> openBra int action_30 closedBra openBra int . action_31 closedBra + (99) action_31 -> . - mul reduce using rule 52 (EAParens -> openParen EA closedParen .) - div reduce using rule 52 (EAParens -> openParen EA closedParen .) - plus reduce using rule 52 (EAParens -> openParen EA closedParen .) - minus reduce using rule 52 (EAParens -> openParen EA closedParen .) - coma reduce using rule 52 (EAParens -> openParen EA closedParen .) - closedParen reduce using rule 52 (EAParens -> openParen EA closedParen .) - end reduce using rule 52 (EAParens -> openParen EA closedParen .) - id reduce using rule 52 (EAParens -> openParen EA closedParen .) - read reduce using rule 52 (EAParens -> openParen EA closedParen .) - print reduce using rule 52 (EAParens -> openParen EA closedParen .) - if reduce using rule 52 (EAParens -> openParen EA closedParen .) - do reduce using rule 52 (EAParens -> openParen EA closedParen .) - swap reduce using rule 52 (EAParens -> openParen EA closedParen .) - exit reduce using rule 52 (EAParens -> openParen EA closedParen .) - elif reduce using rule 52 (EAParens -> openParen EA closedParen .) - else reduce using rule 52 (EAParens -> openParen EA closedParen .) - then reduce using rule 52 (EAParens -> openParen EA closedParen .) + closedBra reduce using rule 99 (action_31 -> .) + action_31 shift and go to state 131 state 107 - (26) DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty . closedParen + (51) EAParens -> openParen EA closedParen . - closedParen shift and go to state 131 + mul reduce using rule 51 (EAParens -> openParen EA closedParen .) + div reduce using rule 51 (EAParens -> openParen EA closedParen .) + plus reduce using rule 51 (EAParens -> openParen EA closedParen .) + minus reduce using rule 51 (EAParens -> openParen EA closedParen .) + coma reduce using rule 51 (EAParens -> openParen EA closedParen .) + closedParen reduce using rule 51 (EAParens -> openParen EA closedParen .) + end reduce using rule 51 (EAParens -> openParen EA closedParen .) + id reduce using rule 51 (EAParens -> openParen EA closedParen .) + read reduce using rule 51 (EAParens -> openParen EA closedParen .) + print reduce using rule 51 (EAParens -> openParen EA closedParen .) + if reduce using rule 51 (EAParens -> openParen EA closedParen .) + do reduce using rule 51 (EAParens -> openParen EA closedParen .) + swap reduce using rule 51 (EAParens -> openParen EA closedParen .) + exit reduce using rule 51 (EAParens -> openParen EA closedParen .) + elif reduce using rule 51 (EAParens -> openParen EA closedParen .) + else reduce using rule 51 (EAParens -> openParen EA closedParen .) + then reduce using rule 51 (EAParens -> openParen EA closedParen .) state 108 - (28) ComaEAOrEmpty -> coma . EA action_setDim2 - (43) EA -> . MultDiv - (44) EA -> . EA SumOrSub action_3 MultDiv action_4 - (47) MultDiv -> . EAParens - (48) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 - (51) EAParens -> . EItem - (52) EAParens -> . openParen EA closedParen - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (25) DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty . closedParen - openParen shift and go to state 48 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + closedParen shift and go to state 132 - EA shift and go to state 132 - MultDiv shift and go to state 51 - EAParens shift and go to state 52 - EItem shift and go to state 53 - Dimensional shift and go to state 54 state 109 - (44) EA -> EA SumOrSub action_3 . MultDiv action_4 - (47) MultDiv -> . EAParens - (48) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 - (51) EAParens -> . EItem - (52) EAParens -> . openParen EA closedParen - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (27) ComaEAOrEmpty -> coma . EA action_setDim2 + (42) EA -> . MultDiv + (43) EA -> . EA SumOrSub action_3 MultDiv action_4 + (46) MultDiv -> . EAParens + (47) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 + (50) EAParens -> . EItem + (51) EAParens -> . openParen EA closedParen + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 - openParen shift and go to state 48 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + openParen shift and go to state 56 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 - MultDiv shift and go to state 133 - EAParens shift and go to state 52 - EItem shift and go to state 53 - Dimensional shift and go to state 54 + EA shift and go to state 133 + MultDiv shift and go to state 58 + EAParens shift and go to state 59 + EItem shift and go to state 60 + Dimensional shift and go to state 61 state 110 - (48) MultDiv -> MultDiv MDSymbols action_5 . EAParens action_6 - (51) EAParens -> . EItem - (52) EAParens -> . openParen EA closedParen - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (43) EA -> EA SumOrSub action_3 . MultDiv action_4 + (46) MultDiv -> . EAParens + (47) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 + (50) EAParens -> . EItem + (51) EAParens -> . openParen EA closedParen + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 - openParen shift and go to state 48 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + openParen shift and go to state 56 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 - EAParens shift and go to state 134 - EItem shift and go to state 53 - Dimensional shift and go to state 54 + MultDiv shift and go to state 134 + EAParens shift and go to state 59 + EItem shift and go to state 60 + Dimensional shift and go to state 61 state 111 - (15) S -> Dimensional action_7 equals EA action_8 . + (47) MultDiv -> MultDiv MDSymbols action_5 . EAParens action_6 + (50) EAParens -> . EItem + (51) EAParens -> . openParen EA closedParen + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 - end reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) - id reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) - read reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) - print reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) - if reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) - do reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) - swap reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) - exit reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) - elif reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) - else reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) + openParen shift and go to state 56 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 + EAParens shift and go to state 135 + EItem shift and go to state 60 + Dimensional shift and go to state 61 state 112 - (31) RDimensional -> RDimensional coma Dimensional action_1 . action_36 - (105) action_36 -> . + (30) RDimensional -> RDimensional coma Dimensional action_36 . - coma reduce using rule 105 (action_36 -> .) - end reduce using rule 105 (action_36 -> .) - id reduce using rule 105 (action_36 -> .) - read reduce using rule 105 (action_36 -> .) - print reduce using rule 105 (action_36 -> .) - if reduce using rule 105 (action_36 -> .) - do reduce using rule 105 (action_36 -> .) - swap reduce using rule 105 (action_36 -> .) - exit reduce using rule 105 (action_36 -> .) - elif reduce using rule 105 (action_36 -> .) - else reduce using rule 105 (action_36 -> .) + coma reduce using rule 30 (RDimensional -> RDimensional coma Dimensional action_36 .) + end reduce using rule 30 (RDimensional -> RDimensional coma Dimensional action_36 .) + id reduce using rule 30 (RDimensional -> RDimensional coma Dimensional action_36 .) + read reduce using rule 30 (RDimensional -> RDimensional coma Dimensional action_36 .) + print reduce using rule 30 (RDimensional -> RDimensional coma Dimensional action_36 .) + if reduce using rule 30 (RDimensional -> RDimensional coma Dimensional action_36 .) + do reduce using rule 30 (RDimensional -> RDimensional coma Dimensional action_36 .) + swap reduce using rule 30 (RDimensional -> RDimensional coma Dimensional action_36 .) + exit reduce using rule 30 (RDimensional -> RDimensional coma Dimensional action_36 .) + elif reduce using rule 30 (RDimensional -> RDimensional coma Dimensional action_36 .) + else reduce using rule 30 (RDimensional -> RDimensional coma Dimensional action_36 .) - action_36 shift and go to state 135 state 113 @@ -2102,14 +2084,14 @@ state 113 state 114 - (38) Relif -> Relif elif action_18 . openParen EL closedParen action_17 then B + (37) Relif -> Relif elif action_18 . openParen EL closedParen action_17 then B openParen shift and go to state 137 state 115 - (39) ElseOrEmpty -> else action_19 . B + (38) ElseOrEmpty -> else action_19 . B (13) B -> . B S (14) B -> . @@ -2126,8 +2108,8 @@ state 115 state 116 - (58) Equality -> openParen EL . closedParen - (54) EL -> EL . or action_10 AND action_9 + (57) Equality -> openParen EL . closedParen + (53) EL -> EL . or action_10 AND action_9 closedParen shift and go to state 139 or shift and go to state 118 @@ -2135,133 +2117,133 @@ state 116 state 117 - (37) Relif -> openParen EL closedParen . action_17 then B - (87) action_17 -> . + (36) Relif -> openParen EL closedParen . action_17 then B + (85) action_17 -> . - then reduce using rule 87 (action_17 -> .) + then reduce using rule 85 (action_17 -> .) action_17 shift and go to state 140 state 118 - (54) EL -> EL or . action_10 AND action_9 - (80) action_10 -> . + (53) EL -> EL or . action_10 AND action_9 + (78) action_10 -> . - openParen reduce using rule 80 (action_10 -> .) - not reduce using rule 80 (action_10 -> .) - int reduce using rule 80 (action_10 -> .) - rea reduce using rule 80 (action_10 -> .) - id reduce using rule 80 (action_10 -> .) + openParen reduce using rule 78 (action_10 -> .) + not reduce using rule 78 (action_10 -> .) + int reduce using rule 78 (action_10 -> .) + rea reduce using rule 78 (action_10 -> .) + id reduce using rule 78 (action_10 -> .) action_10 shift and go to state 141 state 119 - (56) AND -> AND and . action_12 Equality action_11 - (82) action_12 -> . + (55) AND -> AND and . action_12 Equality action_11 + (80) action_12 -> . - openParen reduce using rule 82 (action_12 -> .) - not reduce using rule 82 (action_12 -> .) - int reduce using rule 82 (action_12 -> .) - rea reduce using rule 82 (action_12 -> .) - id reduce using rule 82 (action_12 -> .) + openParen reduce using rule 80 (action_12 -> .) + not reduce using rule 80 (action_12 -> .) + int reduce using rule 80 (action_12 -> .) + rea reduce using rule 80 (action_12 -> .) + id reduce using rule 80 (action_12 -> .) action_12 shift and go to state 142 state 120 - (57) Equality -> EItem EQSymbols . action_13 EItem action_14 - (83) action_13 -> . + (56) Equality -> EItem EQSymbols . action_13 EItem action_14 + (81) action_13 -> . - int reduce using rule 83 (action_13 -> .) - rea reduce using rule 83 (action_13 -> .) - id reduce using rule 83 (action_13 -> .) + int reduce using rule 81 (action_13 -> .) + rea reduce using rule 81 (action_13 -> .) + id reduce using rule 81 (action_13 -> .) action_13 shift and go to state 143 state 121 - (63) EQSymbols -> less . + (62) EQSymbols -> less . - int reduce using rule 63 (EQSymbols -> less .) - rea reduce using rule 63 (EQSymbols -> less .) - id reduce using rule 63 (EQSymbols -> less .) + int reduce using rule 62 (EQSymbols -> less .) + rea reduce using rule 62 (EQSymbols -> less .) + id reduce using rule 62 (EQSymbols -> less .) state 122 - (64) EQSymbols -> more . + (63) EQSymbols -> more . - int reduce using rule 64 (EQSymbols -> more .) - rea reduce using rule 64 (EQSymbols -> more .) - id reduce using rule 64 (EQSymbols -> more .) + int reduce using rule 63 (EQSymbols -> more .) + rea reduce using rule 63 (EQSymbols -> more .) + id reduce using rule 63 (EQSymbols -> more .) state 123 - (65) EQSymbols -> doubleEquals . + (64) EQSymbols -> doubleEquals . - int reduce using rule 65 (EQSymbols -> doubleEquals .) - rea reduce using rule 65 (EQSymbols -> doubleEquals .) - id reduce using rule 65 (EQSymbols -> doubleEquals .) + int reduce using rule 64 (EQSymbols -> doubleEquals .) + rea reduce using rule 64 (EQSymbols -> doubleEquals .) + id reduce using rule 64 (EQSymbols -> doubleEquals .) state 124 - (66) EQSymbols -> notEquals . + (65) EQSymbols -> notEquals . - int reduce using rule 66 (EQSymbols -> notEquals .) - rea reduce using rule 66 (EQSymbols -> notEquals .) - id reduce using rule 66 (EQSymbols -> notEquals .) + int reduce using rule 65 (EQSymbols -> notEquals .) + rea reduce using rule 65 (EQSymbols -> notEquals .) + id reduce using rule 65 (EQSymbols -> notEquals .) state 125 - (67) EQSymbols -> lessEquals . + (66) EQSymbols -> lessEquals . - int reduce using rule 67 (EQSymbols -> lessEquals .) - rea reduce using rule 67 (EQSymbols -> lessEquals .) - id reduce using rule 67 (EQSymbols -> lessEquals .) + int reduce using rule 66 (EQSymbols -> lessEquals .) + rea reduce using rule 66 (EQSymbols -> lessEquals .) + id reduce using rule 66 (EQSymbols -> lessEquals .) state 126 - (68) EQSymbols -> moreEquals . + (67) EQSymbols -> moreEquals . - int reduce using rule 68 (EQSymbols -> moreEquals .) - rea reduce using rule 68 (EQSymbols -> moreEquals .) - id reduce using rule 68 (EQSymbols -> moreEquals .) + int reduce using rule 67 (EQSymbols -> moreEquals .) + rea reduce using rule 67 (EQSymbols -> moreEquals .) + id reduce using rule 67 (EQSymbols -> moreEquals .) state 127 - (59) Equality -> not EL . action_15 - (54) EL -> EL . or action_10 AND action_9 - (85) action_15 -> . + (58) Equality -> not EL . action_15 + (53) EL -> EL . or action_10 AND action_9 + (83) action_15 -> . ! shift/reduce conflict for or resolved as shift or shift and go to state 118 - and reduce using rule 85 (action_15 -> .) - closedParen reduce using rule 85 (action_15 -> .) + and reduce using rule 83 (action_15 -> .) + closedParen reduce using rule 83 (action_15 -> .) - ! or [ reduce using rule 85 (action_15 -> .) ] + ! or [ reduce using rule 83 (action_15 -> .) ] action_15 shift and go to state 144 state 128 (20) S -> do id action_24 equals EA . action_25 coma EA action_26 IntOrEmpty then B action_29 end do - (44) EA -> EA . SumOrSub action_3 MultDiv action_4 - (95) action_25 -> . - (45) SumOrSub -> . plus - (46) SumOrSub -> . minus + (43) EA -> EA . SumOrSub action_3 MultDiv action_4 + (93) action_25 -> . + (44) SumOrSub -> . plus + (45) SumOrSub -> . minus - coma reduce using rule 95 (action_25 -> .) - plus shift and go to state 77 - minus shift and go to state 78 + coma reduce using rule 93 (action_25 -> .) + plus shift and go to state 83 + minus shift and go to state 84 action_25 shift and go to state 145 - SumOrSub shift and go to state 76 + SumOrSub shift and go to state 82 state 129 @@ -2272,182 +2254,178 @@ state 129 state 130 - (9) Dim -> openBra int action_30 closedBra openBra int . action_31 closedBra - (101) action_31 -> . + (11) F -> F subroutine id action_39 B end subroutine action_40 . - closedBra reduce using rule 101 (action_31 -> .) + subroutine reduce using rule 11 (F -> F subroutine id action_39 B end subroutine action_40 .) + end reduce using rule 11 (F -> F subroutine id action_39 B end subroutine action_40 .) + id reduce using rule 11 (F -> F subroutine id action_39 B end subroutine action_40 .) + read reduce using rule 11 (F -> F subroutine id action_39 B end subroutine action_40 .) + print reduce using rule 11 (F -> F subroutine id action_39 B end subroutine action_40 .) + if reduce using rule 11 (F -> F subroutine id action_39 B end subroutine action_40 .) + do reduce using rule 11 (F -> F subroutine id action_39 B end subroutine action_40 .) + swap reduce using rule 11 (F -> F subroutine id action_39 B end subroutine action_40 .) + exit reduce using rule 11 (F -> F subroutine id action_39 B end subroutine action_40 .) - action_31 shift and go to state 147 state 131 - (26) DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen . + (9) Dim -> openBra int action_30 closedBra openBra int action_31 . closedBra - equals reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - coma reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - end reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - id reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - read reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - print reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - if reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - do reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - swap reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - exit reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - elif reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - else reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - mul reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - div reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - plus reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - minus reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - closedParen reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - less reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - more reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - doubleEquals reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - notEquals reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - lessEquals reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - moreEquals reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - then reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - and reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - or reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + closedBra shift and go to state 147 state 132 - (28) ComaEAOrEmpty -> coma EA . action_setDim2 - (44) EA -> EA . SumOrSub action_3 MultDiv action_4 - (107) action_setDim2 -> . - (45) SumOrSub -> . plus - (46) SumOrSub -> . minus + (25) DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen . - closedParen reduce using rule 107 (action_setDim2 -> .) - plus shift and go to state 77 - minus shift and go to state 78 + equals reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + coma reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + end reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + id reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + read reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + print reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + if reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + do reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + swap reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + exit reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + elif reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + else reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + mul reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + div reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + plus reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + minus reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + closedParen reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + less reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + more reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + doubleEquals reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + notEquals reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + lessEquals reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + moreEquals reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + then reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + and reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) + or reduce using rule 25 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) - action_setDim2 shift and go to state 148 - SumOrSub shift and go to state 76 state 133 - (44) EA -> EA SumOrSub action_3 MultDiv . action_4 - (48) MultDiv -> MultDiv . MDSymbols action_5 EAParens action_6 - (74) action_4 -> . - (49) MDSymbols -> . mul - (50) MDSymbols -> . div + (27) ComaEAOrEmpty -> coma EA . action_setDim2 + (43) EA -> EA . SumOrSub action_3 MultDiv action_4 + (110) action_setDim2 -> . + (44) SumOrSub -> . plus + (45) SumOrSub -> . minus - plus reduce using rule 74 (action_4 -> .) - minus reduce using rule 74 (action_4 -> .) - coma reduce using rule 74 (action_4 -> .) - closedParen reduce using rule 74 (action_4 -> .) - end reduce using rule 74 (action_4 -> .) - id reduce using rule 74 (action_4 -> .) - read reduce using rule 74 (action_4 -> .) - print reduce using rule 74 (action_4 -> .) - if reduce using rule 74 (action_4 -> .) - do reduce using rule 74 (action_4 -> .) - swap reduce using rule 74 (action_4 -> .) - exit reduce using rule 74 (action_4 -> .) - elif reduce using rule 74 (action_4 -> .) - else reduce using rule 74 (action_4 -> .) - then reduce using rule 74 (action_4 -> .) - mul shift and go to state 80 - div shift and go to state 81 + closedParen reduce using rule 110 (action_setDim2 -> .) + plus shift and go to state 83 + minus shift and go to state 84 - action_4 shift and go to state 149 - MDSymbols shift and go to state 79 + action_setDim2 shift and go to state 148 + SumOrSub shift and go to state 82 state 134 - (48) MultDiv -> MultDiv MDSymbols action_5 EAParens . action_6 - (76) action_6 -> . + (43) EA -> EA SumOrSub action_3 MultDiv . action_4 + (47) MultDiv -> MultDiv . MDSymbols action_5 EAParens action_6 + (73) action_4 -> . + (48) MDSymbols -> . mul + (49) MDSymbols -> . div - mul reduce using rule 76 (action_6 -> .) - div reduce using rule 76 (action_6 -> .) - plus reduce using rule 76 (action_6 -> .) - minus reduce using rule 76 (action_6 -> .) - coma reduce using rule 76 (action_6 -> .) - closedParen reduce using rule 76 (action_6 -> .) - end reduce using rule 76 (action_6 -> .) - id reduce using rule 76 (action_6 -> .) - read reduce using rule 76 (action_6 -> .) - print reduce using rule 76 (action_6 -> .) - if reduce using rule 76 (action_6 -> .) - do reduce using rule 76 (action_6 -> .) - swap reduce using rule 76 (action_6 -> .) - exit reduce using rule 76 (action_6 -> .) - elif reduce using rule 76 (action_6 -> .) - else reduce using rule 76 (action_6 -> .) - then reduce using rule 76 (action_6 -> .) + plus reduce using rule 73 (action_4 -> .) + minus reduce using rule 73 (action_4 -> .) + coma reduce using rule 73 (action_4 -> .) + closedParen reduce using rule 73 (action_4 -> .) + end reduce using rule 73 (action_4 -> .) + id reduce using rule 73 (action_4 -> .) + read reduce using rule 73 (action_4 -> .) + print reduce using rule 73 (action_4 -> .) + if reduce using rule 73 (action_4 -> .) + do reduce using rule 73 (action_4 -> .) + swap reduce using rule 73 (action_4 -> .) + exit reduce using rule 73 (action_4 -> .) + elif reduce using rule 73 (action_4 -> .) + else reduce using rule 73 (action_4 -> .) + then reduce using rule 73 (action_4 -> .) + mul shift and go to state 86 + div shift and go to state 87 - action_6 shift and go to state 150 + action_4 shift and go to state 149 + MDSymbols shift and go to state 85 state 135 - (31) RDimensional -> RDimensional coma Dimensional action_1 action_36 . + (47) MultDiv -> MultDiv MDSymbols action_5 EAParens . action_6 + (75) action_6 -> . - coma reduce using rule 31 (RDimensional -> RDimensional coma Dimensional action_1 action_36 .) - end reduce using rule 31 (RDimensional -> RDimensional coma Dimensional action_1 action_36 .) - id reduce using rule 31 (RDimensional -> RDimensional coma Dimensional action_1 action_36 .) - read reduce using rule 31 (RDimensional -> RDimensional coma Dimensional action_1 action_36 .) - print reduce using rule 31 (RDimensional -> RDimensional coma Dimensional action_1 action_36 .) - if reduce using rule 31 (RDimensional -> RDimensional coma Dimensional action_1 action_36 .) - do reduce using rule 31 (RDimensional -> RDimensional coma Dimensional action_1 action_36 .) - swap reduce using rule 31 (RDimensional -> RDimensional coma Dimensional action_1 action_36 .) - exit reduce using rule 31 (RDimensional -> RDimensional coma Dimensional action_1 action_36 .) - elif reduce using rule 31 (RDimensional -> RDimensional coma Dimensional action_1 action_36 .) - else reduce using rule 31 (RDimensional -> RDimensional coma Dimensional action_1 action_36 .) + mul reduce using rule 75 (action_6 -> .) + div reduce using rule 75 (action_6 -> .) + plus reduce using rule 75 (action_6 -> .) + minus reduce using rule 75 (action_6 -> .) + coma reduce using rule 75 (action_6 -> .) + closedParen reduce using rule 75 (action_6 -> .) + end reduce using rule 75 (action_6 -> .) + id reduce using rule 75 (action_6 -> .) + read reduce using rule 75 (action_6 -> .) + print reduce using rule 75 (action_6 -> .) + if reduce using rule 75 (action_6 -> .) + do reduce using rule 75 (action_6 -> .) + swap reduce using rule 75 (action_6 -> .) + exit reduce using rule 75 (action_6 -> .) + elif reduce using rule 75 (action_6 -> .) + else reduce using rule 75 (action_6 -> .) + then reduce using rule 75 (action_6 -> .) + action_6 shift and go to state 150 state 136 (19) S -> if action_16 Relif ElseOrEmpty end if . action_20 - (90) action_20 -> . + (88) action_20 -> . - end reduce using rule 90 (action_20 -> .) - id reduce using rule 90 (action_20 -> .) - read reduce using rule 90 (action_20 -> .) - print reduce using rule 90 (action_20 -> .) - if reduce using rule 90 (action_20 -> .) - do reduce using rule 90 (action_20 -> .) - swap reduce using rule 90 (action_20 -> .) - exit reduce using rule 90 (action_20 -> .) - elif reduce using rule 90 (action_20 -> .) - else reduce using rule 90 (action_20 -> .) + end reduce using rule 88 (action_20 -> .) + id reduce using rule 88 (action_20 -> .) + read reduce using rule 88 (action_20 -> .) + print reduce using rule 88 (action_20 -> .) + if reduce using rule 88 (action_20 -> .) + do reduce using rule 88 (action_20 -> .) + swap reduce using rule 88 (action_20 -> .) + exit reduce using rule 88 (action_20 -> .) + elif reduce using rule 88 (action_20 -> .) + else reduce using rule 88 (action_20 -> .) action_20 shift and go to state 151 state 137 - (38) Relif -> Relif elif action_18 openParen . EL closedParen action_17 then B - (53) EL -> . AND - (54) EL -> . EL or action_10 AND action_9 - (55) AND -> . Equality - (56) AND -> . AND and action_12 Equality action_11 - (57) Equality -> . EItem EQSymbols action_13 EItem action_14 - (58) Equality -> . openParen EL closedParen - (59) Equality -> . not EL action_15 - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (37) Relif -> Relif elif action_18 openParen . EL closedParen action_17 then B + (52) EL -> . AND + (53) EL -> . EL or action_10 AND action_9 + (54) AND -> . Equality + (55) AND -> . AND and action_12 Equality action_11 + (56) Equality -> . EItem EQSymbols action_13 EItem action_14 + (57) Equality -> . openParen EL closedParen + (58) Equality -> . not EL action_15 + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 - openParen shift and go to state 93 - not shift and go to state 98 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + openParen shift and go to state 96 + not shift and go to state 101 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 EL shift and go to state 152 - AND shift and go to state 95 - Equality shift and go to state 96 - EItem shift and go to state 97 - Dimensional shift and go to state 54 + AND shift and go to state 98 + Equality shift and go to state 99 + EItem shift and go to state 100 + Dimensional shift and go to state 61 state 138 - (39) ElseOrEmpty -> else action_19 B . + (38) ElseOrEmpty -> else action_19 B . (13) B -> B . S - (15) S -> . Dimensional action_7 equals EA action_8 - (16) S -> . id parens + (15) S -> . Dimensional equals EA action_8 + (16) S -> . id parens action_41 (17) S -> . read RDimensional (18) S -> . print RDimOrString (19) S -> . if action_16 Relif ElseOrEmpty end if action_20 @@ -2455,104 +2433,103 @@ state 138 (21) S -> . do then action_21 B action_22 end do (22) S -> . swap Dimensional coma Dimensional (23) S -> . exit action_23 - (24) S -> . id openParen closedParen - (25) Dimensional -> . id DimensionsOrEmpty + (24) Dimensional -> . id DimensionsOrEmpty action_1 - end reduce using rule 39 (ElseOrEmpty -> else action_19 B .) - id shift and go to state 13 - read shift and go to state 17 - print shift and go to state 18 - if shift and go to state 19 - do shift and go to state 20 - swap shift and go to state 21 - exit shift and go to state 22 + end reduce using rule 38 (ElseOrEmpty -> else action_19 B .) + id shift and go to state 18 + read shift and go to state 22 + print shift and go to state 23 + if shift and go to state 24 + do shift and go to state 25 + swap shift and go to state 26 + exit shift and go to state 27 - S shift and go to state 15 - Dimensional shift and go to state 16 + S shift and go to state 20 + Dimensional shift and go to state 21 state 139 - (58) Equality -> openParen EL closedParen . + (57) Equality -> openParen EL closedParen . - and reduce using rule 58 (Equality -> openParen EL closedParen .) - closedParen reduce using rule 58 (Equality -> openParen EL closedParen .) - or reduce using rule 58 (Equality -> openParen EL closedParen .) + and reduce using rule 57 (Equality -> openParen EL closedParen .) + closedParen reduce using rule 57 (Equality -> openParen EL closedParen .) + or reduce using rule 57 (Equality -> openParen EL closedParen .) state 140 - (37) Relif -> openParen EL closedParen action_17 . then B + (36) Relif -> openParen EL closedParen action_17 . then B then shift and go to state 153 state 141 - (54) EL -> EL or action_10 . AND action_9 - (55) AND -> . Equality - (56) AND -> . AND and action_12 Equality action_11 - (57) Equality -> . EItem EQSymbols action_13 EItem action_14 - (58) Equality -> . openParen EL closedParen - (59) Equality -> . not EL action_15 - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (53) EL -> EL or action_10 . AND action_9 + (54) AND -> . Equality + (55) AND -> . AND and action_12 Equality action_11 + (56) Equality -> . EItem EQSymbols action_13 EItem action_14 + (57) Equality -> . openParen EL closedParen + (58) Equality -> . not EL action_15 + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 - openParen shift and go to state 93 - not shift and go to state 98 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + openParen shift and go to state 96 + not shift and go to state 101 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 AND shift and go to state 154 - Equality shift and go to state 96 - EItem shift and go to state 97 - Dimensional shift and go to state 54 + Equality shift and go to state 99 + EItem shift and go to state 100 + Dimensional shift and go to state 61 state 142 - (56) AND -> AND and action_12 . Equality action_11 - (57) Equality -> . EItem EQSymbols action_13 EItem action_14 - (58) Equality -> . openParen EL closedParen - (59) Equality -> . not EL action_15 - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (55) AND -> AND and action_12 . Equality action_11 + (56) Equality -> . EItem EQSymbols action_13 EItem action_14 + (57) Equality -> . openParen EL closedParen + (58) Equality -> . not EL action_15 + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 - openParen shift and go to state 93 - not shift and go to state 98 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + openParen shift and go to state 96 + not shift and go to state 101 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 Equality shift and go to state 155 - EItem shift and go to state 97 - Dimensional shift and go to state 54 + EItem shift and go to state 100 + Dimensional shift and go to state 61 state 143 - (57) Equality -> EItem EQSymbols action_13 . EItem action_14 - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (56) Equality -> EItem EQSymbols action_13 . EItem action_14 + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 EItem shift and go to state 156 - Dimensional shift and go to state 54 + Dimensional shift and go to state 61 state 144 - (59) Equality -> not EL action_15 . + (58) Equality -> not EL action_15 . - and reduce using rule 59 (Equality -> not EL action_15 .) - closedParen reduce using rule 59 (Equality -> not EL action_15 .) - or reduce using rule 59 (Equality -> not EL action_15 .) + and reduce using rule 58 (Equality -> not EL action_15 .) + closedParen reduce using rule 58 (Equality -> not EL action_15 .) + or reduce using rule 58 (Equality -> not EL action_15 .) state 145 @@ -2571,60 +2548,60 @@ state 146 state 147 - (9) Dim -> openBra int action_30 closedBra openBra int action_31 . closedBra + (9) Dim -> openBra int action_30 closedBra openBra int action_31 closedBra . - closedBra shift and go to state 159 + doubleColon reduce using rule 9 (Dim -> openBra int action_30 closedBra openBra int action_31 closedBra .) state 148 - (28) ComaEAOrEmpty -> coma EA action_setDim2 . + (27) ComaEAOrEmpty -> coma EA action_setDim2 . - closedParen reduce using rule 28 (ComaEAOrEmpty -> coma EA action_setDim2 .) + closedParen reduce using rule 27 (ComaEAOrEmpty -> coma EA action_setDim2 .) state 149 - (44) EA -> EA SumOrSub action_3 MultDiv action_4 . + (43) EA -> EA SumOrSub action_3 MultDiv action_4 . - plus reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - minus reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - coma reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - closedParen reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - end reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - id reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - read reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - print reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - if reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - do reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - swap reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - exit reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - elif reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - else reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) - then reduce using rule 44 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + plus reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + minus reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + coma reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + closedParen reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + end reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + id reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + read reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + print reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + if reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + do reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + swap reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + exit reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + elif reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + else reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) + then reduce using rule 43 (EA -> EA SumOrSub action_3 MultDiv action_4 .) state 150 - (48) MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 . + (47) MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 . - mul reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - div reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - plus reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - minus reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - coma reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - closedParen reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - end reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - id reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - read reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - print reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - if reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - do reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - swap reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - exit reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - elif reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - else reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) - then reduce using rule 48 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + mul reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + div reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + plus reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + minus reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + coma reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + closedParen reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + end reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + id reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + read reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + print reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + if reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + do reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + swap reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + exit reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + elif reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + else reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) + then reduce using rule 47 (MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 .) state 151 @@ -2645,16 +2622,16 @@ state 151 state 152 - (38) Relif -> Relif elif action_18 openParen EL . closedParen action_17 then B - (54) EL -> EL . or action_10 AND action_9 + (37) Relif -> Relif elif action_18 openParen EL . closedParen action_17 then B + (53) EL -> EL . or action_10 AND action_9 - closedParen shift and go to state 160 + closedParen shift and go to state 159 or shift and go to state 118 state 153 - (37) Relif -> openParen EL closedParen action_17 then . B + (36) Relif -> openParen EL closedParen action_17 then . B (13) B -> . B S (14) B -> . @@ -2669,69 +2646,69 @@ state 153 else reduce using rule 14 (B -> .) end reduce using rule 14 (B -> .) - B shift and go to state 161 + B shift and go to state 160 state 154 - (54) EL -> EL or action_10 AND . action_9 - (56) AND -> AND . and action_12 Equality action_11 - (79) action_9 -> . + (53) EL -> EL or action_10 AND . action_9 + (55) AND -> AND . and action_12 Equality action_11 + (77) action_9 -> . ! shift/reduce conflict for and resolved as shift and shift and go to state 119 - closedParen reduce using rule 79 (action_9 -> .) - or reduce using rule 79 (action_9 -> .) + closedParen reduce using rule 77 (action_9 -> .) + or reduce using rule 77 (action_9 -> .) - ! and [ reduce using rule 79 (action_9 -> .) ] + ! and [ reduce using rule 77 (action_9 -> .) ] - action_9 shift and go to state 162 + action_9 shift and go to state 161 state 155 - (56) AND -> AND and action_12 Equality . action_11 - (81) action_11 -> . + (55) AND -> AND and action_12 Equality . action_11 + (79) action_11 -> . - and reduce using rule 81 (action_11 -> .) - closedParen reduce using rule 81 (action_11 -> .) - or reduce using rule 81 (action_11 -> .) + and reduce using rule 79 (action_11 -> .) + closedParen reduce using rule 79 (action_11 -> .) + or reduce using rule 79 (action_11 -> .) - action_11 shift and go to state 163 + action_11 shift and go to state 162 state 156 - (57) Equality -> EItem EQSymbols action_13 EItem . action_14 - (84) action_14 -> . + (56) Equality -> EItem EQSymbols action_13 EItem . action_14 + (82) action_14 -> . - and reduce using rule 84 (action_14 -> .) - closedParen reduce using rule 84 (action_14 -> .) - or reduce using rule 84 (action_14 -> .) + and reduce using rule 82 (action_14 -> .) + closedParen reduce using rule 82 (action_14 -> .) + or reduce using rule 82 (action_14 -> .) - action_14 shift and go to state 164 + action_14 shift and go to state 163 state 157 (20) S -> do id action_24 equals EA action_25 coma . EA action_26 IntOrEmpty then B action_29 end do - (43) EA -> . MultDiv - (44) EA -> . EA SumOrSub action_3 MultDiv action_4 - (47) MultDiv -> . EAParens - (48) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 - (51) EAParens -> . EItem - (52) EAParens -> . openParen EA closedParen - (60) EItem -> . Dimensional action_1 - (61) EItem -> . int action_2 - (62) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (42) EA -> . MultDiv + (43) EA -> . EA SumOrSub action_3 MultDiv action_4 + (46) MultDiv -> . EAParens + (47) MultDiv -> . MultDiv MDSymbols action_5 EAParens action_6 + (50) EAParens -> . EItem + (51) EAParens -> . openParen EA closedParen + (59) EItem -> . Dimensional + (60) EItem -> . int action_2 + (61) EItem -> . rea action_2_rea + (24) Dimensional -> . id DimensionsOrEmpty action_1 - openParen shift and go to state 48 - int shift and go to state 55 - rea shift and go to state 56 - id shift and go to state 33 + openParen shift and go to state 56 + int shift and go to state 62 + rea shift and go to state 63 + id shift and go to state 39 - EA shift and go to state 165 - MultDiv shift and go to state 51 - EAParens shift and go to state 52 - EItem shift and go to state 53 - Dimensional shift and go to state 54 + EA shift and go to state 164 + MultDiv shift and go to state 58 + EAParens shift and go to state 59 + EItem shift and go to state 60 + Dimensional shift and go to state 61 state 158 @@ -2751,26 +2728,19 @@ state 158 state 159 - (9) Dim -> openBra int action_30 closedBra openBra int action_31 closedBra . + (37) Relif -> Relif elif action_18 openParen EL closedParen . action_17 then B + (85) action_17 -> . - doubleColon reduce using rule 9 (Dim -> openBra int action_30 closedBra openBra int action_31 closedBra .) + then reduce using rule 85 (action_17 -> .) + action_17 shift and go to state 165 state 160 - (38) Relif -> Relif elif action_18 openParen EL closedParen . action_17 then B - (87) action_17 -> . - - then reduce using rule 87 (action_17 -> .) - - action_17 shift and go to state 166 - -state 161 - - (37) Relif -> openParen EL closedParen action_17 then B . + (36) Relif -> openParen EL closedParen action_17 then B . (13) B -> B . S - (15) S -> . Dimensional action_7 equals EA action_8 - (16) S -> . id parens + (15) S -> . Dimensional equals EA action_8 + (16) S -> . id parens action_41 (17) S -> . read RDimensional (18) S -> . print RDimOrString (19) S -> . if action_16 Relif ElseOrEmpty end if action_20 @@ -2778,89 +2748,88 @@ state 161 (21) S -> . do then action_21 B action_22 end do (22) S -> . swap Dimensional coma Dimensional (23) S -> . exit action_23 - (24) S -> . id openParen closedParen - (25) Dimensional -> . id DimensionsOrEmpty + (24) Dimensional -> . id DimensionsOrEmpty action_1 - elif reduce using rule 37 (Relif -> openParen EL closedParen action_17 then B .) - else reduce using rule 37 (Relif -> openParen EL closedParen action_17 then B .) - end reduce using rule 37 (Relif -> openParen EL closedParen action_17 then B .) - id shift and go to state 13 - read shift and go to state 17 - print shift and go to state 18 - if shift and go to state 19 - do shift and go to state 20 - swap shift and go to state 21 - exit shift and go to state 22 + elif reduce using rule 36 (Relif -> openParen EL closedParen action_17 then B .) + else reduce using rule 36 (Relif -> openParen EL closedParen action_17 then B .) + end reduce using rule 36 (Relif -> openParen EL closedParen action_17 then B .) + id shift and go to state 18 + read shift and go to state 22 + print shift and go to state 23 + if shift and go to state 24 + do shift and go to state 25 + swap shift and go to state 26 + exit shift and go to state 27 + + S shift and go to state 20 + Dimensional shift and go to state 21 + +state 161 + + (53) EL -> EL or action_10 AND action_9 . + + closedParen reduce using rule 53 (EL -> EL or action_10 AND action_9 .) + or reduce using rule 53 (EL -> EL or action_10 AND action_9 .) + and reduce using rule 53 (EL -> EL or action_10 AND action_9 .) - S shift and go to state 15 - Dimensional shift and go to state 16 state 162 - (54) EL -> EL or action_10 AND action_9 . + (55) AND -> AND and action_12 Equality action_11 . - closedParen reduce using rule 54 (EL -> EL or action_10 AND action_9 .) - or reduce using rule 54 (EL -> EL or action_10 AND action_9 .) - and reduce using rule 54 (EL -> EL or action_10 AND action_9 .) + and reduce using rule 55 (AND -> AND and action_12 Equality action_11 .) + closedParen reduce using rule 55 (AND -> AND and action_12 Equality action_11 .) + or reduce using rule 55 (AND -> AND and action_12 Equality action_11 .) state 163 - (56) AND -> AND and action_12 Equality action_11 . + (56) Equality -> EItem EQSymbols action_13 EItem action_14 . - and reduce using rule 56 (AND -> AND and action_12 Equality action_11 .) - closedParen reduce using rule 56 (AND -> AND and action_12 Equality action_11 .) - or reduce using rule 56 (AND -> AND and action_12 Equality action_11 .) + and reduce using rule 56 (Equality -> EItem EQSymbols action_13 EItem action_14 .) + closedParen reduce using rule 56 (Equality -> EItem EQSymbols action_13 EItem action_14 .) + or reduce using rule 56 (Equality -> EItem EQSymbols action_13 EItem action_14 .) state 164 - (57) Equality -> EItem EQSymbols action_13 EItem action_14 . + (20) S -> do id action_24 equals EA action_25 coma EA . action_26 IntOrEmpty then B action_29 end do + (43) EA -> EA . SumOrSub action_3 MultDiv action_4 + (94) action_26 -> . + (44) SumOrSub -> . plus + (45) SumOrSub -> . minus - and reduce using rule 57 (Equality -> EItem EQSymbols action_13 EItem action_14 .) - closedParen reduce using rule 57 (Equality -> EItem EQSymbols action_13 EItem action_14 .) - or reduce using rule 57 (Equality -> EItem EQSymbols action_13 EItem action_14 .) + coma reduce using rule 94 (action_26 -> .) + then reduce using rule 94 (action_26 -> .) + plus shift and go to state 83 + minus shift and go to state 84 + action_26 shift and go to state 166 + SumOrSub shift and go to state 82 state 165 - (20) S -> do id action_24 equals EA action_25 coma EA . action_26 IntOrEmpty then B action_29 end do - (44) EA -> EA . SumOrSub action_3 MultDiv action_4 - (96) action_26 -> . - (45) SumOrSub -> . plus - (46) SumOrSub -> . minus + (37) Relif -> Relif elif action_18 openParen EL closedParen action_17 . then B - coma reduce using rule 96 (action_26 -> .) - then reduce using rule 96 (action_26 -> .) - plus shift and go to state 77 - minus shift and go to state 78 + then shift and go to state 167 - action_26 shift and go to state 167 - SumOrSub shift and go to state 76 state 166 - (38) Relif -> Relif elif action_18 openParen EL closedParen action_17 . then B + (20) S -> do id action_24 equals EA action_25 coma EA action_26 . IntOrEmpty then B action_29 end do + (40) IntOrEmpty -> . coma int action_28 + (41) IntOrEmpty -> . action_27 + (95) action_27 -> . - then shift and go to state 168 + coma shift and go to state 168 + then reduce using rule 95 (action_27 -> .) + IntOrEmpty shift and go to state 169 + action_27 shift and go to state 170 state 167 - (20) S -> do id action_24 equals EA action_25 coma EA action_26 . IntOrEmpty then B action_29 end do - (41) IntOrEmpty -> . coma int action_28 - (42) IntOrEmpty -> . action_27 - (97) action_27 -> . - - coma shift and go to state 169 - then reduce using rule 97 (action_27 -> .) - - IntOrEmpty shift and go to state 170 - action_27 shift and go to state 171 - -state 168 - - (38) Relif -> Relif elif action_18 openParen EL closedParen action_17 then . B + (37) Relif -> Relif elif action_18 openParen EL closedParen action_17 then . B (13) B -> . B S (14) B -> . @@ -2875,35 +2844,35 @@ state 168 else reduce using rule 14 (B -> .) end reduce using rule 14 (B -> .) - B shift and go to state 172 + B shift and go to state 171 + +state 168 + + (40) IntOrEmpty -> coma . int action_28 + + int shift and go to state 172 + state 169 - (41) IntOrEmpty -> coma . int action_28 + (20) S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty . then B action_29 end do - int shift and go to state 173 + then shift and go to state 173 state 170 - (20) S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty . then B action_29 end do + (41) IntOrEmpty -> action_27 . - then shift and go to state 174 + then reduce using rule 41 (IntOrEmpty -> action_27 .) state 171 - (42) IntOrEmpty -> action_27 . - - then reduce using rule 42 (IntOrEmpty -> action_27 .) - - -state 172 - - (38) Relif -> Relif elif action_18 openParen EL closedParen action_17 then B . + (37) Relif -> Relif elif action_18 openParen EL closedParen action_17 then B . (13) B -> B . S - (15) S -> . Dimensional action_7 equals EA action_8 - (16) S -> . id parens + (15) S -> . Dimensional equals EA action_8 + (16) S -> . id parens action_41 (17) S -> . read RDimensional (18) S -> . print RDimOrString (19) S -> . if action_16 Relif ElseOrEmpty end if action_20 @@ -2911,34 +2880,33 @@ state 172 (21) S -> . do then action_21 B action_22 end do (22) S -> . swap Dimensional coma Dimensional (23) S -> . exit action_23 - (24) S -> . id openParen closedParen - (25) Dimensional -> . id DimensionsOrEmpty + (24) Dimensional -> . id DimensionsOrEmpty action_1 - elif reduce using rule 38 (Relif -> Relif elif action_18 openParen EL closedParen action_17 then B .) - else reduce using rule 38 (Relif -> Relif elif action_18 openParen EL closedParen action_17 then B .) - end reduce using rule 38 (Relif -> Relif elif action_18 openParen EL closedParen action_17 then B .) - id shift and go to state 13 - read shift and go to state 17 - print shift and go to state 18 - if shift and go to state 19 - do shift and go to state 20 - swap shift and go to state 21 - exit shift and go to state 22 + elif reduce using rule 37 (Relif -> Relif elif action_18 openParen EL closedParen action_17 then B .) + else reduce using rule 37 (Relif -> Relif elif action_18 openParen EL closedParen action_17 then B .) + end reduce using rule 37 (Relif -> Relif elif action_18 openParen EL closedParen action_17 then B .) + id shift and go to state 18 + read shift and go to state 22 + print shift and go to state 23 + if shift and go to state 24 + do shift and go to state 25 + swap shift and go to state 26 + exit shift and go to state 27 - S shift and go to state 15 - Dimensional shift and go to state 16 + S shift and go to state 20 + Dimensional shift and go to state 21 + +state 172 + + (40) IntOrEmpty -> coma int . action_28 + (96) action_28 -> . + + then reduce using rule 96 (action_28 -> .) + + action_28 shift and go to state 174 state 173 - (41) IntOrEmpty -> coma int . action_28 - (98) action_28 -> . - - then reduce using rule 98 (action_28 -> .) - - action_28 shift and go to state 175 - -state 174 - (20) S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then . B action_29 end do (13) B -> . B S (14) B -> . @@ -2952,22 +2920,22 @@ state 174 exit reduce using rule 14 (B -> .) end reduce using rule 14 (B -> .) - B shift and go to state 176 + B shift and go to state 175 + +state 174 + + (40) IntOrEmpty -> coma int action_28 . + + then reduce using rule 40 (IntOrEmpty -> coma int action_28 .) + state 175 - (41) IntOrEmpty -> coma int action_28 . - - then reduce using rule 41 (IntOrEmpty -> coma int action_28 .) - - -state 176 - (20) S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B . action_29 end do (13) B -> B . S - (99) action_29 -> . - (15) S -> . Dimensional action_7 equals EA action_8 - (16) S -> . id parens + (97) action_29 -> . + (15) S -> . Dimensional equals EA action_8 + (16) S -> . id parens action_41 (17) S -> . read RDimensional (18) S -> . print RDimOrString (19) S -> . if action_16 Relif ElseOrEmpty end if action_20 @@ -2975,37 +2943,36 @@ state 176 (21) S -> . do then action_21 B action_22 end do (22) S -> . swap Dimensional coma Dimensional (23) S -> . exit action_23 - (24) S -> . id openParen closedParen - (25) Dimensional -> . id DimensionsOrEmpty + (24) Dimensional -> . id DimensionsOrEmpty action_1 - end reduce using rule 99 (action_29 -> .) - id shift and go to state 13 - read shift and go to state 17 - print shift and go to state 18 - if shift and go to state 19 - do shift and go to state 20 - swap shift and go to state 21 - exit shift and go to state 22 + end reduce using rule 97 (action_29 -> .) + id shift and go to state 18 + read shift and go to state 22 + print shift and go to state 23 + if shift and go to state 24 + do shift and go to state 25 + swap shift and go to state 26 + exit shift and go to state 27 - action_29 shift and go to state 177 - S shift and go to state 15 - Dimensional shift and go to state 16 + action_29 shift and go to state 176 + S shift and go to state 20 + Dimensional shift and go to state 21 -state 177 +state 176 (20) S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 . end do - end shift and go to state 178 + end shift and go to state 177 -state 178 +state 177 (20) S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end . do - do shift and go to state 179 + do shift and go to state 178 -state 179 +state 178 (20) S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do . @@ -3023,6 +2990,6 @@ state 179 WARNING: WARNING: Conflicts: WARNING: -WARNING: shift/reduce conflict for and in state 95 resolved as shift +WARNING: shift/reduce conflict for and in state 98 resolved as shift WARNING: shift/reduce conflict for or in state 127 resolved as shift WARNING: shift/reduce conflict for and in state 154 resolved as shift diff --git a/final_lang/parsetab.py b/final_lang/parsetab.py index f98ef0f..71d68c2 100644 --- a/final_lang/parsetab.py +++ b/final_lang/parsetab.py @@ -6,9 +6,9 @@ _tabversion = '3.10' _lr_method = 'LALR' -_lr_signature = 'and closedBra closedParen coma div do doubleColon doubleEquals elif else end endline equals exit id if int integer less lessEquals minus more moreEquals mul not notEquals openBra openParen or parens plus print program rea read real string subroutine swap then\n programa : program id V F B end program\n \n V : V Tipo Dim doubleColon Rid action_addSymbols action_32\n |\n \n Rid : id\n | Rid coma id\n \n Tipo : integer\n | real\n \n Dim : openBra int action_30 closedBra\n | openBra int action_30 closedBra openBra int action_31 closedBra\n |\n \n F : F subroutine id B end subroutine\n |\n \n B : B S\n |\n \n S : Dimensional action_7 equals EA action_8\n | id parens\n | read RDimensional\n | print RDimOrString\n | if action_16 Relif ElseOrEmpty end if action_20\n | do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do\n | do then action_21 B action_22 end do\n | swap Dimensional coma Dimensional\n | exit action_23 \n | id openParen closedParen\n \n Dimensional : id DimensionsOrEmpty\n \n DimensionsOrEmpty : openParen EA action_setDim1 ComaEAOrEmpty closedParen\n |\n \n ComaEAOrEmpty : coma EA action_setDim2\n |\n \n RDimensional : Dimensional action_1 action_36\n | RDimensional coma Dimensional action_1 action_36\n \n RDimOrString : DimOrString\n | RDimOrString coma DimOrString\n \n DimOrString : Dimensional action_1 action_33\n | string action_34\n | endline action_34\n \n Relif : openParen EL closedParen action_17 then B\n | Relif elif action_18 openParen EL closedParen action_17 then B\n \n ElseOrEmpty : else action_19 B\n |\n \n IntOrEmpty : coma int action_28\n | action_27\n \n EA : MultDiv\n | EA SumOrSub action_3 MultDiv action_4\n \n SumOrSub : plus\n | minus\n \n MultDiv : EAParens\n | MultDiv MDSymbols action_5 EAParens action_6\n \n MDSymbols : mul\n | div\n \n EAParens : EItem\n | openParen EA closedParen\n \n EL : AND\n | EL or action_10 AND action_9\n \n AND : Equality\n | AND and action_12 Equality action_11\n \n Equality : EItem EQSymbols action_13 EItem action_14\n | openParen EL closedParen\n | not EL action_15\n \n EItem : Dimensional action_1\n | int action_2\n | rea action_2_rea\n \n EQSymbols : less\n | more\n | doubleEquals\n | notEquals\n | lessEquals\n | moreEquals\n action_addSymbols :action_1 :action_2 :action_2_rea :action_3 :action_4 :action_5 :action_6 :action_7 :action_8 :action_9 :action_10 :action_11 :action_12 :action_13 :action_14 :action_15 :action_16 :action_17 :action_18 :action_19 :action_20 :action_21 :action_22 :action_23 :action_24 :action_25 :action_26 :action_27 :action_28 :action_29 :action_30 :action_31 :action_32 :action_33 :action_34 :action_36 :action_setDim1 :action_setDim2 :' +_lr_signature = 'and closedBra closedParen coma div do doubleColon doubleEquals elif else end endline equals exit id if int integer less lessEquals minus more moreEquals mul not notEquals openBra openParen or parens plus print program rea read real string subroutine swap then\n programa : program action_37 id V F action_38 B end program\n \n V : V Tipo Dim doubleColon Rid action_addSymbols action_32\n |\n \n Rid : id\n | Rid coma id\n \n Tipo : integer\n | real\n \n Dim : openBra int action_30 closedBra\n | openBra int action_30 closedBra openBra int action_31 closedBra\n |\n \n F : F subroutine id action_39 B end subroutine action_40\n |\n \n B : B S\n |\n \n S : Dimensional equals EA action_8\n | id parens action_41\n | read RDimensional\n | print RDimOrString\n | if action_16 Relif ElseOrEmpty end if action_20\n | do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do\n | do then action_21 B action_22 end do\n | swap Dimensional coma Dimensional\n | exit action_23 \n \n Dimensional : id DimensionsOrEmpty action_1\n \n DimensionsOrEmpty : openParen EA action_setDim1 ComaEAOrEmpty closedParen\n |\n \n ComaEAOrEmpty : coma EA action_setDim2\n |\n \n RDimensional : Dimensional action_36\n | RDimensional coma Dimensional action_36\n \n RDimOrString : DimOrString\n | RDimOrString coma DimOrString\n \n DimOrString : Dimensional action_33\n | string action_34\n | endline action_34\n \n Relif : openParen EL closedParen action_17 then B\n | Relif elif action_18 openParen EL closedParen action_17 then B\n \n ElseOrEmpty : else action_19 B\n |\n \n IntOrEmpty : coma int action_28\n | action_27\n \n EA : MultDiv\n | EA SumOrSub action_3 MultDiv action_4\n \n SumOrSub : plus\n | minus\n \n MultDiv : EAParens\n | MultDiv MDSymbols action_5 EAParens action_6\n \n MDSymbols : mul\n | div\n \n EAParens : EItem\n | openParen EA closedParen\n \n EL : AND\n | EL or action_10 AND action_9\n \n AND : Equality\n | AND and action_12 Equality action_11\n \n Equality : EItem EQSymbols action_13 EItem action_14\n | openParen EL closedParen\n | not EL action_15\n \n EItem : Dimensional\n | int action_2\n | rea action_2_rea\n \n EQSymbols : less\n | more\n | doubleEquals\n | notEquals\n | lessEquals\n | moreEquals\n action_addSymbols :action_1 :action_2 :action_2_rea :action_3 :action_4 :action_5 :action_6 :action_8 :action_9 :action_10 :action_11 :action_12 :action_13 :action_14 :action_15 :action_16 :action_17 :action_18 :action_19 :action_20 :action_21 :action_22 :action_23 :action_24 :action_25 :action_26 :action_27 :action_28 :action_29 :action_30 :action_31 :action_32 :action_33 :action_34 :action_36 :action_37 :action_38 :action_39 :action_40 :action_41 :action_setDim1 :action_setDim2 :' -_lr_action_items = {'program':([0,14,],[2,29,]),'$end':([1,29,],[0,-1,]),'id':([2,3,4,5,9,10,15,17,18,20,21,22,23,24,26,27,28,31,32,33,34,35,36,37,38,41,43,44,45,46,48,49,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,68,69,71,72,76,77,78,79,80,81,82,83,84,85,86,87,88,89,92,93,98,99,100,101,102,103,104,106,108,109,110,111,112,115,118,119,120,121,122,123,124,125,126,131,133,134,135,136,137,138,141,142,143,149,150,151,153,157,158,161,168,172,174,176,179,],[3,-3,-12,-14,13,23,-13,33,33,40,33,-93,-14,46,-16,33,-25,-17,-70,-27,-18,-32,-70,-104,-104,-91,-23,13,-69,-4,33,-24,-43,-47,-51,-70,-71,-72,33,33,-105,33,33,-103,-35,-36,33,-14,33,-102,104,-73,-45,-46,-75,-49,-50,-60,-61,-62,-78,-70,-30,-33,-34,-89,33,33,33,13,-22,-11,-2,-5,-52,33,33,33,-15,-105,-14,-80,-82,-83,-63,-64,-65,-66,-67,-68,-26,-74,-76,-31,-90,33,13,33,33,33,-44,-48,-19,-14,33,-21,13,-14,13,-14,13,-20,]),'integer':([3,4,45,46,71,103,104,],[-3,7,-69,-4,-102,-2,-5,]),'real':([3,4,45,46,71,103,104,],[-3,8,-69,-4,-102,-2,-5,]),'subroutine':([3,4,5,45,46,70,71,102,103,104,],[-3,-12,10,-69,-4,102,-102,-11,-2,-5,]),'end':([3,4,5,9,15,22,23,26,28,31,32,33,34,35,36,37,38,41,43,44,45,46,49,51,52,53,54,55,56,59,62,63,64,65,68,71,82,83,84,85,86,87,88,89,90,92,100,101,102,103,104,106,111,112,115,129,131,133,134,135,136,138,149,150,151,153,158,161,168,172,174,176,177,179,],[-3,-12,-14,14,-13,-93,-14,-16,-25,-17,-70,-27,-18,-32,-70,-104,-104,-91,-23,70,-69,-4,-24,-43,-47,-51,-70,-71,-72,-105,-103,-35,-36,-40,-14,-102,-60,-61,-62,-78,-70,-30,-33,-34,113,-89,-92,-22,-11,-2,-5,-52,-15,-105,-14,146,-26,-74,-76,-31,-90,-39,-44,-48,-19,-14,-21,-37,-14,-38,-14,-99,178,-20,]),'read':([3,4,5,9,15,22,23,26,28,31,32,33,34,35,36,37,38,41,43,44,45,46,49,51,52,53,54,55,56,59,62,63,64,68,71,82,83,84,85,86,87,88,89,92,100,101,102,103,104,106,111,112,115,131,133,134,135,136,138,149,150,151,153,158,161,168,172,174,176,179,],[-3,-12,-14,17,-13,-93,-14,-16,-25,-17,-70,-27,-18,-32,-70,-104,-104,-91,-23,17,-69,-4,-24,-43,-47,-51,-70,-71,-72,-105,-103,-35,-36,-14,-102,-60,-61,-62,-78,-70,-30,-33,-34,-89,17,-22,-11,-2,-5,-52,-15,-105,-14,-26,-74,-76,-31,-90,17,-44,-48,-19,-14,-21,17,-14,17,-14,17,-20,]),'print':([3,4,5,9,15,22,23,26,28,31,32,33,34,35,36,37,38,41,43,44,45,46,49,51,52,53,54,55,56,59,62,63,64,68,71,82,83,84,85,86,87,88,89,92,100,101,102,103,104,106,111,112,115,131,133,134,135,136,138,149,150,151,153,158,161,168,172,174,176,179,],[-3,-12,-14,18,-13,-93,-14,-16,-25,-17,-70,-27,-18,-32,-70,-104,-104,-91,-23,18,-69,-4,-24,-43,-47,-51,-70,-71,-72,-105,-103,-35,-36,-14,-102,-60,-61,-62,-78,-70,-30,-33,-34,-89,18,-22,-11,-2,-5,-52,-15,-105,-14,-26,-74,-76,-31,-90,18,-44,-48,-19,-14,-21,18,-14,18,-14,18,-20,]),'if':([3,4,5,9,15,22,23,26,28,31,32,33,34,35,36,37,38,41,43,44,45,46,49,51,52,53,54,55,56,59,62,63,64,68,71,82,83,84,85,86,87,88,89,92,100,101,102,103,104,106,111,112,113,115,131,133,134,135,136,138,149,150,151,153,158,161,168,172,174,176,179,],[-3,-12,-14,19,-13,-93,-14,-16,-25,-17,-70,-27,-18,-32,-70,-104,-104,-91,-23,19,-69,-4,-24,-43,-47,-51,-70,-71,-72,-105,-103,-35,-36,-14,-102,-60,-61,-62,-78,-70,-30,-33,-34,-89,19,-22,-11,-2,-5,-52,-15,-105,136,-14,-26,-74,-76,-31,-90,19,-44,-48,-19,-14,-21,19,-14,19,-14,19,-20,]),'do':([3,4,5,9,15,22,23,26,28,31,32,33,34,35,36,37,38,41,43,44,45,46,49,51,52,53,54,55,56,59,62,63,64,68,71,82,83,84,85,86,87,88,89,92,100,101,102,103,104,106,111,112,115,131,133,134,135,136,138,146,149,150,151,153,158,161,168,172,174,176,178,179,],[-3,-12,-14,20,-13,-93,-14,-16,-25,-17,-70,-27,-18,-32,-70,-104,-104,-91,-23,20,-69,-4,-24,-43,-47,-51,-70,-71,-72,-105,-103,-35,-36,-14,-102,-60,-61,-62,-78,-70,-30,-33,-34,-89,20,-22,-11,-2,-5,-52,-15,-105,-14,-26,-74,-76,-31,-90,20,158,-44,-48,-19,-14,-21,20,-14,20,-14,20,179,-20,]),'swap':([3,4,5,9,15,22,23,26,28,31,32,33,34,35,36,37,38,41,43,44,45,46,49,51,52,53,54,55,56,59,62,63,64,68,71,82,83,84,85,86,87,88,89,92,100,101,102,103,104,106,111,112,115,131,133,134,135,136,138,149,150,151,153,158,161,168,172,174,176,179,],[-3,-12,-14,21,-13,-93,-14,-16,-25,-17,-70,-27,-18,-32,-70,-104,-104,-91,-23,21,-69,-4,-24,-43,-47,-51,-70,-71,-72,-105,-103,-35,-36,-14,-102,-60,-61,-62,-78,-70,-30,-33,-34,-89,21,-22,-11,-2,-5,-52,-15,-105,-14,-26,-74,-76,-31,-90,21,-44,-48,-19,-14,-21,21,-14,21,-14,21,-20,]),'exit':([3,4,5,9,15,22,23,26,28,31,32,33,34,35,36,37,38,41,43,44,45,46,49,51,52,53,54,55,56,59,62,63,64,68,71,82,83,84,85,86,87,88,89,92,100,101,102,103,104,106,111,112,115,131,133,134,135,136,138,149,150,151,153,158,161,168,172,174,176,179,],[-3,-12,-14,22,-13,-93,-14,-16,-25,-17,-70,-27,-18,-32,-70,-104,-104,-91,-23,22,-69,-4,-24,-43,-47,-51,-70,-71,-72,-105,-103,-35,-36,-14,-102,-60,-61,-62,-78,-70,-30,-33,-34,-89,22,-22,-11,-2,-5,-52,-15,-105,-14,-26,-74,-76,-31,-90,22,-44,-48,-19,-14,-21,22,-14,22,-14,22,-20,]),'openBra':([6,7,8,73,],[12,-6,-7,105,]),'doubleColon':([6,7,8,11,73,159,],[-10,-6,-7,24,-8,-9,]),'int':([12,27,48,57,60,66,76,77,78,79,80,81,93,98,99,105,108,109,110,118,119,120,121,122,123,124,125,126,137,141,142,143,157,169,],[25,55,55,55,55,55,-73,-45,-46,-75,-49,-50,55,55,55,130,55,55,55,-80,-82,-83,-63,-64,-65,-66,-67,-68,55,55,55,55,55,173,]),'parens':([13,],[26,]),'openParen':([13,19,27,33,39,48,57,60,66,76,77,78,79,80,81,91,93,98,99,108,109,110,114,118,119,137,141,142,157,],[27,-86,48,60,66,48,48,48,93,-73,-45,-46,-75,-49,-50,-88,93,93,48,48,48,48,137,-80,-82,93,93,93,48,]),'equals':([13,16,28,30,40,67,131,],[-27,-77,-25,57,-94,99,-26,]),'elif':([15,22,26,28,31,32,33,34,35,36,37,38,43,49,51,52,53,54,55,56,59,62,63,64,65,82,83,84,85,86,87,88,89,101,106,111,112,131,133,134,135,136,149,150,151,153,158,161,168,172,179,],[-13,-93,-16,-25,-17,-70,-27,-18,-32,-70,-104,-104,-23,-24,-43,-47,-51,-70,-71,-72,-105,-103,-35,-36,91,-60,-61,-62,-78,-70,-30,-33,-34,-22,-52,-15,-105,-26,-74,-76,-31,-90,-44,-48,-19,-14,-21,-37,-14,-38,-20,]),'else':([15,22,26,28,31,32,33,34,35,36,37,38,43,49,51,52,53,54,55,56,59,62,63,64,65,82,83,84,85,86,87,88,89,101,106,111,112,131,133,134,135,136,149,150,151,153,158,161,168,172,179,],[-13,-93,-16,-25,-17,-70,-27,-18,-32,-70,-104,-104,-23,-24,-43,-47,-51,-70,-71,-72,-105,-103,-35,-36,92,-60,-61,-62,-78,-70,-30,-33,-34,-22,-52,-15,-105,-26,-74,-76,-31,-90,-44,-48,-19,-14,-21,-37,-14,-38,-20,]),'string':([18,61,],[37,37,]),'endline':([18,61,],[38,38,]),'then':([20,28,33,51,52,53,54,55,56,82,83,84,106,117,131,133,134,140,149,150,160,165,166,167,170,171,173,175,],[41,-25,-27,-43,-47,-51,-70,-71,-72,-60,-61,-62,-52,-87,-26,-74,-76,153,-44,-48,-87,-96,168,-97,174,-42,-98,-41,]),'closedBra':([25,47,130,147,],[-100,73,-101,159,]),'closedParen':([27,28,33,50,51,52,53,54,55,56,74,75,82,83,84,94,95,96,106,107,116,127,131,132,133,134,139,144,148,149,150,152,154,155,156,162,163,164,],[49,-25,-27,-106,-43,-47,-51,-70,-71,-72,106,-29,-60,-61,-62,117,-53,-55,-52,131,139,-85,-26,-107,-74,-76,-58,-59,-28,-44,-48,160,-79,-81,-84,-54,-56,-57,]),'rea':([27,48,57,60,66,76,77,78,79,80,81,93,98,99,108,109,110,118,119,120,121,122,123,124,125,126,137,141,142,143,157,],[56,56,56,56,56,-73,-45,-46,-75,-49,-50,56,56,56,56,56,56,-80,-82,-83,-63,-64,-65,-66,-67,-68,56,56,56,56,56,]),'coma':([28,31,32,33,34,35,36,37,38,42,45,46,50,51,52,53,54,55,56,59,62,63,64,75,82,83,84,86,87,88,89,104,106,112,128,131,133,134,135,145,149,150,165,167,],[-25,58,-70,-27,61,-32,-70,-104,-104,69,72,-4,-106,-43,-47,-51,-70,-71,-72,-105,-103,-35,-36,108,-60,-61,-62,-70,-30,-33,-34,-5,-52,-105,-95,-26,-74,-76,-31,157,-44,-48,-96,169,]),'mul':([28,33,51,52,53,54,55,56,82,83,84,106,131,133,134,150,],[-25,-27,80,-47,-51,-70,-71,-72,-60,-61,-62,-52,-26,80,-76,-48,]),'div':([28,33,51,52,53,54,55,56,82,83,84,106,131,133,134,150,],[-25,-27,81,-47,-51,-70,-71,-72,-60,-61,-62,-52,-26,81,-76,-48,]),'plus':([28,33,50,51,52,53,54,55,56,74,82,83,84,85,106,128,131,132,133,134,149,150,165,],[-25,-27,77,-43,-47,-51,-70,-71,-72,77,-60,-61,-62,77,-52,77,-26,77,-74,-76,-44,-48,77,]),'minus':([28,33,50,51,52,53,54,55,56,74,82,83,84,85,106,128,131,132,133,134,149,150,165,],[-25,-27,78,-43,-47,-51,-70,-71,-72,78,-60,-61,-62,78,-52,78,-26,78,-74,-76,-44,-48,78,]),'less':([28,33,54,55,56,82,83,84,97,131,],[-25,-27,-70,-71,-72,-60,-61,-62,121,-26,]),'more':([28,33,54,55,56,82,83,84,97,131,],[-25,-27,-70,-71,-72,-60,-61,-62,122,-26,]),'doubleEquals':([28,33,54,55,56,82,83,84,97,131,],[-25,-27,-70,-71,-72,-60,-61,-62,123,-26,]),'notEquals':([28,33,54,55,56,82,83,84,97,131,],[-25,-27,-70,-71,-72,-60,-61,-62,124,-26,]),'lessEquals':([28,33,54,55,56,82,83,84,97,131,],[-25,-27,-70,-71,-72,-60,-61,-62,125,-26,]),'moreEquals':([28,33,54,55,56,82,83,84,97,131,],[-25,-27,-70,-71,-72,-60,-61,-62,126,-26,]),'and':([28,33,54,55,56,82,83,84,95,96,127,131,139,144,154,155,156,162,163,164,],[-25,-27,-70,-71,-72,-60,-61,-62,119,-55,-85,-26,-58,-59,119,-81,-84,-54,-56,-57,]),'or':([28,33,54,55,56,82,83,84,94,95,96,116,127,131,139,144,152,154,155,156,162,163,164,],[-25,-27,-70,-71,-72,-60,-61,-62,118,-53,-55,118,118,-26,-58,-59,118,-79,-81,-84,-54,-56,-57,]),'not':([66,93,98,118,119,137,141,142,],[98,98,98,-80,-82,98,98,98,]),} +_lr_action_items = {'program':([0,19,],[2,35,]),'$end':([1,35,],[0,-1,]),'id':([2,3,4,5,6,10,11,14,15,16,20,22,23,25,26,27,28,29,30,32,33,34,36,37,38,39,40,41,42,43,44,47,49,50,51,52,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,70,72,74,75,77,78,82,83,84,85,86,87,88,89,90,91,92,95,96,101,102,103,104,105,107,109,110,111,112,115,118,119,120,121,122,123,124,125,126,130,132,134,135,136,137,138,141,142,143,149,150,151,153,157,158,160,167,171,173,175,178,],[-104,4,-3,-12,-105,-14,15,18,-106,30,-13,39,39,46,39,-91,-14,-68,-4,-108,-69,39,39,-17,-103,-26,-18,-31,-101,-102,-102,-89,-23,18,-100,78,-16,-24,39,-42,-46,-50,-59,-70,-71,-76,39,-29,39,-33,-34,-35,39,-14,39,-2,-5,-72,-44,-45,-74,-48,-49,-60,-61,-15,-103,-32,-87,39,39,39,18,-22,-107,-51,39,39,39,-30,-14,-78,-80,-81,-62,-63,-64,-65,-66,-67,-11,-25,-73,-75,-88,39,18,39,39,39,-43,-47,-19,-14,39,-21,18,-14,18,-14,18,-20,]),'integer':([4,5,29,30,51,77,78,],[-3,8,-68,-4,-100,-2,-5,]),'real':([4,5,29,30,51,77,78,],[-3,9,-68,-4,-100,-2,-5,]),'subroutine':([4,5,6,29,30,51,76,77,78,105,130,],[-3,-12,11,-68,-4,-100,105,-2,-5,-107,-11,]),'end':([4,5,6,10,14,15,20,27,28,29,30,32,33,37,38,39,40,41,42,43,44,47,49,50,51,54,55,58,59,60,61,62,63,64,66,68,69,70,71,74,77,78,88,89,90,91,92,93,95,103,104,105,107,112,115,129,130,132,134,135,136,138,149,150,151,153,158,160,167,171,173,175,176,178,],[-3,-12,-105,-14,19,-106,-13,-91,-14,-68,-4,-108,-69,-17,-103,-26,-18,-31,-101,-102,-102,-89,-23,76,-100,-16,-24,-42,-46,-50,-59,-70,-71,-76,-29,-33,-34,-35,-39,-14,-2,-5,-60,-61,-15,-103,-32,113,-87,-90,-22,-107,-51,-30,-14,146,-11,-25,-73,-75,-88,-38,-43,-47,-19,-14,-21,-36,-14,-37,-14,-97,177,-20,]),'read':([4,5,6,10,14,15,20,27,28,29,30,32,33,37,38,39,40,41,42,43,44,47,49,50,51,54,55,58,59,60,61,62,63,64,66,68,69,70,74,77,78,88,89,90,91,92,95,103,104,105,107,112,115,130,132,134,135,136,138,149,150,151,153,158,160,167,171,173,175,178,],[-3,-12,-105,-14,22,-106,-13,-91,-14,-68,-4,-108,-69,-17,-103,-26,-18,-31,-101,-102,-102,-89,-23,22,-100,-16,-24,-42,-46,-50,-59,-70,-71,-76,-29,-33,-34,-35,-14,-2,-5,-60,-61,-15,-103,-32,-87,22,-22,-107,-51,-30,-14,-11,-25,-73,-75,-88,22,-43,-47,-19,-14,-21,22,-14,22,-14,22,-20,]),'print':([4,5,6,10,14,15,20,27,28,29,30,32,33,37,38,39,40,41,42,43,44,47,49,50,51,54,55,58,59,60,61,62,63,64,66,68,69,70,74,77,78,88,89,90,91,92,95,103,104,105,107,112,115,130,132,134,135,136,138,149,150,151,153,158,160,167,171,173,175,178,],[-3,-12,-105,-14,23,-106,-13,-91,-14,-68,-4,-108,-69,-17,-103,-26,-18,-31,-101,-102,-102,-89,-23,23,-100,-16,-24,-42,-46,-50,-59,-70,-71,-76,-29,-33,-34,-35,-14,-2,-5,-60,-61,-15,-103,-32,-87,23,-22,-107,-51,-30,-14,-11,-25,-73,-75,-88,23,-43,-47,-19,-14,-21,23,-14,23,-14,23,-20,]),'if':([4,5,6,10,14,15,20,27,28,29,30,32,33,37,38,39,40,41,42,43,44,47,49,50,51,54,55,58,59,60,61,62,63,64,66,68,69,70,74,77,78,88,89,90,91,92,95,103,104,105,107,112,113,115,130,132,134,135,136,138,149,150,151,153,158,160,167,171,173,175,178,],[-3,-12,-105,-14,24,-106,-13,-91,-14,-68,-4,-108,-69,-17,-103,-26,-18,-31,-101,-102,-102,-89,-23,24,-100,-16,-24,-42,-46,-50,-59,-70,-71,-76,-29,-33,-34,-35,-14,-2,-5,-60,-61,-15,-103,-32,-87,24,-22,-107,-51,-30,136,-14,-11,-25,-73,-75,-88,24,-43,-47,-19,-14,-21,24,-14,24,-14,24,-20,]),'do':([4,5,6,10,14,15,20,27,28,29,30,32,33,37,38,39,40,41,42,43,44,47,49,50,51,54,55,58,59,60,61,62,63,64,66,68,69,70,74,77,78,88,89,90,91,92,95,103,104,105,107,112,115,130,132,134,135,136,138,146,149,150,151,153,158,160,167,171,173,175,177,178,],[-3,-12,-105,-14,25,-106,-13,-91,-14,-68,-4,-108,-69,-17,-103,-26,-18,-31,-101,-102,-102,-89,-23,25,-100,-16,-24,-42,-46,-50,-59,-70,-71,-76,-29,-33,-34,-35,-14,-2,-5,-60,-61,-15,-103,-32,-87,25,-22,-107,-51,-30,-14,-11,-25,-73,-75,-88,25,158,-43,-47,-19,-14,-21,25,-14,25,-14,25,178,-20,]),'swap':([4,5,6,10,14,15,20,27,28,29,30,32,33,37,38,39,40,41,42,43,44,47,49,50,51,54,55,58,59,60,61,62,63,64,66,68,69,70,74,77,78,88,89,90,91,92,95,103,104,105,107,112,115,130,132,134,135,136,138,149,150,151,153,158,160,167,171,173,175,178,],[-3,-12,-105,-14,26,-106,-13,-91,-14,-68,-4,-108,-69,-17,-103,-26,-18,-31,-101,-102,-102,-89,-23,26,-100,-16,-24,-42,-46,-50,-59,-70,-71,-76,-29,-33,-34,-35,-14,-2,-5,-60,-61,-15,-103,-32,-87,26,-22,-107,-51,-30,-14,-11,-25,-73,-75,-88,26,-43,-47,-19,-14,-21,26,-14,26,-14,26,-20,]),'exit':([4,5,6,10,14,15,20,27,28,29,30,32,33,37,38,39,40,41,42,43,44,47,49,50,51,54,55,58,59,60,61,62,63,64,66,68,69,70,74,77,78,88,89,90,91,92,95,103,104,105,107,112,115,130,132,134,135,136,138,149,150,151,153,158,160,167,171,173,175,178,],[-3,-12,-105,-14,27,-106,-13,-91,-14,-68,-4,-108,-69,-17,-103,-26,-18,-31,-101,-102,-102,-89,-23,27,-100,-16,-24,-42,-46,-50,-59,-70,-71,-76,-29,-33,-34,-35,-14,-2,-5,-60,-61,-15,-103,-32,-87,27,-22,-107,-51,-30,-14,-11,-25,-73,-75,-88,27,-43,-47,-19,-14,-21,27,-14,27,-14,27,-20,]),'openBra':([7,8,9,53,],[13,-6,-7,79,]),'doubleColon':([7,8,9,12,53,147,],[-10,-6,-7,16,-8,-9,]),'int':([13,34,36,56,72,79,82,83,84,85,86,87,96,101,102,109,110,111,118,119,120,121,122,123,124,125,126,137,141,142,143,157,168,],[17,62,62,62,62,106,-72,-44,-45,-74,-48,-49,62,62,62,62,62,62,-78,-80,-81,-62,-63,-64,-65,-66,-67,62,62,62,62,62,172,]),'closedBra':([17,31,106,131,],[-98,53,-99,147,]),'parens':([18,],[32,]),'openParen':([18,24,34,36,39,45,56,72,82,83,84,85,86,87,94,96,101,102,109,110,111,114,118,119,137,141,142,157,],[34,-84,56,56,34,72,56,96,-72,-44,-45,-74,-48,-49,-86,96,96,56,56,56,56,137,-78,-80,96,96,96,56,]),'equals':([18,21,33,46,55,73,132,],[-26,36,-69,-92,-24,102,-25,]),'elif':([20,27,32,33,37,38,39,40,41,42,43,44,49,54,55,58,59,60,61,62,63,64,66,68,69,70,71,88,89,90,91,92,104,107,112,132,134,135,136,149,150,151,153,158,160,167,171,178,],[-13,-91,-108,-69,-17,-103,-26,-18,-31,-101,-102,-102,-23,-16,-24,-42,-46,-50,-59,-70,-71,-76,-29,-33,-34,-35,94,-60,-61,-15,-103,-32,-22,-51,-30,-25,-73,-75,-88,-43,-47,-19,-14,-21,-36,-14,-37,-20,]),'else':([20,27,32,33,37,38,39,40,41,42,43,44,49,54,55,58,59,60,61,62,63,64,66,68,69,70,71,88,89,90,91,92,104,107,112,132,134,135,136,149,150,151,153,158,160,167,171,178,],[-13,-91,-108,-69,-17,-103,-26,-18,-31,-101,-102,-102,-23,-16,-24,-42,-46,-50,-59,-70,-71,-76,-29,-33,-34,-35,95,-60,-61,-15,-103,-32,-22,-51,-30,-25,-73,-75,-88,-43,-47,-19,-14,-21,-36,-14,-37,-20,]),'string':([23,67,],[43,43,]),'endline':([23,67,],[44,44,]),'then':([25,33,39,55,58,59,60,61,62,63,88,89,107,117,132,134,135,140,149,150,159,164,165,166,169,170,172,174,],[47,-69,-26,-24,-42,-46,-50,-59,-70,-71,-60,-61,-51,-85,-25,-73,-75,153,-43,-47,-85,-94,167,-95,173,-41,-96,-40,]),'coma':([29,30,33,37,38,39,40,41,42,43,44,48,55,57,58,59,60,61,62,63,66,68,69,70,78,81,88,89,91,92,107,112,128,132,134,135,145,149,150,164,166,],[52,-4,-69,65,-103,-26,67,-31,-101,-102,-102,75,-24,-109,-42,-46,-50,-59,-70,-71,-29,-33,-34,-35,-5,109,-60,-61,-103,-32,-51,-30,-93,-25,-73,-75,157,-43,-47,-94,168,]),'mul':([33,39,55,58,59,60,61,62,63,88,89,107,132,134,135,150,],[-69,-26,-24,86,-46,-50,-59,-70,-71,-60,-61,-51,-25,86,-75,-47,]),'div':([33,39,55,58,59,60,61,62,63,88,89,107,132,134,135,150,],[-69,-26,-24,87,-46,-50,-59,-70,-71,-60,-61,-51,-25,87,-75,-47,]),'plus':([33,39,55,57,58,59,60,61,62,63,64,80,88,89,107,128,132,133,134,135,149,150,164,],[-69,-26,-24,83,-42,-46,-50,-59,-70,-71,83,83,-60,-61,-51,83,-25,83,-73,-75,-43,-47,83,]),'minus':([33,39,55,57,58,59,60,61,62,63,64,80,88,89,107,128,132,133,134,135,149,150,164,],[-69,-26,-24,84,-42,-46,-50,-59,-70,-71,84,84,-60,-61,-51,84,-25,84,-73,-75,-43,-47,84,]),'closedParen':([33,39,55,57,58,59,60,61,62,63,80,81,88,89,97,98,99,107,108,116,127,132,133,134,135,139,144,148,149,150,152,154,155,156,161,162,163,],[-69,-26,-24,-109,-42,-46,-50,-59,-70,-71,107,-28,-60,-61,117,-52,-54,-51,132,139,-83,-25,-110,-73,-75,-57,-58,-27,-43,-47,159,-77,-79,-82,-53,-55,-56,]),'less':([33,39,55,61,62,63,88,89,100,132,],[-69,-26,-24,-59,-70,-71,-60,-61,121,-25,]),'more':([33,39,55,61,62,63,88,89,100,132,],[-69,-26,-24,-59,-70,-71,-60,-61,122,-25,]),'doubleEquals':([33,39,55,61,62,63,88,89,100,132,],[-69,-26,-24,-59,-70,-71,-60,-61,123,-25,]),'notEquals':([33,39,55,61,62,63,88,89,100,132,],[-69,-26,-24,-59,-70,-71,-60,-61,124,-25,]),'lessEquals':([33,39,55,61,62,63,88,89,100,132,],[-69,-26,-24,-59,-70,-71,-60,-61,125,-25,]),'moreEquals':([33,39,55,61,62,63,88,89,100,132,],[-69,-26,-24,-59,-70,-71,-60,-61,126,-25,]),'and':([33,39,55,61,62,63,88,89,98,99,127,132,139,144,154,155,156,161,162,163,],[-69,-26,-24,-59,-70,-71,-60,-61,119,-54,-83,-25,-57,-58,119,-79,-82,-53,-55,-56,]),'or':([33,39,55,61,62,63,88,89,97,98,99,116,127,132,139,144,152,154,155,156,161,162,163,],[-69,-26,-24,-59,-70,-71,-60,-61,118,-52,-54,118,118,-25,-57,-58,118,-77,-79,-82,-53,-55,-56,]),'rea':([34,36,56,72,82,83,84,85,86,87,96,101,102,109,110,111,118,119,120,121,122,123,124,125,126,137,141,142,143,157,],[63,63,63,63,-72,-44,-45,-74,-48,-49,63,63,63,63,63,63,-78,-80,-81,-62,-63,-64,-65,-66,-67,63,63,63,63,63,]),'not':([72,96,101,118,119,137,141,142,],[101,101,101,-78,-80,101,101,101,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): @@ -17,7 +17,7 @@ for _k, _v in _lr_action_items.items(): _lr_action[_x][_k] = _y del _lr_action_items -_lr_goto_items = {'programa':([0,],[1,]),'V':([3,],[4,]),'F':([4,],[5,]),'Tipo':([4,],[6,]),'B':([5,23,68,115,153,168,174,],[9,44,100,138,161,172,176,]),'Dim':([6,],[11,]),'S':([9,44,100,138,161,172,176,],[15,15,15,15,15,15,15,]),'Dimensional':([9,17,18,21,27,44,48,57,58,60,61,66,69,93,98,99,100,108,109,110,137,138,141,142,143,157,161,172,176,],[16,32,36,42,54,16,54,54,86,54,36,54,101,54,54,54,16,54,54,54,54,16,54,54,54,54,16,16,16,]),'DimensionsOrEmpty':([13,33,],[28,28,]),'action_7':([16,],[30,]),'RDimensional':([17,],[31,]),'RDimOrString':([18,],[34,]),'DimOrString':([18,61,],[35,88,]),'action_16':([19,],[39,]),'action_23':([22,],[43,]),'Rid':([24,],[45,]),'action_30':([25,],[47,]),'EA':([27,48,57,60,99,108,157,],[50,74,85,50,128,132,165,]),'MultDiv':([27,48,57,60,99,108,109,157,],[51,51,51,51,51,51,133,51,]),'EAParens':([27,48,57,60,99,108,109,110,157,],[52,52,52,52,52,52,52,134,52,]),'EItem':([27,48,57,60,66,93,98,99,108,109,110,137,141,142,143,157,],[53,53,53,53,97,97,97,53,53,53,53,97,97,97,156,53,]),'action_1':([32,36,54,86,],[59,62,82,112,]),'action_34':([37,38,],[63,64,]),'Relif':([39,],[65,]),'action_24':([40,],[67,]),'action_21':([41,],[68,]),'action_addSymbols':([45,],[71,]),'action_setDim1':([50,],[75,]),'SumOrSub':([50,74,85,128,132,165,],[76,76,76,76,76,76,]),'MDSymbols':([51,133,],[79,79,]),'action_2':([55,],[83,]),'action_2_rea':([56,],[84,]),'action_36':([59,112,],[87,135,]),'action_33':([62,],[89,]),'ElseOrEmpty':([65,],[90,]),'EL':([66,93,98,137,],[94,116,127,152,]),'AND':([66,93,98,137,141,],[95,95,95,95,154,]),'Equality':([66,93,98,137,141,142,],[96,96,96,96,96,155,]),'action_32':([71,],[103,]),'ComaEAOrEmpty':([75,],[107,]),'action_3':([76,],[109,]),'action_5':([79,],[110,]),'action_8':([85,],[111,]),'action_18':([91,],[114,]),'action_19':([92,],[115,]),'EQSymbols':([97,],[120,]),'action_22':([100,],[129,]),'action_17':([117,160,],[140,166,]),'action_10':([118,],[141,]),'action_12':([119,],[142,]),'action_13':([120,],[143,]),'action_15':([127,],[144,]),'action_25':([128,],[145,]),'action_31':([130,],[147,]),'action_setDim2':([132,],[148,]),'action_4':([133,],[149,]),'action_6':([134,],[150,]),'action_20':([136,],[151,]),'action_9':([154,],[162,]),'action_11':([155,],[163,]),'action_14':([156,],[164,]),'action_26':([165,],[167,]),'IntOrEmpty':([167,],[170,]),'action_27':([167,],[171,]),'action_28':([173,],[175,]),'action_29':([176,],[177,]),} +_lr_goto_items = {'programa':([0,],[1,]),'action_37':([2,],[3,]),'V':([4,],[5,]),'F':([5,],[6,]),'Tipo':([5,],[7,]),'action_38':([6,],[10,]),'Dim':([7,],[12,]),'B':([10,28,74,115,153,167,173,],[14,50,103,138,160,171,175,]),'S':([14,50,103,138,160,171,175,],[20,20,20,20,20,20,20,]),'Dimensional':([14,22,23,26,34,36,50,56,65,67,72,75,96,101,102,103,109,110,111,137,138,141,142,143,157,160,171,175,],[21,38,42,48,61,61,21,61,91,42,61,104,61,61,61,21,61,61,61,61,21,61,61,61,61,21,21,21,]),'action_39':([15,],[28,]),'Rid':([16,],[29,]),'action_30':([17,],[31,]),'DimensionsOrEmpty':([18,39,],[33,33,]),'RDimensional':([22,],[37,]),'RDimOrString':([23,],[40,]),'DimOrString':([23,67,],[41,92,]),'action_16':([24,],[45,]),'action_23':([27,],[49,]),'action_addSymbols':([29,],[51,]),'action_41':([32,],[54,]),'action_1':([33,],[55,]),'EA':([34,36,56,102,109,157,],[57,64,80,128,133,164,]),'MultDiv':([34,36,56,102,109,110,157,],[58,58,58,58,58,134,58,]),'EAParens':([34,36,56,102,109,110,111,157,],[59,59,59,59,59,59,135,59,]),'EItem':([34,36,56,72,96,101,102,109,110,111,137,141,142,143,157,],[60,60,60,100,100,100,60,60,60,60,100,100,100,156,60,]),'action_36':([38,91,],[66,112,]),'action_33':([42,],[68,]),'action_34':([43,44,],[69,70,]),'Relif':([45,],[71,]),'action_24':([46,],[73,]),'action_21':([47,],[74,]),'action_32':([51,],[77,]),'action_setDim1':([57,],[81,]),'SumOrSub':([57,64,80,128,133,164,],[82,82,82,82,82,82,]),'MDSymbols':([58,134,],[85,85,]),'action_2':([62,],[88,]),'action_2_rea':([63,],[89,]),'action_8':([64,],[90,]),'ElseOrEmpty':([71,],[93,]),'EL':([72,96,101,137,],[97,116,127,152,]),'AND':([72,96,101,137,141,],[98,98,98,98,154,]),'Equality':([72,96,101,137,141,142,],[99,99,99,99,99,155,]),'ComaEAOrEmpty':([81,],[108,]),'action_3':([82,],[110,]),'action_5':([85,],[111,]),'action_18':([94,],[114,]),'action_19':([95,],[115,]),'EQSymbols':([100,],[120,]),'action_22':([103,],[129,]),'action_40':([105,],[130,]),'action_31':([106,],[131,]),'action_17':([117,159,],[140,165,]),'action_10':([118,],[141,]),'action_12':([119,],[142,]),'action_13':([120,],[143,]),'action_15':([127,],[144,]),'action_25':([128,],[145,]),'action_setDim2':([133,],[148,]),'action_4':([134,],[149,]),'action_6':([135,],[150,]),'action_20':([136,],[151,]),'action_9':([154,],[161,]),'action_11':([155,],[162,]),'action_14':([156,],[163,]),'action_26':([164,],[166,]),'IntOrEmpty':([166,],[169,]),'action_27':([166,],[170,]),'action_28':([172,],[174,]),'action_29':([175,],[176,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): @@ -27,111 +27,114 @@ for _k, _v in _lr_goto_items.items(): del _lr_goto_items _lr_productions = [ ("S' -> programa","S'",1,None,None,None), - ('programa -> program id V F B end program','programa',7,'p_programa','fort.py',226), - ('V -> V Tipo Dim doubleColon Rid action_addSymbols action_32','V',7,'p_V','fort.py',233), - ('V -> ','V',0,'p_V','fort.py',234), - ('Rid -> id','Rid',1,'p_Rid','fort.py',240), - ('Rid -> Rid coma id','Rid',3,'p_Rid','fort.py',241), - ('Tipo -> integer','Tipo',1,'p_Tipo','fort.py',253), - ('Tipo -> real','Tipo',1,'p_Tipo','fort.py',254), - ('Dim -> openBra int action_30 closedBra','Dim',4,'p_Dim','fort.py',262), - ('Dim -> openBra int action_30 closedBra openBra int action_31 closedBra','Dim',8,'p_Dim','fort.py',263), - ('Dim -> ','Dim',0,'p_Dim','fort.py',264), - ('F -> F subroutine id B end subroutine','F',6,'p_F','fort.py',270), - ('F -> ','F',0,'p_F','fort.py',271), - ('B -> B S','B',2,'p_B','fort.py',277), - ('B -> ','B',0,'p_B','fort.py',278), - ('S -> Dimensional action_7 equals EA action_8','S',5,'p_S','fort.py',284), - ('S -> id parens','S',2,'p_S','fort.py',285), - ('S -> read RDimensional','S',2,'p_S','fort.py',286), - ('S -> print RDimOrString','S',2,'p_S','fort.py',287), - ('S -> if action_16 Relif ElseOrEmpty end if action_20','S',7,'p_S','fort.py',288), - ('S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do','S',15,'p_S','fort.py',289), - ('S -> do then action_21 B action_22 end do','S',7,'p_S','fort.py',290), - ('S -> swap Dimensional coma Dimensional','S',4,'p_S','fort.py',291), - ('S -> exit action_23','S',2,'p_S','fort.py',292), - ('S -> id openParen closedParen','S',3,'p_S','fort.py',293), - ('Dimensional -> id DimensionsOrEmpty','Dimensional',2,'p_Dimensional','fort.py',301), - ('DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen','DimensionsOrEmpty',5,'p_DimensionsOrEmpty','fort.py',308), - ('DimensionsOrEmpty -> ','DimensionsOrEmpty',0,'p_DimensionsOrEmpty','fort.py',309), - ('ComaEAOrEmpty -> coma EA action_setDim2','ComaEAOrEmpty',3,'p_ComaEAOrEmpty','fort.py',315), - ('ComaEAOrEmpty -> ','ComaEAOrEmpty',0,'p_ComaEAOrEmpty','fort.py',316), - ('RDimensional -> Dimensional action_1 action_36','RDimensional',3,'p_RDimensional','fort.py',322), - ('RDimensional -> RDimensional coma Dimensional action_1 action_36','RDimensional',5,'p_RDimensional','fort.py',323), - ('RDimOrString -> DimOrString','RDimOrString',1,'p_RDimOrString','fort.py',329), - ('RDimOrString -> RDimOrString coma DimOrString','RDimOrString',3,'p_RDimOrString','fort.py',330), - ('DimOrString -> Dimensional action_1 action_33','DimOrString',3,'p_DimOrString','fort.py',336), - ('DimOrString -> string action_34','DimOrString',2,'p_DimOrString','fort.py',337), - ('DimOrString -> endline action_34','DimOrString',2,'p_DimOrString','fort.py',338), - ('Relif -> openParen EL closedParen action_17 then B','Relif',6,'p_Relif','fort.py',344), - ('Relif -> Relif elif action_18 openParen EL closedParen action_17 then B','Relif',9,'p_Relif','fort.py',345), - ('ElseOrEmpty -> else action_19 B','ElseOrEmpty',3,'p_ElseOrEmpty','fort.py',351), - ('ElseOrEmpty -> ','ElseOrEmpty',0,'p_ElseOrEmpty','fort.py',352), - ('IntOrEmpty -> coma int action_28','IntOrEmpty',3,'p_IntOrEmpty','fort.py',358), - ('IntOrEmpty -> action_27','IntOrEmpty',1,'p_IntOrEmpty','fort.py',359), - ('EA -> MultDiv','EA',1,'p_EA','fort.py',365), - ('EA -> EA SumOrSub action_3 MultDiv action_4','EA',5,'p_EA','fort.py',366), - ('SumOrSub -> plus','SumOrSub',1,'p_SumOrSub','fort.py',372), - ('SumOrSub -> minus','SumOrSub',1,'p_SumOrSub','fort.py',373), - ('MultDiv -> EAParens','MultDiv',1,'p_MultDiv','fort.py',380), - ('MultDiv -> MultDiv MDSymbols action_5 EAParens action_6','MultDiv',5,'p_MultDiv','fort.py',381), - ('MDSymbols -> mul','MDSymbols',1,'p_MDSymbols','fort.py',387), - ('MDSymbols -> div','MDSymbols',1,'p_MDSymbols','fort.py',388), - ('EAParens -> EItem','EAParens',1,'p_EAParens','fort.py',395), - ('EAParens -> openParen EA closedParen','EAParens',3,'p_EAParens','fort.py',396), - ('EL -> AND','EL',1,'p_EL','fort.py',402), - ('EL -> EL or action_10 AND action_9','EL',5,'p_EL','fort.py',403), - ('AND -> Equality','AND',1,'p_AND','fort.py',409), - ('AND -> AND and action_12 Equality action_11','AND',5,'p_AND','fort.py',410), - ('Equality -> EItem EQSymbols action_13 EItem action_14','Equality',5,'p_Equality','fort.py',416), - ('Equality -> openParen EL closedParen','Equality',3,'p_Equality','fort.py',417), - ('Equality -> not EL action_15','Equality',3,'p_Equality','fort.py',418), - ('EItem -> Dimensional action_1','EItem',2,'p_EItem','fort.py',424), - ('EItem -> int action_2','EItem',2,'p_EItem','fort.py',425), - ('EItem -> rea action_2_rea','EItem',2,'p_EItem','fort.py',426), - ('EQSymbols -> less','EQSymbols',1,'p_EQSymbols','fort.py',432), - ('EQSymbols -> more','EQSymbols',1,'p_EQSymbols','fort.py',433), - ('EQSymbols -> doubleEquals','EQSymbols',1,'p_EQSymbols','fort.py',434), - ('EQSymbols -> notEquals','EQSymbols',1,'p_EQSymbols','fort.py',435), - ('EQSymbols -> lessEquals','EQSymbols',1,'p_EQSymbols','fort.py',436), - ('EQSymbols -> moreEquals','EQSymbols',1,'p_EQSymbols','fort.py',437), - ('action_addSymbols -> ','action_addSymbols',0,'p_action_addSymbols','fort.py',447), - ('action_1 -> ','action_1',0,'p_action_1','fort.py',453), - ('action_2 -> ','action_2',0,'p_action_2','fort.py',500), - ('action_2_rea -> ','action_2_rea',0,'p_action_2_rea','fort.py',506), - ('action_3 -> ','action_3',0,'p_action_3','fort.py',512), - ('action_4 -> ','action_4',0,'p_action_4','fort.py',517), - ('action_5 -> ','action_5',0,'p_action_5','fort.py',540), - ('action_6 -> ','action_6',0,'p_action_6','fort.py',545), - ('action_7 -> ','action_7',0,'p_action_7','fort.py',568), - ('action_8 -> ','action_8',0,'p_action_8','fort.py',615), - ('action_9 -> ','action_9',0,'p_action_9','fort.py',633), - ('action_10 -> ','action_10',0,'p_action_10','fort.py',656), - ('action_11 -> ','action_11',0,'p_action_11','fort.py',661), - ('action_12 -> ','action_12',0,'p_action_12','fort.py',684), - ('action_13 -> ','action_13',0,'p_action_13','fort.py',689), - ('action_14 -> ','action_14',0,'p_action_14','fort.py',694), - ('action_15 -> ','action_15',0,'p_action_15','fort.py',717), - ('action_16 -> ','action_16',0,'p_action_16','fort.py',732), - ('action_17 -> ','action_17',0,'p_action_17','fort.py',737), - ('action_18 -> ','action_18',0,'p_action_18','fort.py',753), - ('action_19 -> ','action_19',0,'p_action_19','fort.py',763), - ('action_20 -> ','action_20',0,'p_action_20','fort.py',773), - ('action_21 -> ','action_21',0,'p_action_21','fort.py',781), - ('action_22 -> ','action_22',0,'p_action_22','fort.py',787), - ('action_23 -> ','action_23',0,'p_action_23','fort.py',800), - ('action_24 -> ','action_24',0,'p_action_24','fort.py',809), - ('action_25 -> ','action_25',0,'p_action_25','fort.py',823), - ('action_26 -> ','action_26',0,'p_action_26','fort.py',841), - ('action_27 -> ','action_27',0,'p_action_27','fort.py',867), - ('action_28 -> ','action_28',0,'p_action_28','fort.py',873), - ('action_29 -> ','action_29',0,'p_action_29','fort.py',879), - ('action_30 -> ','action_30',0,'p_action_30','fort.py',903), - ('action_31 -> ','action_31',0,'p_action_31','fort.py',911), - ('action_32 -> ','action_32',0,'p_action_32','fort.py',919), - ('action_33 -> ','action_33',0,'p_action_33','fort.py',929), - ('action_34 -> ','action_34',0,'p_action_34','fort.py',938), - ('action_36 -> ','action_36',0,'p_action_36','fort.py',952), - ('action_setDim1 -> ','action_setDim1',0,'p_action_setDim1','fort.py',961), - ('action_setDim2 -> ','action_setDim2',0,'p_action_setDim2','fort.py',973), + ('programa -> program action_37 id V F action_38 B end program','programa',9,'p_programa','fort.py',225), + ('V -> V Tipo Dim doubleColon Rid action_addSymbols action_32','V',7,'p_V','fort.py',232), + ('V -> ','V',0,'p_V','fort.py',233), + ('Rid -> id','Rid',1,'p_Rid','fort.py',239), + ('Rid -> Rid coma id','Rid',3,'p_Rid','fort.py',240), + ('Tipo -> integer','Tipo',1,'p_Tipo','fort.py',252), + ('Tipo -> real','Tipo',1,'p_Tipo','fort.py',253), + ('Dim -> openBra int action_30 closedBra','Dim',4,'p_Dim','fort.py',261), + ('Dim -> openBra int action_30 closedBra openBra int action_31 closedBra','Dim',8,'p_Dim','fort.py',262), + ('Dim -> ','Dim',0,'p_Dim','fort.py',263), + ('F -> F subroutine id action_39 B end subroutine action_40','F',8,'p_F','fort.py',269), + ('F -> ','F',0,'p_F','fort.py',270), + ('B -> B S','B',2,'p_B','fort.py',276), + ('B -> ','B',0,'p_B','fort.py',277), + ('S -> Dimensional equals EA action_8','S',4,'p_S','fort.py',283), + ('S -> id parens action_41','S',3,'p_S','fort.py',284), + ('S -> read RDimensional','S',2,'p_S','fort.py',285), + ('S -> print RDimOrString','S',2,'p_S','fort.py',286), + ('S -> if action_16 Relif ElseOrEmpty end if action_20','S',7,'p_S','fort.py',287), + ('S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do','S',15,'p_S','fort.py',288), + ('S -> do then action_21 B action_22 end do','S',7,'p_S','fort.py',289), + ('S -> swap Dimensional coma Dimensional','S',4,'p_S','fort.py',290), + ('S -> exit action_23','S',2,'p_S','fort.py',291), + ('Dimensional -> id DimensionsOrEmpty action_1','Dimensional',3,'p_Dimensional','fort.py',299), + ('DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen','DimensionsOrEmpty',5,'p_DimensionsOrEmpty','fort.py',306), + ('DimensionsOrEmpty -> ','DimensionsOrEmpty',0,'p_DimensionsOrEmpty','fort.py',307), + ('ComaEAOrEmpty -> coma EA action_setDim2','ComaEAOrEmpty',3,'p_ComaEAOrEmpty','fort.py',313), + ('ComaEAOrEmpty -> ','ComaEAOrEmpty',0,'p_ComaEAOrEmpty','fort.py',314), + ('RDimensional -> Dimensional action_36','RDimensional',2,'p_RDimensional','fort.py',320), + ('RDimensional -> RDimensional coma Dimensional action_36','RDimensional',4,'p_RDimensional','fort.py',321), + ('RDimOrString -> DimOrString','RDimOrString',1,'p_RDimOrString','fort.py',327), + ('RDimOrString -> RDimOrString coma DimOrString','RDimOrString',3,'p_RDimOrString','fort.py',328), + ('DimOrString -> Dimensional action_33','DimOrString',2,'p_DimOrString','fort.py',334), + ('DimOrString -> string action_34','DimOrString',2,'p_DimOrString','fort.py',335), + ('DimOrString -> endline action_34','DimOrString',2,'p_DimOrString','fort.py',336), + ('Relif -> openParen EL closedParen action_17 then B','Relif',6,'p_Relif','fort.py',342), + ('Relif -> Relif elif action_18 openParen EL closedParen action_17 then B','Relif',9,'p_Relif','fort.py',343), + ('ElseOrEmpty -> else action_19 B','ElseOrEmpty',3,'p_ElseOrEmpty','fort.py',349), + ('ElseOrEmpty -> ','ElseOrEmpty',0,'p_ElseOrEmpty','fort.py',350), + ('IntOrEmpty -> coma int action_28','IntOrEmpty',3,'p_IntOrEmpty','fort.py',356), + ('IntOrEmpty -> action_27','IntOrEmpty',1,'p_IntOrEmpty','fort.py',357), + ('EA -> MultDiv','EA',1,'p_EA','fort.py',363), + ('EA -> EA SumOrSub action_3 MultDiv action_4','EA',5,'p_EA','fort.py',364), + ('SumOrSub -> plus','SumOrSub',1,'p_SumOrSub','fort.py',370), + ('SumOrSub -> minus','SumOrSub',1,'p_SumOrSub','fort.py',371), + ('MultDiv -> EAParens','MultDiv',1,'p_MultDiv','fort.py',378), + ('MultDiv -> MultDiv MDSymbols action_5 EAParens action_6','MultDiv',5,'p_MultDiv','fort.py',379), + ('MDSymbols -> mul','MDSymbols',1,'p_MDSymbols','fort.py',385), + ('MDSymbols -> div','MDSymbols',1,'p_MDSymbols','fort.py',386), + ('EAParens -> EItem','EAParens',1,'p_EAParens','fort.py',393), + ('EAParens -> openParen EA closedParen','EAParens',3,'p_EAParens','fort.py',394), + ('EL -> AND','EL',1,'p_EL','fort.py',400), + ('EL -> EL or action_10 AND action_9','EL',5,'p_EL','fort.py',401), + ('AND -> Equality','AND',1,'p_AND','fort.py',407), + ('AND -> AND and action_12 Equality action_11','AND',5,'p_AND','fort.py',408), + ('Equality -> EItem EQSymbols action_13 EItem action_14','Equality',5,'p_Equality','fort.py',414), + ('Equality -> openParen EL closedParen','Equality',3,'p_Equality','fort.py',415), + ('Equality -> not EL action_15','Equality',3,'p_Equality','fort.py',416), + ('EItem -> Dimensional','EItem',1,'p_EItem','fort.py',422), + ('EItem -> int action_2','EItem',2,'p_EItem','fort.py',423), + ('EItem -> rea action_2_rea','EItem',2,'p_EItem','fort.py',424), + ('EQSymbols -> less','EQSymbols',1,'p_EQSymbols','fort.py',430), + ('EQSymbols -> more','EQSymbols',1,'p_EQSymbols','fort.py',431), + ('EQSymbols -> doubleEquals','EQSymbols',1,'p_EQSymbols','fort.py',432), + ('EQSymbols -> notEquals','EQSymbols',1,'p_EQSymbols','fort.py',433), + ('EQSymbols -> lessEquals','EQSymbols',1,'p_EQSymbols','fort.py',434), + ('EQSymbols -> moreEquals','EQSymbols',1,'p_EQSymbols','fort.py',435), + ('action_addSymbols -> ','action_addSymbols',0,'p_action_addSymbols','fort.py',445), + ('action_1 -> ','action_1',0,'p_action_1','fort.py',451), + ('action_2 -> ','action_2',0,'p_action_2','fort.py',499), + ('action_2_rea -> ','action_2_rea',0,'p_action_2_rea','fort.py',505), + ('action_3 -> ','action_3',0,'p_action_3','fort.py',511), + ('action_4 -> ','action_4',0,'p_action_4','fort.py',516), + ('action_5 -> ','action_5',0,'p_action_5','fort.py',539), + ('action_6 -> ','action_6',0,'p_action_6','fort.py',544), + ('action_8 -> ','action_8',0,'p_action_8','fort.py',567), + ('action_9 -> ','action_9',0,'p_action_9','fort.py',585), + ('action_10 -> ','action_10',0,'p_action_10','fort.py',608), + ('action_11 -> ','action_11',0,'p_action_11','fort.py',613), + ('action_12 -> ','action_12',0,'p_action_12','fort.py',636), + ('action_13 -> ','action_13',0,'p_action_13','fort.py',641), + ('action_14 -> ','action_14',0,'p_action_14','fort.py',646), + ('action_15 -> ','action_15',0,'p_action_15','fort.py',669), + ('action_16 -> ','action_16',0,'p_action_16','fort.py',684), + ('action_17 -> ','action_17',0,'p_action_17','fort.py',689), + ('action_18 -> ','action_18',0,'p_action_18','fort.py',705), + ('action_19 -> ','action_19',0,'p_action_19','fort.py',715), + ('action_20 -> ','action_20',0,'p_action_20','fort.py',725), + ('action_21 -> ','action_21',0,'p_action_21','fort.py',733), + ('action_22 -> ','action_22',0,'p_action_22','fort.py',739), + ('action_23 -> ','action_23',0,'p_action_23','fort.py',752), + ('action_24 -> ','action_24',0,'p_action_24','fort.py',761), + ('action_25 -> ','action_25',0,'p_action_25','fort.py',775), + ('action_26 -> ','action_26',0,'p_action_26','fort.py',793), + ('action_27 -> ','action_27',0,'p_action_27','fort.py',819), + ('action_28 -> ','action_28',0,'p_action_28','fort.py',825), + ('action_29 -> ','action_29',0,'p_action_29','fort.py',831), + ('action_30 -> ','action_30',0,'p_action_30','fort.py',855), + ('action_31 -> ','action_31',0,'p_action_31','fort.py',863), + ('action_32 -> ','action_32',0,'p_action_32','fort.py',871), + ('action_33 -> ','action_33',0,'p_action_33','fort.py',881), + ('action_34 -> ','action_34',0,'p_action_34','fort.py',890), + ('action_36 -> ','action_36',0,'p_action_36','fort.py',897), + ('action_37 -> ','action_37',0,'p_action_37','fort.py',906), + ('action_38 -> ','action_38',0,'p_action_38','fort.py',913), + ('action_39 -> ','action_39',0,'p_action_39','fort.py',919), + ('action_40 -> ','action_40',0,'p_action_40','fort.py',926), + ('action_41 -> ','action_41',0,'p_action_41','fort.py',933), + ('action_setDim1 -> ','action_setDim1',0,'p_action_setDim1','fort.py',947), + ('action_setDim2 -> ','action_setDim2',0,'p_action_setDim2','fort.py',958), ] diff --git a/final_lang/prueba.fort b/final_lang/prueba.fort index ca9b6cf..b664387 100644 --- a/final_lang/prueba.fort +++ b/final_lang/prueba.fort @@ -2,31 +2,31 @@ program test integer :: option, result, x, y, counter, counter2,factorial, exponential do then - print 'Choose and option' - print '1 - Calculate the factorial of a number' - print '2 - Calculate a number to the power of another number' - print '3 - Calculate e to the power of a number' + print 'Choose and option', endline + print '1 - Calculate the factorial of a number', endline + print '2 - Calculate a number to the power of another number', endline + print '3 - Calculate e to the power of a number', endline read option if (option == 1) then - print 'Enter the number' + print 'Enter the number', endline read x result = 1 do counter = 1, x then result = result * counter end do - print 'The result is : ', result + print 'The result is : ', result, endline elif (option == 2) then - print 'Enter the base' + print 'Enter the base', endline read x - print 'Enter the exponent' + print 'Enter the exponent', endline read y result = 1 do counter = 1, y then result = result * x end do - print 'The result is : ', result + print 'The result is : ', result, endline elif (option == 3) then - print 'Enter the exponent' + print 'Enter the exponent', endline read x result = 0 do counter = 0, 10 then @@ -40,11 +40,11 @@ do then end do result = result + exponential / factorial end do - print 'The result is : ', result + print 'The result is : ', result, endline else - print 'Not a valid option' + print 'Not a valid option', endline end if - print 'Would you like to make another calculation? (type 1 for yes or 0 for no)' + print 'Would you like to make another calculation? (type 1 for yes or 0 for no)', endline read option if (option == 0) then exit diff --git a/final_lang/prueba.fort.out b/final_lang/prueba.fort.out index 1b1908b..d21800b 100644 --- a/final_lang/prueba.fort.out +++ b/final_lang/prueba.fort.out @@ -1,3 +1,4 @@ +goto 2 print 'Choose and option' print endline print '1 - Calculate the factorial of a number' @@ -8,25 +9,25 @@ print '3 - Calculate e to the power of a number' print endline read $50 == $50 1 $0 -gotoF $0 28 +gotoF $0 29 print 'Enter the number' print endline read $52 = 1 $51 = 1 $54 <= $54 $52 $0 -gotoF $0 24 +gotoF $0 25 * $51 $54 $1 = $1 $51 + $54 1 $1 = $1 $54 -goto 17 +goto 18 print 'The result is : ' print $51 print endline -goto 88 +goto 89 == $50 2 $1 -gotoF $1 49 +gotoF $1 50 print 'Enter the base' print endline read $52 @@ -36,59 +37,59 @@ read $53 = 1 $51 = 1 $54 <= $54 $53 $1 -gotoF $1 45 +gotoF $1 46 * $51 $52 $2 = $2 $51 + $54 1 $2 = $2 $54 -goto 38 +goto 39 print 'The result is : ' print $51 print endline -goto 88 +goto 89 == $50 3 $2 -gotoF $2 86 +gotoF $2 87 print 'Enter the exponent' print endline read $52 = 0 $51 = 0 $54 <= $54 10 $2 -gotoF $2 82 +gotoF $2 83 = 1 $56 = 1 $55 <= $55 $54 $3 -gotoF $3 67 +gotoF $3 68 * $56 $55 $4 = $4 $56 + $55 1 $4 = $4 $55 -goto 60 +goto 61 = 1 $57 = 1 $55 <= $55 $54 $4 -gotoF $4 76 +gotoF $4 77 * $57 $52 $5 = $5 $57 + $55 1 $5 = $5 $55 -goto 69 +goto 70 / $57 $56 $5 + $51 $5 $6 = $6 $51 + $54 1 $6 = $6 $54 -goto 56 +goto 57 print 'The result is : ' print $51 print endline -goto 88 +goto 89 print 'Not a valid option' print endline print 'Would you like to make another calculation? (type 1 for yes or 0 for no)' print endline read $50 == $50 0 $6 -gotoF $6 94 -goto 95 -goto 1 +gotoF $6 95 +goto 96 +goto 2 diff --git a/final_lang/spaces.fort b/final_lang/spaces.fort new file mode 100644 index 0000000..a122064 --- /dev/null +++ b/final_lang/spaces.fort @@ -0,0 +1,3 @@ +program test + print 'hello', ' ', 'world', endline +end program \ No newline at end of file diff --git a/final_lang/spaces.fort.out b/final_lang/spaces.fort.out new file mode 100644 index 0000000..68d3441 --- /dev/null +++ b/final_lang/spaces.fort.out @@ -0,0 +1,4 @@ +print 'hello' +print ' ' +print 'world' +print endline diff --git a/final_lang/test2.fort b/final_lang/test2.fort index 0e372eb..c0f0aa4 100644 --- a/final_lang/test2.fort +++ b/final_lang/test2.fort @@ -1,8 +1,23 @@ program test -integer [2][2] :: a -integer :: i, j -a(0,0) = 1 -i = 0 -j = 1 -print a(j,i) +integer [10][10] :: a +integer :: i, j, counter +subroutine fillMatrix + counter = 1 + do i = 0, 9 then + do j = 0, 9 then + a(i,j) = counter + counter = counter + 1 + end do + end do +end subroutine +subroutine printMatrix + do i = 0, 9 then + do j = 0, 9 then + print a(i,j), ' ' + end do + print endline + end do +end subroutine +fillMatrix() +printMatrix() end program \ No newline at end of file diff --git a/final_lang/test2.fort.out b/final_lang/test2.fort.out index 93f5c07..45c0246 100644 --- a/final_lang/test2.fort.out +++ b/final_lang/test2.fort.out @@ -1,7 +1,42 @@ -= 1 $50 -= 0 $55 -= 1 $56 -* 0 2 $54 -+ $55 $54 $54 -+ 50 $54 $54 -print *54 +goto 41 += 1 $153 += 0 $151 +<= $151 9 $0 +gotoF $0 21 += 0 $152 +<= $152 9 $1 +gotoF $1 18 +* $151 10 $150 ++ $152 $150 $150 ++ 50 $150 $150 += $153 *150 ++ $153 1 $2 += $2 $153 ++ $152 1 $2 += $2 $152 +goto 7 ++ $151 1 $2 += $2 $151 +goto 4 +goback += 0 $151 +<= $151 9 $2 +gotoF $2 40 += 0 $152 +<= $152 9 $3 +gotoF $3 36 +* $151 10 $150 ++ $152 $150 $150 ++ 50 $150 $150 +print *150 +print ' ' ++ $152 1 $4 += $4 $152 +goto 26 +print endline ++ $151 1 $4 += $4 $151 +goto 23 +goback +call 2 +call 22