diff --git a/final_lang/exec.py b/final_lang/exec.py new file mode 100644 index 0000000..c610d40 --- /dev/null +++ b/final_lang/exec.py @@ -0,0 +1,185 @@ +import ast +import sys + +normalOperators = ['+', '-', '*', '/', '>', '<', + '<=', '>=', '==', '/=', '.and.', '.or.'] + + +class VarTable: + def __init__(self): + self.symbols = {} + + def setVar(self, direction, value): + realDic = 0 + if direction[0] == '$': + realDic = int(direction[1:]) + elif direction[0] == '*': + realDic = int(self.getVar(direction.replace('*', '$'))) + + self.symbols[realDic] = value + + def getVar(self, direction): + realDic = 0 + if direction[0] == '$': + realDic = int(direction[1:]) + elif direction[0] == '*': + indirectDic = int(direction[1:]) + if indirectDic in self.symbols: + realDic = self.symbols[indirectDic] + else: + raise Exception(f''' + The value at direction {indirectDic} is accessed before initialization. + ''') + + if realDic in self.symbols: + return self.symbols[realDic] + else: + raise Exception(f''' + The value at direction {realDic} is accessed before initialization. + ''') + + +# An instance of the [VarTable] class. +variables = VarTable() + + +def isDirection(operand): + if type(operand) is not str: + return False + if len(operand) > 1 and (operand[0] == '$' or operand[0] == '*'): + return True + return False + + +def isStringLiteral(string): + return string[0] == '\'' and string[len(string) - 1] == '\'' + + +def splitQuad(string): + result = [] + buffer = '' + isStringOpen = False + skip = False + tokens = string.split() + for token in tokens: + if isStringOpen: + buffer += ' ' + buffer += token + if token[len(token) - 1] == '\'': + result.append(buffer) + isStringOpen = False + else: + if token[0] == '\'': + if token[len(token) - 1] == '\'': + result.append(token) + else: + buffer = token + isStringOpen = True + else: + result.append(token) + return result + + +def evalOperation(operator, operand1, operand2): + value1 = 0 + value2 = 0 + if isDirection(operand1): + value1 = variables.getVar(operand1) + else: + value1 = ast.literal_eval(operand1) + + if isDirection(operand2): + value2 = variables.getVar(operand2) + else: + value2 = ast.literal_eval(operand2) + + if operator == '+': + return value1 + value2 + elif operator == '-': + return value1 - value2 + elif operator == '*': + return value1 * value2 + elif operator == '/': + return value1 / value2 + elif operator == '>': + return value1 > value2 + elif operator == '<': + return value1 < value2 + elif operator == '>=': + return value1 >= value2 + elif operator == '<=': + return value1 <= value2 + elif operator == '==': + return value1 == value2 + elif operator == '/=': + return value1 != value2 + elif operator == '.and.': + return value1 and value2 + elif operator == '.or.': + return value1 or value2 + + +def execute(quads): + # Index of the quadruplet currently being executes. + currentQuad = 1 + + while currentQuad <= len(quads): + tokens = splitQuad(quads[currentQuad - 1]) + # ---------- print operation + if tokens[0] == 'print': + if tokens[1] == 'endline': + # adding a new line + print('') + elif isStringLiteral(tokens[1]): + print(tokens[1].replace('\'', ''), end='') + else: + value = variables.getVar(tokens[1]) + print(value, end='') + # ---------- read operation + elif tokens[0] == 'read': + value = input() + variables.setVar(tokens[1], ast.literal_eval(value)) + # ---------- arithmetic and logical operations + elif tokens[0] in normalOperators: + result = evalOperation(tokens[0], tokens[1], tokens[2]) + variables.setVar(tokens[3], result) + # ---------- assign operation + elif tokens[0] == '=': + newValue = 0 + if isDirection(tokens[1]): + newValue = variables.getVar(tokens[1]) + else: + newValue = ast.literal_eval(tokens[1]) + variables.setVar(tokens[2], newValue) + # ---------- .not. operation + elif tokens[0] == '.not.': + value = variables.getVar(tokens[1]) + variables.setVar(tokens[2], not value) + # ---------- gotoF operation + elif tokens[0] == 'gotoF': + value = variables.getVar(tokens[1]) + if value == False: + currentQuad = int(tokens[2]) + continue + # ---------- gotoF operation + elif tokens[0] == 'goto': + currentQuad = int(tokens[1]) + continue + currentQuad += 1 + + +if (len(sys.argv) > 1): + programName = sys.argv[1] + programFile = open(programName, "r") + quads = programFile.readlines() + quads = list(map(lambda quad: quad.replace('\n', ''), quads)) + execute(quads) + programFile.close() + +else: + raise Exception(''' + No file name was provided. + Please add the file name as a command line argument + + Example: exec.py test.fort.out + ''') diff --git a/final_lang/fort.py b/final_lang/fort.py index b82a60f..f984602 100644 --- a/final_lang/fort.py +++ b/final_lang/fort.py @@ -127,6 +127,7 @@ tokens = [ 'moreEquals', 'id', 'program', + 'endline', 'end', 'read', 'print', @@ -144,6 +145,7 @@ tokens = [ reserved = { 'program': 'program', + 'endline': 'endline', 'end': 'end', 'read': 'read', 'print': 'print', @@ -169,7 +171,7 @@ t_closedParen = r'\)' t_plus = r'\+' t_minus = r'-' t_mul = r'\*' -t_string = r'\'[a-zA-Z0-9 \t\r\n\f()\[\]\&\!\@\#\$\%\^\-\=\+\/\,]*\'' +t_string = r'\'[a-zA-Z0-9 \?\:\t\r\n\f()\[\]\&\!\@\#\$\%\^\-\=\+\/\,]*\'' t_or = r'\.or\.' t_and = r'\.and\.' t_not = r'\.not\.' @@ -276,12 +278,13 @@ def p_B(p): | ''' + def p_S(p): ''' S : Dimensional action_7 equals EA action_8 | id parens | read RDimensional - | print RDimOrString action_35 + | print RDimOrString | if action_16 Relif ElseOrEmpty end if action_20 | do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do | do then action_21 B action_22 end do @@ -316,8 +319,8 @@ def p_ComaEAOrEmpty(p): def p_RDimensional(p): ''' - RDimensional : Dimensional - | RDimensional coma Dimensional + RDimensional : Dimensional action_1 action_36 + | RDimensional coma Dimensional action_1 action_36 ''' @@ -332,6 +335,7 @@ def p_DimOrString(p): ''' DimOrString : Dimensional action_1 action_33 | string action_34 + | endline action_34 ''' @@ -438,16 +442,12 @@ def p_EQSymbols(p): # -----------------------------PARSER ACTIONS--------------------------------- # ---------------------------------------------------------------------------- + def p_action_addSymbols(p): "action_addSymbols :" for name in p[-1]: addSymbol(name, p[-4]) -############################################################################### -############################################################################### -#WARNING DON'T USE MULTIDIM VARIABLES ELEMENTS ON AE TO CALCULATE ANOTHER INDEX -############################################################################### -############################################################################### def p_action_1(p): "action_1 :" @@ -464,11 +464,14 @@ def p_action_1(p): if dimension2 is not 0: indirectPointer = symbols[p[-1]]['indirectPointer'] if isDirection(globalIndex1) or isDirection(globalIndex2): - resultQuadruplets.append(f'* {globalIndex1} {dimension1} {indirectPointer}\n') + resultQuadruplets.append( + f'* {globalIndex1} {dimension1} {indirectPointer}\n') quadrupletIndex += 1 - resultQuadruplets.append(f'+ {globalIndex2} {indirectPointer} {indirectPointer}\n') + resultQuadruplets.append( + f'+ {globalIndex2} {indirectPointer} {indirectPointer}\n') quadrupletIndex += 1 - resultQuadruplets.append(f'+ {direction} {indirectPointer} {indirectPointer}\n') + resultQuadruplets.append( + f'+ {direction} {indirectPointer} {indirectPointer}\n') quadrupletIndex += 1 operandsStack.append(indirectPointer.replace('$', '*')) else: @@ -477,7 +480,8 @@ def p_action_1(p): elif dimension1 is not 0: indirectPointer = symbols[p[-1]]['indirectPointer'] if isDirection(globalIndex1): - resultQuadruplets.append(f'+ {direction} {globalIndex1} {indirectPointer}\n') + resultQuadruplets.append( + f'+ {direction} {globalIndex1} {indirectPointer}\n') quadrupletIndex += 1 operandsStack.append(indirectPointer.replace('$', '*')) else: @@ -486,7 +490,7 @@ def p_action_1(p): else: operandsStack.append(f'${direction}') sType = symbols[p[-1]]['type'] - #operandsStack.append(f'${direction}') + # operandsStack.append(f'${direction}') typesStack.append(sType) globalIndex1 = 0 globalIndex2 = 0 @@ -575,11 +579,14 @@ def p_action_7(p): if dimension2 is not 0: indirectPointer = symbols[p[-1]]['indirectPointer'] if isDirection(globalIndex1) or isDirection(globalIndex2): - resultQuadruplets.append(f'* {globalIndex1} {dimension1} {indirectPointer}\n') + resultQuadruplets.append( + f'* {globalIndex1} {dimension1} {indirectPointer}\n') quadrupletIndex += 1 - resultQuadruplets.append(f'+ {globalIndex2} {indirectPointer} {indirectPointer}\n') + resultQuadruplets.append( + f'+ {globalIndex2} {indirectPointer} {indirectPointer}\n') quadrupletIndex += 1 - resultQuadruplets.append(f'+ {direction} {indirectPointer} {indirectPointer}\n') + resultQuadruplets.append( + f'+ {direction} {indirectPointer} {indirectPointer}\n') quadrupletIndex += 1 operandsStack.append(indirectPointer.replace('$', '*')) else: @@ -588,7 +595,8 @@ def p_action_7(p): elif dimension1 is not 0: indirectPointer = symbols[p[-1]]['indirectPointer'] if isDirection(globalIndex1): - resultQuadruplets.append(f'+ {direction} {globalIndex1} {indirectPointer}\n') + resultQuadruplets.append( + f'+ {direction} {globalIndex1} {indirectPointer}\n') quadrupletIndex += 1 operandsStack.append(indirectPointer.replace('$', '*')) else: @@ -597,7 +605,7 @@ def p_action_7(p): else: operandsStack.append(f'${direction}') sType = symbols[p[-1]]['type'] - #operandsStack.append(f'${direction}') + # operandsStack.append(f'${direction}') typesStack.append(sType) globalIndex1 = 0 globalIndex2 = 0 @@ -890,6 +898,7 @@ def p_action_29(p): quadrupletIndex += 1 fillGoto(gotoFPosition, quadrupletIndex) + def p_action_30(p): "action_30 :" global globalDimension1 @@ -905,6 +914,7 @@ def p_action_31(p): globalDimension2 = p[-1] globalDimensionalSize *= p[-1] + def p_action_32(p): "action_32 :" global globalDimension1 @@ -914,6 +924,7 @@ def p_action_32(p): globalDimension2 = 0 globalDimensionalSize = 1 + def p_action_33(p): "action_33 :" global quadrupletIndex @@ -930,10 +941,19 @@ def p_action_34(p): quadrupletIndex += 1 -def p_action_35(p): - "action_35 :" +# 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 - resultQuadruplets.append('print "\\n"\n') + operand1 = operandsStack.pop() + type1 = typesStack.pop() + resultQuadruplets.append(f'read {operand1}\n') quadrupletIndex += 1 diff --git a/final_lang/fort.sh b/final_lang/fort.sh new file mode 100755 index 0000000..9b1f53b --- /dev/null +++ b/final_lang/fort.sh @@ -0,0 +1,2 @@ +python3 ./fort.py $1 +python3 ./exec.py "${1}.out" \ No newline at end of file diff --git a/final_lang/fort.sh.out b/final_lang/fort.sh.out new file mode 100644 index 0000000..e69de29 diff --git a/final_lang/parser.out b/final_lang/parser.out index ddaa7d7..8075a04 100644 --- a/final_lang/parser.out +++ b/final_lang/parser.out @@ -20,7 +20,7 @@ Rule 14 B -> Rule 15 S -> Dimensional action_7 equals EA action_8 Rule 16 S -> id parens Rule 17 S -> read RDimensional -Rule 18 S -> print RDimOrString action_35 +Rule 18 S -> print RDimOrString Rule 19 S -> if action_16 Relif ElseOrEmpty end if action_20 Rule 20 S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do Rule 21 S -> do then action_21 B action_22 end do @@ -32,167 +32,169 @@ Rule 26 DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closed Rule 27 DimensionsOrEmpty -> Rule 28 ComaEAOrEmpty -> coma EA action_setDim2 Rule 29 ComaEAOrEmpty -> -Rule 30 RDimensional -> Dimensional -Rule 31 RDimensional -> RDimensional coma Dimensional +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 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 action_1 -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_7 -> -Rule 77 action_8 -> -Rule 78 action_9 -> -Rule 79 action_10 -> -Rule 80 action_11 -> -Rule 81 action_12 -> -Rule 82 action_13 -> -Rule 83 action_14 -> -Rule 84 action_15 -> -Rule 85 action_16 -> -Rule 86 action_17 -> -Rule 87 action_18 -> -Rule 88 action_19 -> -Rule 89 action_20 -> -Rule 90 action_21 -> -Rule 91 action_22 -> -Rule 92 action_23 -> -Rule 93 action_24 -> -Rule 94 action_25 -> -Rule 95 action_26 -> -Rule 96 action_27 -> -Rule 97 action_28 -> -Rule 98 action_29 -> -Rule 99 action_30 -> -Rule 100 action_31 -> -Rule 101 action_32 -> -Rule 102 action_33 -> -Rule 103 action_34 -> -Rule 104 action_35 -> -Rule 105 action_setDim1 -> -Rule 106 action_setDim2 -> +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 -> Terminals, with rules where they appear -and : 55 +and : 56 closedBra : 8 9 9 -closedParen : 24 26 36 37 51 57 -coma : 5 20 22 28 31 33 40 -div : 49 +closedParen : 24 26 37 38 52 58 +coma : 5 20 22 28 31 33 41 +div : 50 do : 20 20 21 21 doubleColon : 2 -doubleEquals : 64 -elif : 37 -else : 38 +doubleEquals : 65 +elif : 38 +else : 39 end : 1 11 19 20 21 +endline : 36 equals : 15 20 error : exit : 23 id : 1 4 5 11 16 20 24 25 if : 19 19 -int : 8 9 9 40 60 +int : 8 9 9 41 61 integer : 6 -less : 62 -lessEquals : 66 -minus : 45 -more : 63 -moreEquals : 67 -mul : 48 -not : 58 -notEquals : 65 +less : 63 +lessEquals : 67 +minus : 46 +more : 64 +moreEquals : 68 +mul : 49 +not : 59 +notEquals : 66 openBra : 8 9 9 -openParen : 24 26 36 37 51 57 -or : 53 +openParen : 24 26 37 38 52 58 +or : 54 parens : 16 -plus : 44 +plus : 45 print : 18 program : 1 1 -rea : 61 +rea : 62 read : 17 real : 7 string : 35 subroutine : 11 11 swap : 22 -then : 20 21 36 37 +then : 20 21 37 38 Nonterminals, with rules where they appear -AND : 52 53 55 -B : 1 11 13 20 21 36 37 38 +AND : 53 54 56 +B : 1 11 13 20 21 37 38 39 ComaEAOrEmpty : 26 Dim : 2 DimOrString : 32 33 -Dimensional : 15 22 22 30 31 34 59 +Dimensional : 15 22 22 30 31 34 60 DimensionsOrEmpty : 25 -EA : 15 20 20 26 28 43 51 -EAParens : 46 47 -EItem : 50 56 56 -EL : 36 37 53 57 58 -EQSymbols : 56 +EA : 15 20 20 26 28 44 52 +EAParens : 47 48 +EItem : 51 57 57 +EL : 37 38 54 58 59 +EQSymbols : 57 ElseOrEmpty : 19 -Equality : 54 55 +Equality : 55 56 F : 1 11 IntOrEmpty : 20 -MDSymbols : 47 -MultDiv : 42 43 47 +MDSymbols : 48 +MultDiv : 43 44 48 RDimOrString : 18 33 RDimensional : 17 31 -Relif : 19 37 +Relif : 19 38 Rid : 2 5 S : 13 -SumOrSub : 43 +SumOrSub : 44 Tipo : 2 V : 1 2 -action_1 : 34 59 -action_10 : 53 -action_11 : 55 -action_12 : 55 -action_13 : 56 -action_14 : 56 -action_15 : 58 +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_16 : 19 -action_17 : 36 37 -action_18 : 37 -action_19 : 38 -action_2 : 60 +action_17 : 37 38 +action_18 : 38 +action_19 : 39 +action_2 : 61 action_20 : 19 action_21 : 21 action_22 : 21 @@ -200,23 +202,23 @@ action_23 : 23 action_24 : 20 action_25 : 20 action_26 : 20 -action_27 : 41 -action_28 : 40 +action_27 : 42 +action_28 : 41 action_29 : 20 -action_2_rea : 61 -action_3 : 43 +action_2_rea : 62 +action_3 : 44 action_30 : 8 9 action_31 : 9 action_32 : 2 action_33 : 34 -action_34 : 35 -action_35 : 18 -action_4 : 43 -action_5 : 47 -action_6 : 47 +action_34 : 35 36 +action_36 : 30 31 +action_4 : 44 +action_5 : 48 +action_6 : 48 action_7 : 15 action_8 : 15 -action_9 : 53 +action_9 : 54 action_addSymbols : 2 action_setDim1 : 26 action_setDim2 : 28 @@ -344,7 +346,7 @@ state 9 (15) S -> . Dimensional action_7 equals EA action_8 (16) S -> . id parens (17) S -> . read RDimensional - (18) S -> . print RDimOrString action_35 + (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 @@ -427,17 +429,17 @@ state 15 state 16 (15) S -> Dimensional . action_7 equals EA action_8 - (76) action_7 -> . + (77) action_7 -> . - equals reduce using rule 76 (action_7 -> .) + equals reduce using rule 77 (action_7 -> .) action_7 shift and go to state 30 state 17 (17) S -> read . RDimensional - (30) RDimensional -> . Dimensional - (31) RDimensional -> . RDimensional coma Dimensional + (30) RDimensional -> . Dimensional action_1 action_36 + (31) RDimensional -> . RDimensional coma Dimensional action_1 action_36 (25) Dimensional -> . id DimensionsOrEmpty id shift and go to state 33 @@ -447,14 +449,16 @@ state 17 state 18 - (18) S -> print . RDimOrString action_35 + (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 string shift and go to state 37 + endline shift and go to state 38 id shift and go to state 33 RDimOrString shift and go to state 34 @@ -464,19 +468,19 @@ state 18 state 19 (19) S -> if . action_16 Relif ElseOrEmpty end if action_20 - (85) action_16 -> . + (86) action_16 -> . - openParen reduce using rule 85 (action_16 -> .) + openParen reduce using rule 86 (action_16 -> .) - action_16 shift and go to state 38 + action_16 shift and go to state 39 state 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 - id shift and go to state 39 - then shift and go to state 40 + id shift and go to state 40 + then shift and go to state 41 state 21 @@ -486,25 +490,25 @@ state 21 id shift and go to state 33 - Dimensional shift and go to state 41 + Dimensional shift and go to state 42 state 22 (23) S -> exit . action_23 - (92) action_23 -> . + (93) action_23 -> . - end reduce using rule 92 (action_23 -> .) - id reduce using rule 92 (action_23 -> .) - read reduce using rule 92 (action_23 -> .) - print reduce using rule 92 (action_23 -> .) - if reduce using rule 92 (action_23 -> .) - do reduce using rule 92 (action_23 -> .) - swap reduce using rule 92 (action_23 -> .) - exit reduce using rule 92 (action_23 -> .) - elif reduce using rule 92 (action_23 -> .) - else reduce using rule 92 (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 -> .) - action_23 shift and go to state 42 + action_23 shift and go to state 43 state 23 @@ -521,7 +525,7 @@ state 23 swap reduce using rule 14 (B -> .) exit reduce using rule 14 (B -> .) - B shift and go to state 43 + B shift and go to state 44 state 24 @@ -529,19 +533,19 @@ state 24 (4) Rid -> . id (5) Rid -> . Rid coma id - id shift and go to state 45 + id shift and go to state 46 - Rid shift and go to state 44 + 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 - (99) action_30 -> . + (100) action_30 -> . - closedBra reduce using rule 99 (action_30 -> .) + closedBra reduce using rule 100 (action_30 -> .) - action_30 shift and go to state 46 + action_30 shift and go to state 47 state 26 @@ -563,28 +567,28 @@ state 27 (24) S -> id openParen . closedParen (26) 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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea + (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 48 - openParen shift and go to state 47 - int shift and go to state 54 - rea shift and go to state 55 + 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 49 - MultDiv shift and go to state 50 - EAParens shift and go to state 51 - EItem shift and go to state 52 - Dimensional shift and go to state 53 + 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 @@ -629,13 +633,13 @@ state 30 (15) S -> Dimensional action_7 . equals EA action_8 - equals shift and go to state 56 + equals shift and go to state 57 state 31 (17) S -> read RDimensional . - (31) RDimensional -> RDimensional . coma Dimensional + (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 .) @@ -647,25 +651,27 @@ state 31 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 57 + coma shift and go to state 58 state 32 - (30) RDimensional -> Dimensional . + (30) RDimensional -> Dimensional . action_1 action_36 + (70) action_1 -> . - coma reduce using rule 30 (RDimensional -> Dimensional .) - end reduce using rule 30 (RDimensional -> Dimensional .) - id reduce using rule 30 (RDimensional -> Dimensional .) - read reduce using rule 30 (RDimensional -> Dimensional .) - print reduce using rule 30 (RDimensional -> Dimensional .) - if reduce using rule 30 (RDimensional -> Dimensional .) - do reduce using rule 30 (RDimensional -> Dimensional .) - swap reduce using rule 30 (RDimensional -> Dimensional .) - exit reduce using rule 30 (RDimensional -> Dimensional .) - elif reduce using rule 30 (RDimensional -> Dimensional .) - else reduce using rule 30 (RDimensional -> Dimensional .) + 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 @@ -673,7 +679,7 @@ state 33 (26) DimensionsOrEmpty -> . openParen EA action_setDim1 ComaEAOrEmpty closedParen (27) DimensionsOrEmpty -> . - openParen shift and go to state 58 + 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 -> .) @@ -704,23 +710,21 @@ state 33 state 34 - (18) S -> print RDimOrString . action_35 + (18) S -> print RDimOrString . (33) RDimOrString -> RDimOrString . coma DimOrString - (104) action_35 -> . - coma shift and go to state 60 - end reduce using rule 104 (action_35 -> .) - id reduce using rule 104 (action_35 -> .) - read reduce using rule 104 (action_35 -> .) - print reduce using rule 104 (action_35 -> .) - if reduce using rule 104 (action_35 -> .) - do reduce using rule 104 (action_35 -> .) - swap reduce using rule 104 (action_35 -> .) - exit reduce using rule 104 (action_35 -> .) - elif reduce using rule 104 (action_35 -> .) - else reduce using rule 104 (action_35 -> .) + 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 - action_35 shift and go to state 59 state 35 @@ -742,85 +746,104 @@ state 35 state 36 (34) DimOrString -> Dimensional . action_1 action_33 - (69) action_1 -> . + (70) 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 -> .) + 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 61 + action_1 shift and go to state 62 state 37 (35) DimOrString -> string . action_34 - (103) action_34 -> . + (104) action_34 -> . - coma reduce using rule 103 (action_34 -> .) - end reduce using rule 103 (action_34 -> .) - id reduce using rule 103 (action_34 -> .) - read reduce using rule 103 (action_34 -> .) - print reduce using rule 103 (action_34 -> .) - if reduce using rule 103 (action_34 -> .) - do reduce using rule 103 (action_34 -> .) - swap reduce using rule 103 (action_34 -> .) - exit reduce using rule 103 (action_34 -> .) - elif reduce using rule 103 (action_34 -> .) - else reduce using rule 103 (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 62 + action_34 shift and go to state 63 state 38 - (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 + (36) DimOrString -> endline . action_34 + (104) action_34 -> . - openParen shift and go to state 64 + 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 -> .) - Relif shift and go to state 63 + action_34 shift and go to state 64 state 39 - (20) S -> do id . action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do - (93) action_24 -> . + (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 - equals reduce using rule 93 (action_24 -> .) + openParen shift and go to state 66 - action_24 shift and go to state 65 + Relif shift and go to state 65 state 40 - (21) S -> do then . action_21 B action_22 end do - (90) action_21 -> . + (20) S -> do id . action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do + (94) action_24 -> . - id reduce using rule 90 (action_21 -> .) - read reduce using rule 90 (action_21 -> .) - print reduce using rule 90 (action_21 -> .) - if reduce using rule 90 (action_21 -> .) - do reduce using rule 90 (action_21 -> .) - swap reduce using rule 90 (action_21 -> .) - exit reduce using rule 90 (action_21 -> .) - end reduce using rule 90 (action_21 -> .) + equals reduce using rule 94 (action_24 -> .) - action_21 shift and go to state 66 + action_24 shift and go to state 67 state 41 - (22) S -> swap Dimensional . coma Dimensional + (21) S -> do then . action_21 B action_22 end do + (91) action_21 -> . - coma shift and go to state 67 + 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 .) @@ -835,14 +858,14 @@ state 42 else reduce using rule 23 (S -> exit action_23 .) -state 43 +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 action_35 + (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 @@ -851,7 +874,7 @@ state 43 (24) S -> . id openParen closedParen (25) Dimensional -> . id DimensionsOrEmpty - end shift and go to state 68 + 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 @@ -863,28 +886,28 @@ state 43 S shift and go to state 15 Dimensional shift and go to state 16 -state 44 +state 45 (2) V -> V Tipo Dim doubleColon Rid . action_addSymbols action_32 (5) Rid -> Rid . coma id - (68) action_addSymbols -> . + (69) action_addSymbols -> . - coma shift and go to state 70 - 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 -> .) + 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 -> .) - action_addSymbols shift and go to state 69 + action_addSymbols shift and go to state 71 -state 45 +state 46 (4) Rid -> id . @@ -902,41 +925,41 @@ state 45 exit reduce using rule 4 (Rid -> id .) -state 46 +state 47 (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 71 + closedBra shift and go to state 73 -state 47 - - (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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty - - openParen shift and go to state 47 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 - - EA shift and go to state 72 - MultDiv shift and go to state 50 - EAParens shift and go to state 51 - EItem shift and go to state 52 - Dimensional shift and go to state 53 - 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 + + 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 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 . end reduce using rule 24 (S -> id openParen closedParen .) @@ -951,302 +974,307 @@ state 48 else reduce using rule 24 (S -> id openParen closedParen .) -state 49 - - (26) DimensionsOrEmpty -> openParen EA . action_setDim1 ComaEAOrEmpty closedParen - (43) EA -> EA . SumOrSub action_3 MultDiv action_4 - (105) action_setDim1 -> . - (44) SumOrSub -> . plus - (45) SumOrSub -> . minus - - coma reduce using rule 105 (action_setDim1 -> .) - closedParen reduce using rule 105 (action_setDim1 -> .) - plus shift and go to state 75 - minus shift and go to state 76 - - action_setDim1 shift and go to state 73 - SumOrSub shift and go to state 74 - state 50 - (42) EA -> MultDiv . - (47) MultDiv -> MultDiv . MDSymbols action_5 EAParens action_6 - (48) MDSymbols -> . mul - (49) MDSymbols -> . div + (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 - 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 78 - div shift and go to state 79 + 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 - MDSymbols shift and go to state 77 + action_setDim1 shift and go to state 75 + SumOrSub shift and go to state 76 state 51 - (46) MultDiv -> EAParens . + (43) EA -> MultDiv . + (48) MultDiv -> MultDiv . MDSymbols action_5 EAParens action_6 + (49) MDSymbols -> . mul + (50) MDSymbols -> . div - 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 .) + 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 + MDSymbols shift and go to state 79 state 52 - (50) EAParens -> EItem . + (47) MultDiv -> EAParens . - 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 .) + 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 .) state 53 - (59) EItem -> Dimensional . action_1 - (69) action_1 -> . + (51) EAParens -> EItem . - 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 -> .) - coma reduce using rule 69 (action_1 -> .) - closedParen 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 -> .) - 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 -> .) + 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 .) - action_1 shift and go to state 80 state 54 - (60) EItem -> int . action_2 - (70) action_2 -> . + (60) EItem -> Dimensional . action_1 + (70) action_1 -> . - 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 -> .) + 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 -> .) - action_2 shift and go to state 81 + action_1 shift and go to state 82 state 55 - (61) EItem -> rea . action_2_rea - (71) action_2_rea -> . + (61) EItem -> int . action_2 + (71) action_2 -> . - 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 -> .) + 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 -> .) - action_2_rea shift and go to state 82 + action_2 shift and go to state 83 state 56 - (15) S -> Dimensional action_7 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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (62) EItem -> rea . action_2_rea + (72) action_2_rea -> . - openParen shift and go to state 47 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 + 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 -> .) - Dimensional shift and go to state 53 - EA shift and go to state 83 - MultDiv shift and go to state 50 - EAParens shift and go to state 51 - EItem shift and go to state 52 + action_2_rea shift and go to state 84 state 57 - (31) RDimensional -> RDimensional coma . Dimensional + (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 + 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 - Dimensional 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 state 58 - (26) 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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea + (31) RDimensional -> RDimensional coma . Dimensional action_1 action_36 (25) Dimensional -> . id DimensionsOrEmpty - openParen shift and go to state 47 - int shift and go to state 54 - rea shift and go to state 55 id shift and go to state 33 - EA shift and go to state 49 - MultDiv shift and go to state 50 - EAParens shift and go to state 51 - EItem shift and go to state 52 - Dimensional shift and go to state 53 + Dimensional shift and go to state 86 state 59 - (18) S -> print RDimOrString action_35 . + (30) RDimensional -> Dimensional action_1 . action_36 + (105) action_36 -> . - end reduce using rule 18 (S -> print RDimOrString action_35 .) - id reduce using rule 18 (S -> print RDimOrString action_35 .) - read reduce using rule 18 (S -> print RDimOrString action_35 .) - print reduce using rule 18 (S -> print RDimOrString action_35 .) - if reduce using rule 18 (S -> print RDimOrString action_35 .) - do reduce using rule 18 (S -> print RDimOrString action_35 .) - swap reduce using rule 18 (S -> print RDimOrString action_35 .) - exit reduce using rule 18 (S -> print RDimOrString action_35 .) - elif reduce using rule 18 (S -> print RDimOrString action_35 .) - else reduce using rule 18 (S -> print RDimOrString action_35 .) + 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 -> .) + 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 + + 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 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 string shift and go to state 37 + endline shift and go to state 38 id shift and go to state 33 - DimOrString shift and go to state 85 + DimOrString shift and go to state 88 Dimensional shift and go to state 36 -state 61 +state 62 (34) DimOrString -> Dimensional action_1 . action_33 - (102) action_33 -> . + (103) action_33 -> . - coma reduce using rule 102 (action_33 -> .) - end reduce using rule 102 (action_33 -> .) - id reduce using rule 102 (action_33 -> .) - read reduce using rule 102 (action_33 -> .) - print reduce using rule 102 (action_33 -> .) - if reduce using rule 102 (action_33 -> .) - do reduce using rule 102 (action_33 -> .) - swap reduce using rule 102 (action_33 -> .) - exit reduce using rule 102 (action_33 -> .) - elif reduce using rule 102 (action_33 -> .) - else reduce using rule 102 (action_33 -> .) + 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 -> .) - action_33 shift and go to state 86 + action_33 shift and go to state 89 -state 62 +state 63 (35) DimOrString -> string action_34 . @@ -1263,55 +1291,72 @@ state 62 else reduce using rule 35 (DimOrString -> string action_34 .) -state 63 - - (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 88 - else shift and go to state 89 - end reduce using rule 39 (ElseOrEmpty -> .) - - ElseOrEmpty shift and go to state 87 - state 64 - (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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (36) DimOrString -> endline action_34 . - openParen shift and go to state 90 - not shift and go to state 95 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 + 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 .) - EL shift and go to state 91 - AND shift and go to state 92 - Equality shift and go to state 93 - EItem shift and go to state 94 - Dimensional shift and go to state 53 state 65 - (20) S -> do id action_24 . equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do + (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 -> . - equals shift and go to state 96 + elif shift and go to state 91 + else shift and go to state 92 + end reduce using rule 40 (ElseOrEmpty -> .) + ElseOrEmpty shift and go to state 90 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 + + 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 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 + + equals shift and go to state 99 + + +state 68 + (21) S -> do then action_21 . B action_22 end do (13) B -> . B S (14) B -> . @@ -1325,283 +1370,302 @@ state 66 exit reduce using rule 14 (B -> .) end reduce using rule 14 (B -> .) - B shift and go to state 97 + B shift and go to state 100 -state 67 +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 98 - -state 68 - - (11) F -> F subroutine id B end . subroutine - - subroutine shift and go to state 99 - - -state 69 - - (2) V -> V Tipo Dim doubleColon Rid action_addSymbols . action_32 - (101) action_32 -> . - - integer reduce using rule 101 (action_32 -> .) - real reduce using rule 101 (action_32 -> .) - subroutine reduce using rule 101 (action_32 -> .) - end reduce using rule 101 (action_32 -> .) - id reduce using rule 101 (action_32 -> .) - read reduce using rule 101 (action_32 -> .) - print reduce using rule 101 (action_32 -> .) - if reduce using rule 101 (action_32 -> .) - do reduce using rule 101 (action_32 -> .) - swap reduce using rule 101 (action_32 -> .) - exit reduce using rule 101 (action_32 -> .) - - action_32 shift and go to state 100 + Dimensional shift and go to state 101 state 70 - (5) Rid -> Rid coma . id + (11) F -> F subroutine id B end . subroutine - id shift and go to state 101 + 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 102 + openBra shift and go to state 105 -state 72 +state 74 - (51) EAParens -> openParen EA . closedParen - (43) EA -> EA . SumOrSub action_3 MultDiv action_4 - (44) SumOrSub -> . plus - (45) SumOrSub -> . minus + (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 103 - plus shift and go to state 75 - minus shift and go to state 76 + 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 74 + SumOrSub shift and go to state 76 -state 73 +state 75 (26) DimensionsOrEmpty -> openParen EA action_setDim1 . ComaEAOrEmpty closedParen (28) ComaEAOrEmpty -> . coma EA action_setDim2 (29) ComaEAOrEmpty -> . - coma shift and go to state 105 + coma shift and go to state 108 closedParen reduce using rule 29 (ComaEAOrEmpty -> .) - ComaEAOrEmpty shift and go to state 104 - -state 74 - - (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 106 - -state 75 - - (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 .) - + ComaEAOrEmpty shift and go to state 107 state 76 - (45) SumOrSub -> minus . + (44) EA -> EA SumOrSub . action_3 MultDiv action_4 + (73) action_3 -> . - 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 .) + 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 -> .) + action_3 shift and go to state 109 state 77 - (47) MultDiv -> MultDiv MDSymbols . action_5 EAParens action_6 - (74) action_5 -> . + (45) SumOrSub -> plus . - 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 -> .) + 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 .) - action_5 shift and go to state 107 state 78 - (48) MDSymbols -> mul . + (46) SumOrSub -> minus . - 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 .) + 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 - (49) MDSymbols -> div . + (48) MultDiv -> MultDiv MDSymbols . action_5 EAParens action_6 + (75) action_5 -> . - 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 .) + 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 - (59) EItem -> Dimensional action_1 . + (49) MDSymbols -> mul . - mul reduce using rule 59 (EItem -> Dimensional action_1 .) - div reduce using rule 59 (EItem -> Dimensional action_1 .) - plus reduce using rule 59 (EItem -> Dimensional action_1 .) - minus reduce using rule 59 (EItem -> Dimensional action_1 .) - coma reduce using rule 59 (EItem -> Dimensional action_1 .) - closedParen reduce using rule 59 (EItem -> Dimensional action_1 .) - end reduce using rule 59 (EItem -> Dimensional action_1 .) - id reduce using rule 59 (EItem -> Dimensional action_1 .) - read reduce using rule 59 (EItem -> Dimensional action_1 .) - print reduce using rule 59 (EItem -> Dimensional action_1 .) - if reduce using rule 59 (EItem -> Dimensional action_1 .) - do reduce using rule 59 (EItem -> Dimensional action_1 .) - swap reduce using rule 59 (EItem -> Dimensional action_1 .) - exit reduce using rule 59 (EItem -> Dimensional action_1 .) - elif reduce using rule 59 (EItem -> Dimensional action_1 .) - else reduce using rule 59 (EItem -> Dimensional action_1 .) - less reduce using rule 59 (EItem -> Dimensional action_1 .) - more reduce using rule 59 (EItem -> Dimensional action_1 .) - doubleEquals reduce using rule 59 (EItem -> Dimensional action_1 .) - notEquals reduce using rule 59 (EItem -> Dimensional action_1 .) - lessEquals reduce using rule 59 (EItem -> Dimensional action_1 .) - moreEquals reduce using rule 59 (EItem -> Dimensional action_1 .) - then reduce using rule 59 (EItem -> Dimensional action_1 .) - and reduce using rule 59 (EItem -> Dimensional action_1 .) - or reduce using rule 59 (EItem -> Dimensional action_1 .) + 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 - (60) EItem -> int action_2 . + (50) MDSymbols -> div . - 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 .) + 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 - (61) EItem -> rea action_2_rea . + (60) EItem -> Dimensional action_1 . - 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 .) + 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 - (15) S -> Dimensional action_7 equals EA . action_8 - (43) EA -> EA . SumOrSub action_3 MultDiv action_4 - (77) action_8 -> . - (44) SumOrSub -> . plus - (45) SumOrSub -> . minus + (61) EItem -> int action_2 . - end reduce using rule 77 (action_8 -> .) - id reduce using rule 77 (action_8 -> .) - read reduce using rule 77 (action_8 -> .) - print reduce using rule 77 (action_8 -> .) - if reduce using rule 77 (action_8 -> .) - do reduce using rule 77 (action_8 -> .) - swap reduce using rule 77 (action_8 -> .) - exit reduce using rule 77 (action_8 -> .) - elif reduce using rule 77 (action_8 -> .) - else reduce using rule 77 (action_8 -> .) - plus shift and go to state 75 - minus shift and go to state 76 + 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 .) - action_8 shift and go to state 108 - SumOrSub shift and go to state 74 state 84 - (31) RDimensional -> RDimensional coma Dimensional . + (62) EItem -> rea action_2_rea . - coma reduce using rule 31 (RDimensional -> RDimensional coma Dimensional .) - end reduce using rule 31 (RDimensional -> RDimensional coma Dimensional .) - id reduce using rule 31 (RDimensional -> RDimensional coma Dimensional .) - read reduce using rule 31 (RDimensional -> RDimensional coma Dimensional .) - print reduce using rule 31 (RDimensional -> RDimensional coma Dimensional .) - if reduce using rule 31 (RDimensional -> RDimensional coma Dimensional .) - do reduce using rule 31 (RDimensional -> RDimensional coma Dimensional .) - swap reduce using rule 31 (RDimensional -> RDimensional coma Dimensional .) - exit reduce using rule 31 (RDimensional -> RDimensional coma Dimensional .) - elif reduce using rule 31 (RDimensional -> RDimensional coma Dimensional .) - else reduce using rule 31 (RDimensional -> RDimensional coma Dimensional .) + 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 .) @@ -1617,7 +1681,7 @@ state 85 else reduce using rule 33 (RDimOrString -> RDimOrString coma DimOrString .) -state 86 +state 89 (34) DimOrString -> Dimensional action_1 action_33 . @@ -1634,176 +1698,176 @@ state 86 else reduce using rule 34 (DimOrString -> Dimensional action_1 action_33 .) -state 87 +state 90 (19) S -> if action_16 Relif ElseOrEmpty . end if action_20 - end shift and go to state 109 + end shift and go to state 113 -state 88 - - (37) Relif -> Relif elif . action_18 openParen EL closedParen action_17 then B - (87) action_18 -> . - - openParen reduce using rule 87 (action_18 -> .) - - action_18 shift and go to state 110 - -state 89 - - (38) ElseOrEmpty -> else . action_19 B - (88) action_19 -> . - - id reduce using rule 88 (action_19 -> .) - read reduce using rule 88 (action_19 -> .) - print reduce using rule 88 (action_19 -> .) - if reduce using rule 88 (action_19 -> .) - do reduce using rule 88 (action_19 -> .) - swap reduce using rule 88 (action_19 -> .) - exit reduce using rule 88 (action_19 -> .) - end reduce using rule 88 (action_19 -> .) - - action_19 shift and go to state 111 - -state 90 - - (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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty - - openParen shift and go to state 90 - not shift and go to state 95 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 - - EL shift and go to state 112 - AND shift and go to state 92 - Equality shift and go to state 93 - EItem shift and go to state 94 - Dimensional shift and go to state 53 - state 91 - (36) Relif -> openParen EL . closedParen action_17 then B - (53) EL -> EL . or action_10 AND action_9 + (38) Relif -> Relif elif . action_18 openParen EL closedParen action_17 then B + (88) action_18 -> . - closedParen shift and go to state 113 - or shift and go to state 114 + openParen reduce using rule 88 (action_18 -> .) + action_18 shift and go to state 114 state 92 - (52) EL -> AND . - (55) AND -> AND . and action_12 Equality action_11 + (39) ElseOrEmpty -> else . action_19 B + (89) action_19 -> . - ! 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 115 - - ! and [ reduce using rule 52 (EL -> AND .) ] + 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 - (54) AND -> Equality . + (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 - and reduce using rule 54 (AND -> Equality .) - closedParen reduce using rule 54 (AND -> Equality .) - or reduce using rule 54 (AND -> Equality .) + 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 - (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 + (37) Relif -> openParen EL . closedParen action_17 then B + (54) EL -> EL . or action_10 AND action_9 - less shift and go to state 117 - more shift and go to state 118 - doubleEquals shift and go to state 119 - notEquals shift and go to state 120 - lessEquals shift and go to state 121 - moreEquals shift and go to state 122 + closedParen shift and go to state 117 + or shift and go to state 118 - EQSymbols shift and go to state 116 state 95 - (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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (53) EL -> AND . + (56) AND -> AND . and action_12 Equality action_11 - openParen shift and go to state 90 - not shift and go to state 95 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 + ! 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 .) ] - EL shift and go to state 123 - AND shift and go to state 92 - Equality shift and go to state 93 - EItem shift and go to state 94 - Dimensional shift and go to state 53 state 96 - (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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (55) AND -> Equality . - openParen shift and go to state 47 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 + and reduce using rule 55 (AND -> Equality .) + closedParen reduce using rule 55 (AND -> Equality .) + or reduce using rule 55 (AND -> Equality .) - EA shift and go to state 124 - MultDiv shift and go to state 50 - EAParens shift and go to state 51 - EItem shift and go to state 52 - Dimensional shift and go to state 53 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 - (91) action_22 -> . + (92) action_22 -> . (15) S -> . Dimensional action_7 equals EA action_8 (16) S -> . id parens (17) S -> . read RDimensional - (18) S -> . print RDimOrString action_35 + (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 @@ -1812,7 +1876,7 @@ state 97 (24) S -> . id openParen closedParen (25) Dimensional -> . id DimensionsOrEmpty - end reduce using rule 91 (action_22 -> .) + 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 @@ -1821,11 +1885,11 @@ state 97 swap shift and go to state 21 exit shift and go to state 22 - action_22 shift and go to state 125 + action_22 shift and go to state 129 S shift and go to state 15 Dimensional shift and go to state 16 -state 98 +state 101 (22) S -> swap Dimensional coma Dimensional . @@ -1841,7 +1905,7 @@ state 98 else reduce using rule 22 (S -> swap Dimensional coma Dimensional .) -state 99 +state 102 (11) F -> F subroutine id B end subroutine . @@ -1856,7 +1920,7 @@ state 99 exit reduce using rule 11 (F -> F subroutine id B end subroutine .) -state 100 +state 103 (2) V -> V Tipo Dim doubleColon Rid action_addSymbols action_32 . @@ -1873,7 +1937,7 @@ state 100 exit reduce using rule 2 (V -> V Tipo Dim doubleColon Rid action_addSymbols action_32 .) -state 101 +state 104 (5) Rid -> Rid coma id . @@ -1891,111 +1955,111 @@ state 101 exit reduce using rule 5 (Rid -> Rid coma id .) -state 102 +state 105 (9) Dim -> openBra int action_30 closedBra openBra . int action_31 closedBra - int shift and go to state 126 + int shift and go to state 130 -state 103 - - (51) EAParens -> openParen EA closedParen . - - 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 104 - - (26) DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty . closedParen - - closedParen shift and go to state 127 - - -state 105 - - (28) 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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty - - openParen shift and go to state 47 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 - - EA shift and go to state 128 - MultDiv shift and go to state 50 - EAParens shift and go to state 51 - EItem shift and go to state 52 - Dimensional shift and go to state 53 - state 106 - (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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (52) EAParens -> openParen EA closedParen . - openParen shift and go to state 47 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 + 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 .) - MultDiv shift and go to state 129 - EAParens shift and go to state 51 - EItem shift and go to state 52 - Dimensional shift and go to state 53 state 107 - (47) MultDiv -> MultDiv MDSymbols action_5 . EAParens action_6 - (50) EAParens -> . EItem - (51) EAParens -> . openParen EA closedParen - (59) EItem -> . Dimensional action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (26) DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty . closedParen - openParen shift and go to state 47 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 + closedParen shift and go to state 131 - EAParens shift and go to state 130 - EItem shift and go to state 52 - Dimensional shift and go to state 53 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 + + 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 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 + + 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 + + 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 + +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 + + 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 + + EAParens shift and go to state 134 + EItem shift and go to state 53 + Dimensional shift and go to state 54 + +state 111 + (15) S -> Dimensional action_7 equals EA action_8 . end reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) @@ -2010,23 +2074,42 @@ state 108 else reduce using rule 15 (S -> Dimensional action_7 equals EA action_8 .) -state 109 +state 112 + + (31) RDimensional -> RDimensional coma Dimensional action_1 . action_36 + (105) 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 -> .) + + action_36 shift and go to state 135 + +state 113 (19) S -> if action_16 Relif ElseOrEmpty end . if action_20 - if shift and go to state 131 + if shift and go to state 136 -state 110 +state 114 - (37) Relif -> Relif elif action_18 . 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 132 + openParen shift and go to state 137 -state 111 +state 115 - (38) ElseOrEmpty -> else action_19 . B + (39) ElseOrEmpty -> else action_19 . B (13) B -> . B S (14) B -> . @@ -2039,165 +2122,165 @@ state 111 exit reduce using rule 14 (B -> .) end reduce using rule 14 (B -> .) - B shift and go to state 133 - -state 112 - - (57) Equality -> openParen EL . closedParen - (53) EL -> EL . or action_10 AND action_9 - - closedParen shift and go to state 134 - or shift and go to state 114 - - -state 113 - - (36) Relif -> openParen EL closedParen . action_17 then B - (86) action_17 -> . - - then reduce using rule 86 (action_17 -> .) - - action_17 shift and go to state 135 - -state 114 - - (53) EL -> EL or . action_10 AND action_9 - (79) action_10 -> . - - openParen reduce using rule 79 (action_10 -> .) - not reduce using rule 79 (action_10 -> .) - int reduce using rule 79 (action_10 -> .) - rea reduce using rule 79 (action_10 -> .) - id reduce using rule 79 (action_10 -> .) - - action_10 shift and go to state 136 - -state 115 - - (55) AND -> AND and . action_12 Equality action_11 - (81) action_12 -> . - - openParen reduce using rule 81 (action_12 -> .) - not reduce using rule 81 (action_12 -> .) - int reduce using rule 81 (action_12 -> .) - rea reduce using rule 81 (action_12 -> .) - id reduce using rule 81 (action_12 -> .) - - action_12 shift and go to state 137 + B shift and go to state 138 state 116 - (56) Equality -> EItem EQSymbols . action_13 EItem action_14 - (82) action_13 -> . + (58) Equality -> openParen EL . closedParen + (54) EL -> EL . or action_10 AND action_9 - int reduce using rule 82 (action_13 -> .) - rea reduce using rule 82 (action_13 -> .) - id reduce using rule 82 (action_13 -> .) + closedParen shift and go to state 139 + or shift and go to state 118 - action_13 shift and go to state 138 state 117 - (62) EQSymbols -> less . + (37) Relif -> openParen EL closedParen . action_17 then B + (87) action_17 -> . - int reduce using rule 62 (EQSymbols -> less .) - rea reduce using rule 62 (EQSymbols -> less .) - id reduce using rule 62 (EQSymbols -> less .) + then reduce using rule 87 (action_17 -> .) + action_17 shift and go to state 140 state 118 - (63) EQSymbols -> more . + (54) EL -> EL or . action_10 AND action_9 + (80) action_10 -> . - int reduce using rule 63 (EQSymbols -> more .) - rea reduce using rule 63 (EQSymbols -> more .) - id reduce using rule 63 (EQSymbols -> more .) + 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 -> .) + action_10 shift and go to state 141 state 119 - (64) EQSymbols -> doubleEquals . + (56) AND -> AND and . action_12 Equality action_11 + (82) action_12 -> . - int reduce using rule 64 (EQSymbols -> doubleEquals .) - rea reduce using rule 64 (EQSymbols -> doubleEquals .) - id reduce using rule 64 (EQSymbols -> doubleEquals .) + 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 -> .) + action_12 shift and go to state 142 state 120 - (65) EQSymbols -> notEquals . + (57) Equality -> EItem EQSymbols . action_13 EItem action_14 + (83) action_13 -> . - int reduce using rule 65 (EQSymbols -> notEquals .) - rea reduce using rule 65 (EQSymbols -> notEquals .) - id reduce using rule 65 (EQSymbols -> notEquals .) + int reduce using rule 83 (action_13 -> .) + rea reduce using rule 83 (action_13 -> .) + id reduce using rule 83 (action_13 -> .) + action_13 shift and go to state 143 state 121 - (66) EQSymbols -> lessEquals . + (63) EQSymbols -> less . - int reduce using rule 66 (EQSymbols -> lessEquals .) - rea reduce using rule 66 (EQSymbols -> lessEquals .) - id reduce using rule 66 (EQSymbols -> lessEquals .) + int reduce using rule 63 (EQSymbols -> less .) + rea reduce using rule 63 (EQSymbols -> less .) + id reduce using rule 63 (EQSymbols -> less .) state 122 - (67) EQSymbols -> moreEquals . + (64) EQSymbols -> more . - int reduce using rule 67 (EQSymbols -> moreEquals .) - rea reduce using rule 67 (EQSymbols -> moreEquals .) - id reduce using rule 67 (EQSymbols -> moreEquals .) + int reduce using rule 64 (EQSymbols -> more .) + rea reduce using rule 64 (EQSymbols -> more .) + id reduce using rule 64 (EQSymbols -> more .) state 123 - (58) Equality -> not EL . action_15 - (53) EL -> EL . or action_10 AND action_9 - (84) action_15 -> . + (65) EQSymbols -> doubleEquals . - ! shift/reduce conflict for or resolved as shift - or shift and go to state 114 - and reduce using rule 84 (action_15 -> .) - closedParen reduce using rule 84 (action_15 -> .) + int reduce using rule 65 (EQSymbols -> doubleEquals .) + rea reduce using rule 65 (EQSymbols -> doubleEquals .) + id reduce using rule 65 (EQSymbols -> doubleEquals .) - ! or [ reduce using rule 84 (action_15 -> .) ] - - action_15 shift and go to state 139 state 124 - (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_25 -> . - (44) SumOrSub -> . plus - (45) SumOrSub -> . minus + (66) EQSymbols -> notEquals . - coma reduce using rule 94 (action_25 -> .) - plus shift and go to state 75 - minus shift and go to state 76 + int reduce using rule 66 (EQSymbols -> notEquals .) + rea reduce using rule 66 (EQSymbols -> notEquals .) + id reduce using rule 66 (EQSymbols -> notEquals .) - action_25 shift and go to state 140 - SumOrSub shift and go to state 74 state 125 - (21) S -> do then action_21 B action_22 . end do + (67) EQSymbols -> lessEquals . - end shift and go to state 141 + int reduce using rule 67 (EQSymbols -> lessEquals .) + rea reduce using rule 67 (EQSymbols -> lessEquals .) + id reduce using rule 67 (EQSymbols -> lessEquals .) state 126 - (9) Dim -> openBra int action_30 closedBra openBra int . action_31 closedBra - (100) action_31 -> . + (68) EQSymbols -> moreEquals . - closedBra reduce using rule 100 (action_31 -> .) + int reduce using rule 68 (EQSymbols -> moreEquals .) + rea reduce using rule 68 (EQSymbols -> moreEquals .) + id reduce using rule 68 (EQSymbols -> moreEquals .) - action_31 shift and go to state 142 state 127 + (59) Equality -> not EL . action_15 + (54) EL -> EL . or action_10 AND action_9 + (85) 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 -> .) + + ! or [ reduce using rule 85 (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 + + coma reduce using rule 95 (action_25 -> .) + plus shift and go to state 77 + minus shift and go to state 78 + + action_25 shift and go to state 145 + SumOrSub shift and go to state 76 + +state 129 + + (21) S -> do then action_21 B action_22 . end do + + end shift and go to state 146 + + +state 130 + + (9) Dim -> openBra int action_30 closedBra openBra int . action_31 closedBra + (101) action_31 -> . + + closedBra reduce using rule 101 (action_31 -> .) + + action_31 shift and go to state 147 + +state 131 + (26) DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen . equals reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) @@ -2228,128 +2311,145 @@ state 127 or reduce using rule 26 (DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen .) -state 128 - - (28) ComaEAOrEmpty -> coma EA . action_setDim2 - (43) EA -> EA . SumOrSub action_3 MultDiv action_4 - (106) action_setDim2 -> . - (44) SumOrSub -> . plus - (45) SumOrSub -> . minus - - closedParen reduce using rule 106 (action_setDim2 -> .) - plus shift and go to state 75 - minus shift and go to state 76 - - action_setDim2 shift and go to state 143 - SumOrSub shift and go to state 74 - -state 129 - - (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 - - 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 78 - div shift and go to state 79 - - action_4 shift and go to state 144 - MDSymbols shift and go to state 77 - -state 130 - - (47) MultDiv -> MultDiv MDSymbols action_5 EAParens . action_6 - (75) action_6 -> . - - 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 145 - -state 131 - - (19) S -> if action_16 Relif ElseOrEmpty end if . action_20 - (89) action_20 -> . - - end reduce using rule 89 (action_20 -> .) - id reduce using rule 89 (action_20 -> .) - read reduce using rule 89 (action_20 -> .) - print reduce using rule 89 (action_20 -> .) - if reduce using rule 89 (action_20 -> .) - do reduce using rule 89 (action_20 -> .) - swap reduce using rule 89 (action_20 -> .) - exit reduce using rule 89 (action_20 -> .) - elif reduce using rule 89 (action_20 -> .) - else reduce using rule 89 (action_20 -> .) - - action_20 shift and go to state 146 - state 132 - (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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty + (28) ComaEAOrEmpty -> coma EA . action_setDim2 + (44) EA -> EA . SumOrSub action_3 MultDiv action_4 + (107) action_setDim2 -> . + (45) SumOrSub -> . plus + (46) SumOrSub -> . minus - openParen shift and go to state 90 - not shift and go to state 95 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 + closedParen reduce using rule 107 (action_setDim2 -> .) + plus shift and go to state 77 + minus shift and go to state 78 - EL shift and go to state 147 - AND shift and go to state 92 - Equality shift and go to state 93 - EItem shift and go to state 94 - Dimensional shift and go to state 53 + action_setDim2 shift and go to state 148 + SumOrSub shift and go to state 76 state 133 - (38) ElseOrEmpty -> else action_19 B . + (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 + + 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 + + action_4 shift and go to state 149 + MDSymbols shift and go to state 79 + +state 134 + + (48) MultDiv -> MultDiv MDSymbols action_5 EAParens . action_6 + (76) action_6 -> . + + 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 -> .) + + action_6 shift and go to state 150 + +state 135 + + (31) RDimensional -> RDimensional coma Dimensional action_1 action_36 . + + 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 .) + + +state 136 + + (19) S -> if action_16 Relif ElseOrEmpty end if . action_20 + (90) 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 -> .) + + 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 + + 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 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 + +state 138 + + (39) ElseOrEmpty -> else action_19 B . (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 action_35 + (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 @@ -2358,7 +2458,7 @@ state 133 (24) S -> . id openParen closedParen (25) Dimensional -> . id DimensionsOrEmpty - end reduce using rule 38 (ElseOrEmpty -> else action_19 B .) + 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 @@ -2370,164 +2470,164 @@ state 133 S shift and go to state 15 Dimensional shift and go to state 16 -state 134 - - (57) 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 135 - - (36) Relif -> openParen EL closedParen action_17 . then B - - then shift and go to state 148 - - -state 136 - - (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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty - - openParen shift and go to state 90 - not shift and go to state 95 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 - - AND shift and go to state 149 - Equality shift and go to state 93 - EItem shift and go to state 94 - Dimensional shift and go to state 53 - -state 137 - - (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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty - - openParen shift and go to state 90 - not shift and go to state 95 - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 - - Equality shift and go to state 150 - EItem shift and go to state 94 - Dimensional shift and go to state 53 - -state 138 - - (56) Equality -> EItem EQSymbols action_13 . EItem action_14 - (59) EItem -> . Dimensional action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea - (25) Dimensional -> . id DimensionsOrEmpty - - int shift and go to state 54 - rea shift and go to state 55 - id shift and go to state 33 - - EItem shift and go to state 151 - Dimensional shift and go to state 53 - state 139 - (58) Equality -> not EL action_15 . + (58) Equality -> openParen EL closedParen . - 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 .) + 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 .) state 140 - (20) S -> do id action_24 equals EA action_25 . coma EA action_26 IntOrEmpty then B action_29 end do + (37) Relif -> openParen EL closedParen action_17 . then B - coma shift and go to state 152 + then shift and go to state 153 state 141 - (21) S -> do then action_21 B action_22 end . do + (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 - do shift and go to state 153 + 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 + 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 state 142 - (9) Dim -> openBra int action_30 closedBra openBra int action_31 . closedBra + (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 - closedBra shift and go to state 154 + 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 + Equality shift and go to state 155 + EItem shift and go to state 97 + Dimensional shift and go to state 54 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 + + int shift and go to state 55 + rea shift and go to state 56 + id shift and go to state 33 + + EItem shift and go to state 156 + Dimensional shift and go to state 54 + +state 144 + + (59) 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 .) + + +state 145 + + (20) S -> do id action_24 equals EA action_25 . coma EA action_26 IntOrEmpty then B action_29 end do + + coma shift and go to state 157 + + +state 146 + + (21) S -> do then action_21 B action_22 end . do + + do shift and go to state 158 + + +state 147 + + (9) Dim -> openBra int action_30 closedBra openBra int action_31 . closedBra + + closedBra shift and go to state 159 + + +state 148 + (28) ComaEAOrEmpty -> coma EA action_setDim2 . closedParen reduce using rule 28 (ComaEAOrEmpty -> coma EA action_setDim2 .) -state 144 +state 149 - (43) EA -> EA SumOrSub action_3 MultDiv action_4 . + (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 .) + 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 .) -state 145 +state 150 - (47) MultDiv -> MultDiv MDSymbols action_5 EAParens action_6 . + (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 .) + 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 .) -state 146 +state 151 (19) S -> if action_16 Relif ElseOrEmpty end if action_20 . @@ -2543,18 +2643,18 @@ state 146 else reduce using rule 19 (S -> if action_16 Relif ElseOrEmpty end if action_20 .) -state 147 +state 152 - (37) Relif -> Relif elif action_18 openParen EL . closedParen action_17 then B - (53) EL -> EL . or action_10 AND action_9 + (38) Relif -> Relif elif action_18 openParen EL . closedParen action_17 then B + (54) EL -> EL . or action_10 AND action_9 - closedParen shift and go to state 155 - or shift and go to state 114 + closedParen shift and go to state 160 + or shift and go to state 118 -state 148 +state 153 - (36) Relif -> openParen EL closedParen action_17 then . B + (37) Relif -> openParen EL closedParen action_17 then . B (13) B -> . B S (14) B -> . @@ -2569,71 +2669,71 @@ state 148 else reduce using rule 14 (B -> .) end reduce using rule 14 (B -> .) - B shift and go to state 156 + B shift and go to state 161 -state 149 +state 154 - (53) EL -> EL or action_10 AND . action_9 - (55) AND -> AND . and action_12 Equality action_11 - (78) action_9 -> . + (54) EL -> EL or action_10 AND . action_9 + (56) AND -> AND . and action_12 Equality action_11 + (79) action_9 -> . ! shift/reduce conflict for and resolved as shift - and shift and go to state 115 - closedParen reduce using rule 78 (action_9 -> .) - or reduce using rule 78 (action_9 -> .) + and shift and go to state 119 + closedParen reduce using rule 79 (action_9 -> .) + or reduce using rule 79 (action_9 -> .) - ! and [ reduce using rule 78 (action_9 -> .) ] + ! and [ reduce using rule 79 (action_9 -> .) ] - action_9 shift and go to state 157 + action_9 shift and go to state 162 -state 150 +state 155 - (55) AND -> AND and action_12 Equality . action_11 - (80) action_11 -> . + (56) AND -> AND and action_12 Equality . action_11 + (81) action_11 -> . - and reduce using rule 80 (action_11 -> .) - closedParen reduce using rule 80 (action_11 -> .) - or reduce using rule 80 (action_11 -> .) + and reduce using rule 81 (action_11 -> .) + closedParen reduce using rule 81 (action_11 -> .) + or reduce using rule 81 (action_11 -> .) - action_11 shift and go to state 158 + action_11 shift and go to state 163 -state 151 +state 156 - (56) Equality -> EItem EQSymbols action_13 EItem . action_14 - (83) action_14 -> . + (57) Equality -> EItem EQSymbols action_13 EItem . action_14 + (84) action_14 -> . - and reduce using rule 83 (action_14 -> .) - closedParen reduce using rule 83 (action_14 -> .) - or reduce using rule 83 (action_14 -> .) + and reduce using rule 84 (action_14 -> .) + closedParen reduce using rule 84 (action_14 -> .) + or reduce using rule 84 (action_14 -> .) - action_14 shift and go to state 159 + action_14 shift and go to state 164 -state 152 +state 157 (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 action_1 - (60) EItem -> . int action_2 - (61) EItem -> . rea action_2_rea + (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 47 - int shift and go to state 54 - rea shift and go to state 55 + 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 160 - MultDiv shift and go to state 50 - EAParens shift and go to state 51 - EItem shift and go to state 52 - Dimensional shift and go to state 53 + 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 -state 153 +state 158 (21) S -> do then action_21 B action_22 end do . @@ -2649,30 +2749,30 @@ state 153 else reduce using rule 21 (S -> do then action_21 B action_22 end do .) -state 154 +state 159 (9) Dim -> openBra int action_30 closedBra openBra int action_31 closedBra . doubleColon reduce using rule 9 (Dim -> openBra int action_30 closedBra openBra int action_31 closedBra .) -state 155 +state 160 - (37) Relif -> Relif elif action_18 openParen EL closedParen . action_17 then B - (86) action_17 -> . + (38) Relif -> Relif elif action_18 openParen EL closedParen . action_17 then B + (87) action_17 -> . - then reduce using rule 86 (action_17 -> .) + then reduce using rule 87 (action_17 -> .) - action_17 shift and go to state 161 + action_17 shift and go to state 166 -state 156 +state 161 - (36) Relif -> openParen EL closedParen action_17 then B . + (37) 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 (17) S -> . read RDimensional - (18) S -> . print RDimOrString action_35 + (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 @@ -2681,9 +2781,9 @@ state 156 (24) S -> . id openParen closedParen (25) Dimensional -> . id DimensionsOrEmpty - 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 .) + 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 @@ -2695,72 +2795,72 @@ state 156 S shift and go to state 15 Dimensional shift and go to state 16 -state 157 - - (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 .) - - -state 158 - - (55) AND -> AND and action_12 Equality action_11 . - - 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 159 - - (56) Equality -> EItem EQSymbols action_13 EItem action_14 . - - 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 160 - - (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 - (95) action_26 -> . - (44) SumOrSub -> . plus - (45) SumOrSub -> . minus - - coma reduce using rule 95 (action_26 -> .) - then reduce using rule 95 (action_26 -> .) - plus shift and go to state 75 - minus shift and go to state 76 - - action_26 shift and go to state 162 - SumOrSub shift and go to state 74 - -state 161 - - (37) Relif -> Relif elif action_18 openParen EL closedParen action_17 . then B - - then shift and go to state 163 - - state 162 - (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 - (96) action_27 -> . + (54) EL -> EL or action_10 AND action_9 . - coma shift and go to state 164 - then reduce using rule 96 (action_27 -> .) + 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 .) - IntOrEmpty shift and go to state 165 - action_27 shift and go to state 166 state 163 - (37) Relif -> Relif elif action_18 openParen EL closedParen action_17 then . B + (56) AND -> AND and action_12 Equality action_11 . + + 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 .) + + +state 164 + + (57) Equality -> EItem EQSymbols action_13 EItem action_14 . + + 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 .) + + +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 + + 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 + + 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 + + then shift and go to state 168 + + +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 (13) B -> . B S (14) B -> . @@ -2775,37 +2875,37 @@ state 163 else reduce using rule 14 (B -> .) end reduce using rule 14 (B -> .) - B shift and go to state 167 + B shift and go to state 172 -state 164 +state 169 - (40) IntOrEmpty -> coma . int action_28 + (41) IntOrEmpty -> coma . int action_28 - int shift and go to state 168 + int shift and go to state 173 -state 165 +state 170 (20) S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty . then B action_29 end do - then shift and go to state 169 + then shift and go to state 174 -state 166 +state 171 - (41) IntOrEmpty -> action_27 . + (42) IntOrEmpty -> action_27 . - then reduce using rule 41 (IntOrEmpty -> action_27 .) + then reduce using rule 42 (IntOrEmpty -> action_27 .) -state 167 +state 172 - (37) Relif -> Relif elif action_18 openParen EL closedParen action_17 then B . + (38) 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 (17) S -> . read RDimensional - (18) S -> . print RDimOrString action_35 + (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 @@ -2814,9 +2914,9 @@ state 167 (24) S -> . id openParen closedParen (25) Dimensional -> . id DimensionsOrEmpty - 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 .) + 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 @@ -2828,16 +2928,16 @@ state 167 S shift and go to state 15 Dimensional shift and go to state 16 -state 168 +state 173 - (40) IntOrEmpty -> coma int . action_28 - (97) action_28 -> . + (41) IntOrEmpty -> coma int . action_28 + (98) action_28 -> . - then reduce using rule 97 (action_28 -> .) + then reduce using rule 98 (action_28 -> .) - action_28 shift and go to state 170 + action_28 shift and go to state 175 -state 169 +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 @@ -2852,24 +2952,24 @@ state 169 exit reduce using rule 14 (B -> .) end reduce using rule 14 (B -> .) - B shift and go to state 171 + B shift and go to state 176 -state 170 +state 175 - (40) IntOrEmpty -> coma int action_28 . + (41) IntOrEmpty -> coma int action_28 . - then reduce using rule 40 (IntOrEmpty -> coma int action_28 .) + then reduce using rule 41 (IntOrEmpty -> coma int action_28 .) -state 171 +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 - (98) action_29 -> . + (99) action_29 -> . (15) S -> . Dimensional action_7 equals EA action_8 (16) S -> . id parens (17) S -> . read RDimensional - (18) S -> . print RDimOrString action_35 + (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 @@ -2878,7 +2978,7 @@ state 171 (24) S -> . id openParen closedParen (25) Dimensional -> . id DimensionsOrEmpty - end reduce using rule 98 (action_29 -> .) + 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 @@ -2887,25 +2987,25 @@ state 171 swap shift and go to state 21 exit shift and go to state 22 - action_29 shift and go to state 172 + action_29 shift and go to state 177 S shift and go to state 15 Dimensional shift and go to state 16 -state 172 +state 177 (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 173 + end shift and go to state 178 -state 173 +state 178 (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 174 + do shift and go to state 179 -state 174 +state 179 (20) S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do . @@ -2923,6 +3023,6 @@ state 174 WARNING: WARNING: Conflicts: WARNING: -WARNING: shift/reduce conflict for and in state 92 resolved as shift -WARNING: shift/reduce conflict for or in state 123 resolved as shift -WARNING: shift/reduce conflict for and in state 149 resolved as shift +WARNING: shift/reduce conflict for and in state 95 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 2b2ecb3..f98ef0f 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 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 action_35\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\n | RDimensional coma Dimensional\n \n RDimOrString : DimOrString\n | RDimOrString coma DimOrString\n \n DimOrString : Dimensional action_1 action_33\n | string 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_35 :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 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_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,40,42,43,44,45,47,48,50,51,52,53,54,55,56,57,58,59,60,61,62,64,66,67,69,70,74,75,76,77,78,79,80,81,82,83,84,85,86,89,90,95,96,97,98,99,100,101,103,105,106,107,108,111,114,115,116,117,118,119,120,121,122,127,129,130,131,132,133,136,137,138,144,145,146,148,152,153,156,163,167,169,171,174,],[3,-3,-12,-14,13,23,-13,33,33,39,33,-92,-14,45,-16,33,-25,-17,-30,-27,-104,-32,-69,-103,-90,-23,13,-68,-4,33,-24,-42,-46,-50,-69,-70,-71,33,33,33,-18,33,-102,-35,33,-14,33,-101,101,-72,-44,-45,-74,-48,-49,-59,-60,-61,-77,-31,-33,-34,-88,33,33,33,13,-22,-11,-2,-5,-51,33,33,33,-15,-14,-79,-81,-82,-62,-63,-64,-65,-66,-67,-26,-73,-75,-89,33,13,33,33,33,-43,-47,-19,-14,33,-21,13,-14,13,-14,13,-20,]),'integer':([3,4,44,45,69,100,101,],[-3,7,-68,-4,-101,-2,-5,]),'real':([3,4,44,45,69,100,101,],[-3,8,-68,-4,-101,-2,-5,]),'subroutine':([3,4,5,44,45,68,69,99,100,101,],[-3,-12,10,-68,-4,99,-101,-11,-2,-5,]),'end':([3,4,5,9,15,22,23,26,28,31,32,33,34,35,36,37,40,42,43,44,45,48,50,51,52,53,54,55,59,61,62,63,66,69,80,81,82,83,84,85,86,87,89,97,98,99,100,101,103,108,111,125,127,129,130,131,133,144,145,146,148,153,156,163,167,169,171,172,174,],[-3,-12,-14,14,-13,-92,-14,-16,-25,-17,-30,-27,-104,-32,-69,-103,-90,-23,68,-68,-4,-24,-42,-46,-50,-69,-70,-71,-18,-102,-35,-39,-14,-101,-59,-60,-61,-77,-31,-33,-34,109,-88,-91,-22,-11,-2,-5,-51,-15,-14,141,-26,-73,-75,-89,-38,-43,-47,-19,-14,-21,-36,-14,-37,-14,-98,173,-20,]),'read':([3,4,5,9,15,22,23,26,28,31,32,33,34,35,36,37,40,42,43,44,45,48,50,51,52,53,54,55,59,61,62,66,69,80,81,82,83,84,85,86,89,97,98,99,100,101,103,108,111,127,129,130,131,133,144,145,146,148,153,156,163,167,169,171,174,],[-3,-12,-14,17,-13,-92,-14,-16,-25,-17,-30,-27,-104,-32,-69,-103,-90,-23,17,-68,-4,-24,-42,-46,-50,-69,-70,-71,-18,-102,-35,-14,-101,-59,-60,-61,-77,-31,-33,-34,-88,17,-22,-11,-2,-5,-51,-15,-14,-26,-73,-75,-89,17,-43,-47,-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,40,42,43,44,45,48,50,51,52,53,54,55,59,61,62,66,69,80,81,82,83,84,85,86,89,97,98,99,100,101,103,108,111,127,129,130,131,133,144,145,146,148,153,156,163,167,169,171,174,],[-3,-12,-14,18,-13,-92,-14,-16,-25,-17,-30,-27,-104,-32,-69,-103,-90,-23,18,-68,-4,-24,-42,-46,-50,-69,-70,-71,-18,-102,-35,-14,-101,-59,-60,-61,-77,-31,-33,-34,-88,18,-22,-11,-2,-5,-51,-15,-14,-26,-73,-75,-89,18,-43,-47,-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,40,42,43,44,45,48,50,51,52,53,54,55,59,61,62,66,69,80,81,82,83,84,85,86,89,97,98,99,100,101,103,108,109,111,127,129,130,131,133,144,145,146,148,153,156,163,167,169,171,174,],[-3,-12,-14,19,-13,-92,-14,-16,-25,-17,-30,-27,-104,-32,-69,-103,-90,-23,19,-68,-4,-24,-42,-46,-50,-69,-70,-71,-18,-102,-35,-14,-101,-59,-60,-61,-77,-31,-33,-34,-88,19,-22,-11,-2,-5,-51,-15,131,-14,-26,-73,-75,-89,19,-43,-47,-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,40,42,43,44,45,48,50,51,52,53,54,55,59,61,62,66,69,80,81,82,83,84,85,86,89,97,98,99,100,101,103,108,111,127,129,130,131,133,141,144,145,146,148,153,156,163,167,169,171,173,174,],[-3,-12,-14,20,-13,-92,-14,-16,-25,-17,-30,-27,-104,-32,-69,-103,-90,-23,20,-68,-4,-24,-42,-46,-50,-69,-70,-71,-18,-102,-35,-14,-101,-59,-60,-61,-77,-31,-33,-34,-88,20,-22,-11,-2,-5,-51,-15,-14,-26,-73,-75,-89,20,153,-43,-47,-19,-14,-21,20,-14,20,-14,20,174,-20,]),'swap':([3,4,5,9,15,22,23,26,28,31,32,33,34,35,36,37,40,42,43,44,45,48,50,51,52,53,54,55,59,61,62,66,69,80,81,82,83,84,85,86,89,97,98,99,100,101,103,108,111,127,129,130,131,133,144,145,146,148,153,156,163,167,169,171,174,],[-3,-12,-14,21,-13,-92,-14,-16,-25,-17,-30,-27,-104,-32,-69,-103,-90,-23,21,-68,-4,-24,-42,-46,-50,-69,-70,-71,-18,-102,-35,-14,-101,-59,-60,-61,-77,-31,-33,-34,-88,21,-22,-11,-2,-5,-51,-15,-14,-26,-73,-75,-89,21,-43,-47,-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,40,42,43,44,45,48,50,51,52,53,54,55,59,61,62,66,69,80,81,82,83,84,85,86,89,97,98,99,100,101,103,108,111,127,129,130,131,133,144,145,146,148,153,156,163,167,169,171,174,],[-3,-12,-14,22,-13,-92,-14,-16,-25,-17,-30,-27,-104,-32,-69,-103,-90,-23,22,-68,-4,-24,-42,-46,-50,-69,-70,-71,-18,-102,-35,-14,-101,-59,-60,-61,-77,-31,-33,-34,-88,22,-22,-11,-2,-5,-51,-15,-14,-26,-73,-75,-89,22,-43,-47,-19,-14,-21,22,-14,22,-14,22,-20,]),'openBra':([6,7,8,71,],[12,-6,-7,102,]),'doubleColon':([6,7,8,11,71,154,],[-10,-6,-7,24,-8,-9,]),'int':([12,27,47,56,58,64,74,75,76,77,78,79,90,95,96,102,105,106,107,114,115,116,117,118,119,120,121,122,132,136,137,138,152,164,],[25,54,54,54,54,54,-72,-44,-45,-74,-48,-49,54,54,54,126,54,54,54,-79,-81,-82,-62,-63,-64,-65,-66,-67,54,54,54,54,54,168,]),'parens':([13,],[26,]),'openParen':([13,19,27,33,38,47,56,58,64,74,75,76,77,78,79,88,90,95,96,105,106,107,110,114,115,132,136,137,152,],[27,-85,47,58,64,47,47,47,90,-72,-44,-45,-74,-48,-49,-87,90,90,47,47,47,47,132,-79,-81,90,90,90,47,]),'equals':([13,16,28,30,39,65,127,],[-27,-76,-25,56,-93,96,-26,]),'elif':([15,22,26,28,31,32,33,34,35,36,37,42,48,50,51,52,53,54,55,59,61,62,63,80,81,82,83,84,85,86,98,103,108,127,129,130,131,144,145,146,148,153,156,163,167,174,],[-13,-92,-16,-25,-17,-30,-27,-104,-32,-69,-103,-23,-24,-42,-46,-50,-69,-70,-71,-18,-102,-35,88,-59,-60,-61,-77,-31,-33,-34,-22,-51,-15,-26,-73,-75,-89,-43,-47,-19,-14,-21,-36,-14,-37,-20,]),'else':([15,22,26,28,31,32,33,34,35,36,37,42,48,50,51,52,53,54,55,59,61,62,63,80,81,82,83,84,85,86,98,103,108,127,129,130,131,144,145,146,148,153,156,163,167,174,],[-13,-92,-16,-25,-17,-30,-27,-104,-32,-69,-103,-23,-24,-42,-46,-50,-69,-70,-71,-18,-102,-35,89,-59,-60,-61,-77,-31,-33,-34,-22,-51,-15,-26,-73,-75,-89,-43,-47,-19,-14,-21,-36,-14,-37,-20,]),'string':([18,60,],[37,37,]),'then':([20,28,33,50,51,52,53,54,55,80,81,82,103,113,127,129,130,135,144,145,155,160,161,162,165,166,168,170,],[40,-25,-27,-42,-46,-50,-69,-70,-71,-59,-60,-61,-51,-86,-26,-73,-75,148,-43,-47,-86,-95,163,-96,169,-41,-97,-40,]),'closedBra':([25,46,126,142,],[-99,71,-100,154,]),'closedParen':([27,28,33,49,50,51,52,53,54,55,72,73,80,81,82,91,92,93,103,104,112,123,127,128,129,130,134,139,143,144,145,147,149,150,151,157,158,159,],[48,-25,-27,-105,-42,-46,-50,-69,-70,-71,103,-29,-59,-60,-61,113,-52,-54,-51,127,134,-84,-26,-106,-73,-75,-57,-58,-28,-43,-47,155,-78,-80,-83,-53,-55,-56,]),'rea':([27,47,56,58,64,74,75,76,77,78,79,90,95,96,105,106,107,114,115,116,117,118,119,120,121,122,132,136,137,138,152,],[55,55,55,55,55,-72,-44,-45,-74,-48,-49,55,55,55,55,55,55,-79,-81,-82,-62,-63,-64,-65,-66,-67,55,55,55,55,55,]),'coma':([28,31,32,33,34,35,36,37,41,44,45,49,50,51,52,53,54,55,61,62,73,80,81,82,84,85,86,101,103,124,127,129,130,140,144,145,160,162,],[-25,57,-30,-27,60,-32,-69,-103,67,70,-4,-105,-42,-46,-50,-69,-70,-71,-102,-35,105,-59,-60,-61,-31,-33,-34,-5,-51,-94,-26,-73,-75,152,-43,-47,-95,164,]),'mul':([28,33,50,51,52,53,54,55,80,81,82,103,127,129,130,145,],[-25,-27,78,-46,-50,-69,-70,-71,-59,-60,-61,-51,-26,78,-75,-47,]),'div':([28,33,50,51,52,53,54,55,80,81,82,103,127,129,130,145,],[-25,-27,79,-46,-50,-69,-70,-71,-59,-60,-61,-51,-26,79,-75,-47,]),'plus':([28,33,49,50,51,52,53,54,55,72,80,81,82,83,103,124,127,128,129,130,144,145,160,],[-25,-27,75,-42,-46,-50,-69,-70,-71,75,-59,-60,-61,75,-51,75,-26,75,-73,-75,-43,-47,75,]),'minus':([28,33,49,50,51,52,53,54,55,72,80,81,82,83,103,124,127,128,129,130,144,145,160,],[-25,-27,76,-42,-46,-50,-69,-70,-71,76,-59,-60,-61,76,-51,76,-26,76,-73,-75,-43,-47,76,]),'less':([28,33,53,54,55,80,81,82,94,127,],[-25,-27,-69,-70,-71,-59,-60,-61,117,-26,]),'more':([28,33,53,54,55,80,81,82,94,127,],[-25,-27,-69,-70,-71,-59,-60,-61,118,-26,]),'doubleEquals':([28,33,53,54,55,80,81,82,94,127,],[-25,-27,-69,-70,-71,-59,-60,-61,119,-26,]),'notEquals':([28,33,53,54,55,80,81,82,94,127,],[-25,-27,-69,-70,-71,-59,-60,-61,120,-26,]),'lessEquals':([28,33,53,54,55,80,81,82,94,127,],[-25,-27,-69,-70,-71,-59,-60,-61,121,-26,]),'moreEquals':([28,33,53,54,55,80,81,82,94,127,],[-25,-27,-69,-70,-71,-59,-60,-61,122,-26,]),'and':([28,33,53,54,55,80,81,82,92,93,123,127,134,139,149,150,151,157,158,159,],[-25,-27,-69,-70,-71,-59,-60,-61,115,-54,-84,-26,-57,-58,115,-80,-83,-53,-55,-56,]),'or':([28,33,53,54,55,80,81,82,91,92,93,112,123,127,134,139,147,149,150,151,157,158,159,],[-25,-27,-69,-70,-71,-59,-60,-61,114,-52,-54,114,114,-26,-57,-58,114,-78,-80,-83,-53,-55,-56,]),'not':([64,90,95,114,115,132,136,137,],[95,95,95,-79,-81,95,95,95,]),} +_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 = {} 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,66,111,148,163,169,],[9,43,97,133,156,167,171,]),'Dim':([6,],[11,]),'S':([9,43,97,133,156,167,171,],[15,15,15,15,15,15,15,]),'Dimensional':([9,17,18,21,27,43,47,56,57,58,60,64,67,90,95,96,97,105,106,107,132,133,136,137,138,152,156,167,171,],[16,32,36,41,53,16,53,53,84,53,36,53,98,53,53,53,16,53,53,53,53,16,53,53,53,53,16,16,16,]),'DimensionsOrEmpty':([13,33,],[28,28,]),'action_7':([16,],[30,]),'RDimensional':([17,],[31,]),'RDimOrString':([18,],[34,]),'DimOrString':([18,60,],[35,85,]),'action_16':([19,],[38,]),'action_23':([22,],[42,]),'Rid':([24,],[44,]),'action_30':([25,],[46,]),'EA':([27,47,56,58,96,105,152,],[49,72,83,49,124,128,160,]),'MultDiv':([27,47,56,58,96,105,106,152,],[50,50,50,50,50,50,129,50,]),'EAParens':([27,47,56,58,96,105,106,107,152,],[51,51,51,51,51,51,51,130,51,]),'EItem':([27,47,56,58,64,90,95,96,105,106,107,132,136,137,138,152,],[52,52,52,52,94,94,94,52,52,52,52,94,94,94,151,52,]),'action_35':([34,],[59,]),'action_1':([36,53,],[61,80,]),'action_34':([37,],[62,]),'Relif':([38,],[63,]),'action_24':([39,],[65,]),'action_21':([40,],[66,]),'action_addSymbols':([44,],[69,]),'action_setDim1':([49,],[73,]),'SumOrSub':([49,72,83,124,128,160,],[74,74,74,74,74,74,]),'MDSymbols':([50,129,],[77,77,]),'action_2':([54,],[81,]),'action_2_rea':([55,],[82,]),'action_33':([61,],[86,]),'ElseOrEmpty':([63,],[87,]),'EL':([64,90,95,132,],[91,112,123,147,]),'AND':([64,90,95,132,136,],[92,92,92,92,149,]),'Equality':([64,90,95,132,136,137,],[93,93,93,93,93,150,]),'action_32':([69,],[100,]),'ComaEAOrEmpty':([73,],[104,]),'action_3':([74,],[106,]),'action_5':([77,],[107,]),'action_8':([83,],[108,]),'action_18':([88,],[110,]),'action_19':([89,],[111,]),'EQSymbols':([94,],[116,]),'action_22':([97,],[125,]),'action_17':([113,155,],[135,161,]),'action_10':([114,],[136,]),'action_12':([115,],[137,]),'action_13':([116,],[138,]),'action_15':([123,],[139,]),'action_25':([124,],[140,]),'action_31':([126,],[142,]),'action_setDim2':([128,],[143,]),'action_4':([129,],[144,]),'action_6':([130,],[145,]),'action_20':([131,],[146,]),'action_9':([149,],[157,]),'action_11':([150,],[158,]),'action_14':([151,],[159,]),'action_26':([160,],[162,]),'IntOrEmpty':([162,],[165,]),'action_27':([162,],[166,]),'action_28':([168,],[170,]),'action_29':([171,],[172,]),} +_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 = {} for _k, _v in _lr_goto_items.items(): @@ -27,110 +27,111 @@ 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',224), - ('V -> V Tipo Dim doubleColon Rid action_addSymbols action_32','V',7,'p_V','fort.py',231), - ('V -> ','V',0,'p_V','fort.py',232), - ('Rid -> id','Rid',1,'p_Rid','fort.py',238), - ('Rid -> Rid coma id','Rid',3,'p_Rid','fort.py',239), - ('Tipo -> integer','Tipo',1,'p_Tipo','fort.py',251), - ('Tipo -> real','Tipo',1,'p_Tipo','fort.py',252), - ('Dim -> openBra int action_30 closedBra','Dim',4,'p_Dim','fort.py',260), - ('Dim -> openBra int action_30 closedBra openBra int action_31 closedBra','Dim',8,'p_Dim','fort.py',261), - ('Dim -> ','Dim',0,'p_Dim','fort.py',262), - ('F -> F subroutine id B end subroutine','F',6,'p_F','fort.py',268), - ('F -> ','F',0,'p_F','fort.py',269), - ('B -> B S','B',2,'p_B','fort.py',275), - ('B -> ','B',0,'p_B','fort.py',276), - ('S -> Dimensional action_7 equals EA action_8','S',5,'p_S','fort.py',281), - ('S -> id parens','S',2,'p_S','fort.py',282), - ('S -> read RDimensional','S',2,'p_S','fort.py',283), - ('S -> print RDimOrString action_35','S',3,'p_S','fort.py',284), - ('S -> if action_16 Relif ElseOrEmpty end if action_20','S',7,'p_S','fort.py',285), - ('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',286), - ('S -> do then action_21 B action_22 end do','S',7,'p_S','fort.py',287), - ('S -> swap Dimensional coma Dimensional','S',4,'p_S','fort.py',288), - ('S -> exit action_23','S',2,'p_S','fort.py',289), - ('S -> id openParen closedParen','S',3,'p_S','fort.py',290), - ('Dimensional -> id DimensionsOrEmpty','Dimensional',2,'p_Dimensional','fort.py',298), - ('DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen','DimensionsOrEmpty',5,'p_DimensionsOrEmpty','fort.py',305), - ('DimensionsOrEmpty -> ','DimensionsOrEmpty',0,'p_DimensionsOrEmpty','fort.py',306), - ('ComaEAOrEmpty -> coma EA action_setDim2','ComaEAOrEmpty',3,'p_ComaEAOrEmpty','fort.py',312), - ('ComaEAOrEmpty -> ','ComaEAOrEmpty',0,'p_ComaEAOrEmpty','fort.py',313), - ('RDimensional -> Dimensional','RDimensional',1,'p_RDimensional','fort.py',319), - ('RDimensional -> RDimensional coma Dimensional','RDimensional',3,'p_RDimensional','fort.py',320), - ('RDimOrString -> DimOrString','RDimOrString',1,'p_RDimOrString','fort.py',326), - ('RDimOrString -> RDimOrString coma DimOrString','RDimOrString',3,'p_RDimOrString','fort.py',327), - ('DimOrString -> Dimensional action_1 action_33','DimOrString',3,'p_DimOrString','fort.py',333), - ('DimOrString -> string action_34','DimOrString',2,'p_DimOrString','fort.py',334), - ('Relif -> openParen EL closedParen action_17 then B','Relif',6,'p_Relif','fort.py',340), - ('Relif -> Relif elif action_18 openParen EL closedParen action_17 then B','Relif',9,'p_Relif','fort.py',341), - ('ElseOrEmpty -> else action_19 B','ElseOrEmpty',3,'p_ElseOrEmpty','fort.py',347), - ('ElseOrEmpty -> ','ElseOrEmpty',0,'p_ElseOrEmpty','fort.py',348), - ('IntOrEmpty -> coma int action_28','IntOrEmpty',3,'p_IntOrEmpty','fort.py',354), - ('IntOrEmpty -> action_27','IntOrEmpty',1,'p_IntOrEmpty','fort.py',355), - ('EA -> MultDiv','EA',1,'p_EA','fort.py',361), - ('EA -> EA SumOrSub action_3 MultDiv action_4','EA',5,'p_EA','fort.py',362), - ('SumOrSub -> plus','SumOrSub',1,'p_SumOrSub','fort.py',368), - ('SumOrSub -> minus','SumOrSub',1,'p_SumOrSub','fort.py',369), - ('MultDiv -> EAParens','MultDiv',1,'p_MultDiv','fort.py',376), - ('MultDiv -> MultDiv MDSymbols action_5 EAParens action_6','MultDiv',5,'p_MultDiv','fort.py',377), - ('MDSymbols -> mul','MDSymbols',1,'p_MDSymbols','fort.py',383), - ('MDSymbols -> div','MDSymbols',1,'p_MDSymbols','fort.py',384), - ('EAParens -> EItem','EAParens',1,'p_EAParens','fort.py',391), - ('EAParens -> openParen EA closedParen','EAParens',3,'p_EAParens','fort.py',392), - ('EL -> AND','EL',1,'p_EL','fort.py',398), - ('EL -> EL or action_10 AND action_9','EL',5,'p_EL','fort.py',399), - ('AND -> Equality','AND',1,'p_AND','fort.py',405), - ('AND -> AND and action_12 Equality action_11','AND',5,'p_AND','fort.py',406), - ('Equality -> EItem EQSymbols action_13 EItem action_14','Equality',5,'p_Equality','fort.py',412), - ('Equality -> openParen EL closedParen','Equality',3,'p_Equality','fort.py',413), - ('Equality -> not EL action_15','Equality',3,'p_Equality','fort.py',414), - ('EItem -> Dimensional action_1','EItem',2,'p_EItem','fort.py',420), - ('EItem -> int action_2','EItem',2,'p_EItem','fort.py',421), - ('EItem -> rea action_2_rea','EItem',2,'p_EItem','fort.py',422), - ('EQSymbols -> less','EQSymbols',1,'p_EQSymbols','fort.py',428), - ('EQSymbols -> more','EQSymbols',1,'p_EQSymbols','fort.py',429), - ('EQSymbols -> doubleEquals','EQSymbols',1,'p_EQSymbols','fort.py',430), - ('EQSymbols -> notEquals','EQSymbols',1,'p_EQSymbols','fort.py',431), - ('EQSymbols -> lessEquals','EQSymbols',1,'p_EQSymbols','fort.py',432), - ('EQSymbols -> moreEquals','EQSymbols',1,'p_EQSymbols','fort.py',433), - ('action_addSymbols -> ','action_addSymbols',0,'p_action_addSymbols','fort.py',442), + ('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',496), - ('action_2_rea -> ','action_2_rea',0,'p_action_2_rea','fort.py',502), - ('action_3 -> ','action_3',0,'p_action_3','fort.py',508), - ('action_4 -> ','action_4',0,'p_action_4','fort.py',513), - ('action_5 -> ','action_5',0,'p_action_5','fort.py',536), - ('action_6 -> ','action_6',0,'p_action_6','fort.py',541), - ('action_7 -> ','action_7',0,'p_action_7','fort.py',564), - ('action_8 -> ','action_8',0,'p_action_8','fort.py',607), - ('action_9 -> ','action_9',0,'p_action_9','fort.py',625), - ('action_10 -> ','action_10',0,'p_action_10','fort.py',648), - ('action_11 -> ','action_11',0,'p_action_11','fort.py',653), - ('action_12 -> ','action_12',0,'p_action_12','fort.py',676), - ('action_13 -> ','action_13',0,'p_action_13','fort.py',681), - ('action_14 -> ','action_14',0,'p_action_14','fort.py',686), - ('action_15 -> ','action_15',0,'p_action_15','fort.py',709), - ('action_16 -> ','action_16',0,'p_action_16','fort.py',724), - ('action_17 -> ','action_17',0,'p_action_17','fort.py',729), - ('action_18 -> ','action_18',0,'p_action_18','fort.py',745), - ('action_19 -> ','action_19',0,'p_action_19','fort.py',755), - ('action_20 -> ','action_20',0,'p_action_20','fort.py',765), - ('action_21 -> ','action_21',0,'p_action_21','fort.py',773), - ('action_22 -> ','action_22',0,'p_action_22','fort.py',779), - ('action_23 -> ','action_23',0,'p_action_23','fort.py',792), - ('action_24 -> ','action_24',0,'p_action_24','fort.py',801), - ('action_25 -> ','action_25',0,'p_action_25','fort.py',815), - ('action_26 -> ','action_26',0,'p_action_26','fort.py',833), - ('action_27 -> ','action_27',0,'p_action_27','fort.py',859), - ('action_28 -> ','action_28',0,'p_action_28','fort.py',865), - ('action_29 -> ','action_29',0,'p_action_29','fort.py',871), - ('action_30 -> ','action_30',0,'p_action_30','fort.py',894), - ('action_31 -> ','action_31',0,'p_action_31','fort.py',902), - ('action_32 -> ','action_32',0,'p_action_32','fort.py',909), - ('action_33 -> ','action_33',0,'p_action_33','fort.py',918), - ('action_34 -> ','action_34',0,'p_action_34','fort.py',927), - ('action_35 -> ','action_35',0,'p_action_35','fort.py',935), - ('action_setDim1 -> ','action_setDim1',0,'p_action_setDim1','fort.py',942), - ('action_setDim2 -> ','action_setDim2',0,'p_action_setDim2','fort.py',954), + ('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), ] diff --git a/final_lang/prueba.fort b/final_lang/prueba.fort new file mode 100644 index 0000000..ca9b6cf --- /dev/null +++ b/final_lang/prueba.fort @@ -0,0 +1,53 @@ +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' + read option + if (option == 1) then + print 'Enter the number' + read x + result = 1 + do counter = 1, x then + result = result * counter + end do + print 'The result is : ', result + elif (option == 2) then + print 'Enter the base' + read x + print 'Enter the exponent' + read y + result = 1 + do counter = 1, y then + result = result * x + end do + print 'The result is : ', result + elif (option == 3) then + print 'Enter the exponent' + read x + result = 0 + do counter = 0, 10 then + factorial = 1 + do counter2 = 1, counter then + factorial = factorial * counter2 + end do + exponential = 1 + do counter2 = 1, counter then + exponential = exponential * x + end do + result = result + exponential / factorial + end do + print 'The result is : ', result + else + print 'Not a valid option' + end if + print 'Would you like to make another calculation? (type 1 for yes or 0 for no)' + read option + if (option == 0) then + exit + end if +end do +end program \ No newline at end of file diff --git a/final_lang/prueba.fort.out b/final_lang/prueba.fort.out new file mode 100644 index 0000000..1b1908b --- /dev/null +++ b/final_lang/prueba.fort.out @@ -0,0 +1,94 @@ +print 'Choose and option' +print endline +print '1 - Calculate the factorial of a number' +print endline +print '2 - Calculate a number to the power of another number' +print endline +print '3 - Calculate e to the power of a number' +print endline +read $50 +== $50 1 $0 +gotoF $0 28 +print 'Enter the number' +print endline +read $52 += 1 $51 += 1 $54 +<= $54 $52 $0 +gotoF $0 24 +* $51 $54 $1 += $1 $51 ++ $54 1 $1 += $1 $54 +goto 17 +print 'The result is : ' +print $51 +print endline +goto 88 +== $50 2 $1 +gotoF $1 49 +print 'Enter the base' +print endline +read $52 +print 'Enter the exponent' +print endline +read $53 += 1 $51 += 1 $54 +<= $54 $53 $1 +gotoF $1 45 +* $51 $52 $2 += $2 $51 ++ $54 1 $2 += $2 $54 +goto 38 +print 'The result is : ' +print $51 +print endline +goto 88 +== $50 3 $2 +gotoF $2 86 +print 'Enter the exponent' +print endline +read $52 += 0 $51 += 0 $54 +<= $54 10 $2 +gotoF $2 82 += 1 $56 += 1 $55 +<= $55 $54 $3 +gotoF $3 67 +* $56 $55 $4 += $4 $56 ++ $55 1 $4 += $4 $55 +goto 60 += 1 $57 += 1 $55 +<= $55 $54 $4 +gotoF $4 76 +* $57 $52 $5 += $5 $57 ++ $55 1 $5 += $5 $55 +goto 69 +/ $57 $56 $5 ++ $51 $5 $6 += $6 $51 ++ $54 1 $6 += $6 $54 +goto 56 +print 'The result is : ' +print $51 +print endline +goto 88 +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 diff --git a/final_lang/test.fort.out b/final_lang/test.fort.out index c59579e..ca26abc 100644 --- a/final_lang/test.fort.out +++ b/final_lang/test.fort.out @@ -1,4 +1,107 @@ -+ $58 $51 $0 -= $0 $57 -= 2 $52 -== $53 $55 $0 += 1 $30057 +<= $30057 $30053 $0 +gotoF $0 25 += 1 $30058 +<= $30058 $30054 $1 +gotoF $1 22 +* 0 100 $30052 ++ $30058 $30052 $30052 ++ 20052 $30052 $30052 +* 0 100 $10050 ++ $30058 $10050 $10050 ++ 50 $10050 $10050 +* 0 100 $20051 ++ $30058 $20051 $20051 ++ 10051 $20051 $20051 ++ *10050 *20051 $2 += $2 *30052 += 2 $20153 ++ $30058 1 $2 += $2 $30058 +goto 5 ++ $30057 1 $2 += $2 $30057 +goto 2 += 1 $30057 +<= $30057 $30053 $2 +gotoF $2 45 += 1 $30058 +<= $30058 $30054 $3 +gotoF $3 40 +* 0 100 $30052 ++ $30058 $30052 $30052 ++ 20052 $30052 $30052 +print *30052 +print ' ' +print endline ++ $30058 1 $4 += $4 $30058 +goto 29 +print ' +' +print endline ++ $30057 1 $4 += $4 $30057 +goto 26 += 1 $30057 +<= $30057 $30053 $4 +gotoF $4 67 += 1 $30058 +<= $30058 $30054 $5 +gotoF $5 64 +print 'Enter value (' +print $30057 +print ',' +print $30058 +print ') For matrix1 +' +print endline +* 0 100 $10050 ++ $30058 $10050 $10050 ++ 50 $10050 $10050 +read *10050 ++ $30058 1 $6 += $6 $30058 +goto 49 ++ $30057 1 $6 += $6 $30057 +goto 46 += 1 $30057 +<= $30057 $30053 $6 +gotoF $6 89 += 1 $30058 +<= $30058 $30054 $7 +gotoF $7 86 +print 'Enter value (' +print $30057 +print ',' +print $30058 +print ') For matrix2 +' +print endline +* 0 100 $20051 ++ $30058 $20051 $20051 ++ 10051 $20051 $20051 +read *20051 ++ $30058 1 $8 += $8 $30058 +goto 71 ++ $30057 1 $8 += $8 $30057 +goto 68 +print 'Enter the rows of the first matrix' +print endline +read $30053 +print 'Enter the columns for the first matrix' +print endline +read $30054 +print 'Enter the rows of the second matrix' +print endline +read $30055 +print 'Enter the columns for the second matrix' +print endline +read $30056 +== $30053 $30055 $8 +gotoF $8 104 +goto 105 +goto 101 diff --git a/final_lang/test2.fort b/final_lang/test2.fort index 7d6993d..0e372eb 100644 --- a/final_lang/test2.fort +++ b/final_lang/test2.fort @@ -1,25 +1,8 @@ program test -integer :: a, b, c, d, x, y, z, w -real :: e, f -a = 2 + 4 * (2 + 1) / 3 * b -b = a -if (a > b) then - a = x -elif (a > c) then - a = y -elif (a > d) then - a = z -else - a = w -end if -do then - if (a > b .or. c > b) then - exit - end if - a = a + 1 -end do -b = 0 -do a = b + 1, 10, 2 then - b = a -end do +integer [2][2] :: a +integer :: i, j +a(0,0) = 1 +i = 0 +j = 1 +print a(j,i) end program \ No newline at end of file diff --git a/final_lang/test2.fort.out b/final_lang/test2.fort.out index 1423dc3..93f5c07 100644 --- a/final_lang/test2.fort.out +++ b/final_lang/test2.fort.out @@ -1,37 +1,7 @@ -+ 2 1 $0 -* 4 $0 $1 -/ $1 3 $0 -* $0 $51 $1 -+ 2 $1 $0 -= $0 $50 -= $50 $51 -> $50 $51 $0 -gotoF $0 12 -= $54 $50 -goto 21 -> $50 $52 $0 -gotoF $0 16 -= $55 $50 -goto 21 -> $50 $53 $0 -gotoF $0 20 -= $56 $50 -goto 21 -= $57 $50 -> $50 $51 $0 -> $52 $51 $1 -.or. $0 $1 $2 -gotoF $2 26 -goto 29 -+ $50 1 $2 -= $2 $50 -goto 21 -= 0 $51 -+ $51 1 $2 -= $2 $50 -<= $50 10 $2 -gotoF $2 38 -= $50 $51 -+ $50 2 $0 -= $0 $50 -goto 32 += 1 $50 += 0 $55 += 1 $56 +* 0 2 $54 ++ $55 $54 $54 ++ 50 $54 $54 +print *54 diff --git a/final_lang/test3.fort b/final_lang/test3.fort deleted file mode 100644 index 82692cb..0000000 --- a/final_lang/test3.fort +++ /dev/null @@ -1,6 +0,0 @@ -program test -integer [10] :: a, b -integer :: c -print a(3), ' ', b(0), ' ', c, ' hello' -c = 2 -end program \ No newline at end of file diff --git a/final_lang/test3.fort.out b/final_lang/test3.fort.out deleted file mode 100644 index 67a77c6..0000000 --- a/final_lang/test3.fort.out +++ /dev/null @@ -1,8 +0,0 @@ -print $53 -print ' ' -print $61 -print ' ' -print $72 -print ' hello' -print "\n" -= 2 $72