From d11954ea1dc5b2ceb74c0da5c7b6d8b1ec64fb7f Mon Sep 17 00:00:00 2001 From: Pablo A Fuentes <91356359+pfuentes2021@users.noreply.github.com> Date: Sat, 25 Sep 2021 03:02:59 -0400 Subject: [PATCH 1/9] Add files via upload --- src/check_inherit.py | 96 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 src/check_inherit.py diff --git a/src/check_inherit.py b/src/check_inherit.py new file mode 100644 index 000000000..b5518f4cd --- /dev/null +++ b/src/check_inherit.py @@ -0,0 +1,96 @@ +import visitor +import cool_ast as ast +from errors import * + +class CheckInherintance1: + def __init__(self, types): + self.types = types + self.errors = False + + @visitor.on('node') + def visit(self, node): + pass + + @visitor.when(ast.ProgramNode) + def visit(self, node): + for expr in node.expr: + self.visit(expr) + + @visitor.when(ast.ClassNode) + def visit(self, node): + if node.inherits: + if not self.types.is_defined(node.inherits): + self.errors = True + print(TypeError(node.line, node.index2, "Class {} inherits from an undefined class {}.".format(node.type, node.inherits))) + else: + parent = self.types.get_type(node.inherits) + p = parent + #Check cycles + while p != None: + if p.name == node.type: + self.errors = True + print(SemanticError(node.line, node.index2, "Class {}, or an ancestor of {}, is involved in an inheritance cycle.".format(node.type, node.type))) + return + p = p.inherits + self.types.change_inherits(node.type, node.inherits) + +class CheckInherintance2: + def __init__(self): + self.errors = False + + @visitor.on('node') + def visit(self, node): + pass + + @visitor.when(ast.ProgramNode) + def visit(self, node): + for expr in node.expr: + self.visit(expr) + + @visitor.when(ast.ClassNode) + def visit(self, node): + for n in node.body: + self.visit(n, node.info) + + @visitor.when(ast.PropertyNode) + def visit(self, node, info): + self.visit(node.decl, info) + + #Check attribute inherited + @visitor.when(ast.DeclarationNode) + def visit(self, node, info): + parent = info.inherits + while parent != None: + if node.id in parent.attrb.keys(): + aux = parent.attrb[node.id] + if node.type == aux.decl.type: + self.errors = True + print(SemanticError(node.line, node.index, "Attribute {} is an attribute of an inherited class.".format(node.id))) + break + parent = parent.inherits + + #Check overloads methods + @visitor.when(ast.MethodNode) + def visit(self, node, info): + parent = info.inherits + while parent != None: + if node.name in parent.methods.keys(): + aux = parent.methods[node.name] + if node.type_ret != aux.type_ret: + self.errors = True + print(SemanticError(node.line, node.index2, "In redefined method {}, return type {} is different from original return type {}.".format(node.name, node.type_ret, aux.type_ret))) + break + elif len(node.params) != len(aux.params_types): + self.errors = True + print(SemanticError(node.line, node.index, "Incompatible number of formal parameters in redefined method {}.".format(node.name))) + break + else: + params = aux.params_types + i = -1 + for param in node.params: + i += 1 + if param.type != params[i]: + self.errors = True + print(SemanticError(param.line, param.index, "In redefined method {}, parameter type {} is different from original type {}.".format(node.name, param.type, params[i]))) + return + parent = parent.inherits \ No newline at end of file From 0d4dc5963538c0b0f70bbc21543b1cf89d64b136 Mon Sep 17 00:00:00 2001 From: Pablo A Fuentes <91356359+pfuentes2021@users.noreply.github.com> Date: Sat, 25 Sep 2021 03:03:52 -0400 Subject: [PATCH 2/9] Add files via upload --- src/check_semantics.py | 165 ++++++++++ src/check_types.py | 382 +++++++++++++++++++++++ src/code_gen.py | 683 +++++++++++++++++++++++++++++++++++++++++ src/code_to_cil.py | 528 +++++++++++++++++++++++++++++++ src/cool_ast.py | 241 +++++++++++++++ src/cool_cil.py | 200 ++++++++++++ src/coolc.sh | 13 +- src/errors.py | 59 ++++ src/main.py | 59 ++++ src/my_lexer.py | 351 +++++++++++++++++++++ src/my_parser.py | 296 ++++++++++++++++++ src/parsetab.py | 109 +++++++ src/semantics.py | 127 ++++++++ src/utils.py | 147 +++++++++ src/visitor.py | 80 +++++ 15 files changed, 3435 insertions(+), 5 deletions(-) create mode 100644 src/check_semantics.py create mode 100644 src/check_types.py create mode 100644 src/code_gen.py create mode 100644 src/code_to_cil.py create mode 100644 src/cool_ast.py create mode 100644 src/cool_cil.py create mode 100644 src/errors.py create mode 100644 src/main.py create mode 100644 src/my_lexer.py create mode 100644 src/my_parser.py create mode 100644 src/parsetab.py create mode 100644 src/semantics.py create mode 100644 src/utils.py create mode 100644 src/visitor.py diff --git a/src/check_semantics.py b/src/check_semantics.py new file mode 100644 index 000000000..13b934ca6 --- /dev/null +++ b/src/check_semantics.py @@ -0,0 +1,165 @@ +import visitor +import cool_ast as ast +from errors import * +from utils import VarInfo + +class CheckSemantics: + def __init__(self, types): + self.types = types + self.errors = False + self.current_type = None + + @visitor.on('node') + def visit(self, node): + pass + + @visitor.when(ast.ProgramNode) + def visit(self, node): + main = self.types.get_type("Main") + if not main or not "main" in main.methods: + self.errors = True + print(SemanticError(0, 0, "There is no entry point. Couldnt find Main.main()")) + for expr in node.expr: + scope = self.types.get_scope(expr.type) + self.visit(expr, scope) + + @visitor.when(ast.ClassNode) + def visit(self, node, scope): + self.current_type = node.info + for n in node.body: + self.visit(n, scope) + + @visitor.when(ast.PropertyNode) + def visit(self, node, scope): + expr = node.decl.expr + if expr != None: + self.visit(expr, scope) + + @visitor.when(ast.DeclarationNode) + def visit(self, node, scope, n = ""): + if node.id == "self": + self.errors = True + if n == "param": + print(SemanticError(node.line, node.index, "'self' cannot be the name of a formal parameter.")) + elif n == "let": + print(SemanticError(node.line, node.index, "'self' cannot be bound in a 'let' expression.")) + elif n == "case": + print(SemanticError(node.line, node.index, "'self' cannot be bound in a 'case' expression.")) + else: + if node.expr != None: + self.visit(node.expr, scope) + if scope.is_local(node.id) and n != "let": + self.errors = True + if n == "param": + print(SemanticError(node.line, node.index, "Formal parameter a is multiply defined")) + else: + print(SemanticError(node.line, node.index, "Variable {} already defined.".format(node.id))) + else: + node.var_info = scope.append(node.id) + + @visitor.when(ast.MethodNode) + def visit(self, node, scope): + new_scope = scope.new_scope() + for param in node.params: + self.visit(param, new_scope, "param") + self.visit(node.body, new_scope) + + @visitor.when(ast.AssignNode) + def visit(self, node, scope): + if node.id == "self": + self.errors = True + print(SemanticError(node.line, node.index2, "Cannot assign to 'self'.")) + else: + self.visit(node.expr, scope) + node.var_info = scope.get_var(node.id) + if node.var_info == None: + node.var_info = scope.append(node.id) + + @visitor.when(ast.WhileNode) + def visit(self, node, scope): + new_scope = scope.new_scope() + self.visit(node.conditional, scope) + self.visit(node.expr, new_scope) + + @visitor.when(ast.IfNode) + def visit(self, node, scope): + new_scope = scope.new_scope() + self.visit(node.conditional, scope) + self.visit(node.expr_then, new_scope) + self.visit(node.expr_else, new_scope) + + @visitor.when(ast.LetInNode) + def visit(self, node, scope): + new_scope = scope.new_scope() + for decl in node.decl_list: + self.visit(decl, new_scope, "let") + self.visit(node.expr, new_scope) + + @visitor.when(ast.CaseNode) + def visit(self, node, scope): + self.visit(node.expr, scope) + for case in node.case_list: + self.visit(case, scope) + + @visitor.when(ast.CaseItemNode) + def visit(self, node, scope): + new_scope = scope.new_scope() + self.visit(node.variable, new_scope, "case") + self.visit(node.expr, new_scope) + + @visitor.when(ast.DispatchNode) + def visit(self, node, scope): + for param in node.params: + self.visit(param, scope) + + @visitor.when(ast.DispatchInstanceNode) + def visit(self, node, scope): + self.visit(node.variable, scope) + for param in node.params: + self.visit(param, scope) + + @visitor.when(ast.DispatchParentInstanceNode) + def visit(self, node, scope): + self.visit(node.variable, scope) + for param in node.params: + self.visit(param, scope) + + @visitor.when(ast.BlockNode) + def visit(self, node, scope): + for expr in node.expr_list: + self.visit(expr, scope) + + @visitor.when(ast.BinaryOperatorNode) + def visit(self, node, scope): + self.visit(node.left, scope) + self.visit(node.right, scope) + + @visitor.when(ast.UnaryOperator) + def visit(self, node, scope): + self.visit(node.expr, scope) + + @visitor.when(ast.NotNode) + def visit(self, node, scope): + self.visit(node.expr, scope) + + @visitor.when(ast.ComplementNode) + def visit(self, node, scope): + self.visit(node.expr, scope) + + @visitor.when(ast.IsVoidNode) + def visit(self, node, scope): + self.visit(node.expr, scope) + + @visitor.when(ast.VariableNode) + def visit(self, node, scope): + if node.id != 'self': + node.var_info = scope.get_var(node.id) + if node.var_info == None: + self.errors = True + print(NameError(node.line, node.index, "Undeclared identifier {}.".format(node.id))) + else: + node.var_info = VarInfo("self", self.current_type) + + @visitor.when(ast.NegationNode) + def visit(self, node, scope): + self.visit(node.expr, scope) diff --git a/src/check_types.py b/src/check_types.py new file mode 100644 index 000000000..2c1a8aaf4 --- /dev/null +++ b/src/check_types.py @@ -0,0 +1,382 @@ +import visitor +import cool_ast as ast +from errors import * + +class CheckTypes: + def __init__(self, types): + self.class_type = None + self.types = types + self.errors = False + + @visitor.on('node') + def visit(self, node): + pass + + @visitor.when(ast.ProgramNode) + def visit(self, node): + for expr in node.expr: + self.visit(expr) + + @visitor.when(ast.ClassNode) + def visit(self, node): + node.type_expr = self.types.get_type(node.type) + self.class_type = node.type_expr + if not node.type_expr: + self.errors = True + print(TypeError(node.line, node.index, "Type {} is not defined".format(node.type))) + for expr in node.body: + self.visit(expr) + return node.type_expr + + @visitor.when(ast.PropertyNode) + def visit(self, node): + node.type_expr = self.visit(node.decl, "attrb") + return node.type_expr + + @visitor.when(ast.DeclarationNode) + def visit(self, node, n): + aux = self.types.get_type(node.type) + if aux == None: + self.errors = True + if n == "param": + print(TypeError(node.line, node.index2, "Class {} of formal parameter {} is undefined.".format(node.type, node.id))) + elif n == "let": + print(TypeError(node.line, node.index2, "Class {} of let-bound identifier {} is undefined.".format(node.type, node.id))) + elif n == "attrb": + print(TypeError(node.line, node.index2, "Class {} of attribute {} is undefined.".format(node.type, node.id))) + elif n == "case": + print(TypeError(node.line, node.index2, "Class {} of case branch is undefined.".format(node.type))) + else: + if node.expr != None: + expr = self.visit(node.expr) + if not self.types.check_variance(aux, expr): + self.errors = True + print(TypeError(node.expr.line, node.expr.index, "Inferred type {} of initialization of attribute {} does not conform to declared type {}.".format(expr.name, node.id, node.type))) + node.type = node.var_info.type = aux + return node.type + + @visitor.when(ast.MethodNode) + def visit(self, node): + for param in node.params: + self.visit(param, "param") + if not self.types.is_defined(node.type_ret): + self.errors = True + print(TypeError(node.line, node.index2, "Undefined return type {} in method {}.".format(node.type_ret, node.name)))#OH + node.type_expr = self.visit(node.body) + ret = self.types.get_type(node.type_ret) + variance = self.types.check_variance(ret, node.type_expr) + if not variance: + self.errors = True + print(TypeError(node.body.line, node.body.index, "Inferred return type {} of method {} does not conform to declared return type {}.".format(node.type_expr.name, node.name, node.type_ret))) + return node.type_expr + + @visitor.when(ast.AssignNode) + def visit(self, node): + expr = self.visit(node.expr) + if node.var_info.type != self.types.get_type("Void"): + variance = self.types.check_variance(node.var_info.type, expr) + if not variance: + self.errors = True + print(TypeError(node.line, node.index2, "Type mistmatch with variable {}".format(node.var_info.name))) + node.type_expr = node.var_info.type = expr + return node.type_expr + + @visitor.when(ast.WhileNode) + def visit(self, node): + node.type_expr = self.types.get_type("Object") + self.visit(node.expr) + expr = self.visit(node.conditional) + if expr != self.types.get_type("Bool"): + self.errors = True + print(TypeError(node.line, node.index2, "Loop condition does not have type Bool")) + return node.type_expr + + @visitor.when(ast.IfNode) + def visit(self, node): + expr = self.visit(node.conditional) + if expr != self.types.get_type("Bool"): + self.errors = True + print(TypeError(node.conditional.line, node.conditional.index, "Predicate of 'if' does not have type Bool.")) + then_expr = self.visit(node.expr_then) + else_expr = self.visit(node.expr_else) + node.type_expr = self.types.check_inheritance(then_expr, else_expr) + return node.type_expr + + @visitor.when(ast.LetInNode) + def visit(self, node): + for n in node.decl_list: + self.visit(n, "let") + node.type_expr = self.visit(node.expr) + return node.type_expr + + @visitor.when(ast.CaseNode) + def visit(self, node): + self.visit(node.expr) + aux = self.visit(node.case_list[0], []) + list = [node.case_list[0].variable.type] + for i in range(1, len(node.case_list)): + expr = self.visit(node.case_list[i], list) + aux = self.types.check_inheritance(expr, aux) + list.append(node.case_list[i].variable.type) + node.type_expr = aux + return node.type_expr + + @visitor.when(ast.CaseItemNode) + def visit(self, node, list): + self.visit(node.variable, "case") + if node.variable.type in list: + self.errors = True + print(SemanticError(node.line, node.index, "Duplicate branch {} in case statement.".format(node.variable.type.name))) + aux = self.visit(node.expr) + if aux == None: + self.errors = True + print(SemanticError(node.line, node.index, "The expresion is None")) + else: + node.type_expr = aux + return node.type_expr + + @visitor.when(ast.DispatchNode) + def visit(self, node): + method = None + id_class = self.class_type + while not method and id_class: + for n, m in id_class.methods.items(): + if n == node.id: + method = m + break + id_class = id_class.inherits + if not method: + self.errors = True + print(AttributeError(node.line, node.index, "Dispatch to undefined method {}.".format(node.id))) + return self.types.get_type("Void") + elif len(method.params_types) != len(node.params): + self.errors = True + print(SemanticError(node.line, node.index, "Method {} called with wrong number of arguments".format(node.id))) + else: + for i in range(len(node.params)): + aux = self.types.get_type(method.params_types[i]) + expr = self.visit(node.params[i]) + if not self.types.check_variance(aux, expr): + self.errors = True + print(TypeError(node.params[i].line, node.params[i].index, "In call of method {}, type {} of parameter number {} does not conform to declared type {}.".format(node.id, expr.name, i, aux.name))) + node.type_expr = self.types.get_type(method.type_ret) + node.type_method = method + return node.type_expr + + @visitor.when(ast.DispatchInstanceNode) + def visit(self, node): + type_var = self.visit(node.variable) + method = None + id_class = type_var + while not method and id_class: + for n, m in id_class.methods.items(): + if n == node.id_method: + method = m + break + id_class = id_class.inherits + node.type_method = method + if not method: + self.errors = True + print(AttributeError(node.line, node.index2, "Class {} doesnt contains method {}.".format(type_var.name, node.id_method))) + return self.types.get_type("Void") + else: + if len(method.params_types) != len(node.params): + self.errors = True + print(SemanticError(node.line, node.index2, "Method {} called with wrong number of arguments".format(node.id_method))) + else: + for i in range(0, len(node.params)): + aux = self.types.get_type(method.params_types[i]) + expr = self.visit(node.params[i]) + if not self.types.check_variance(aux, expr): + self.errors = True + print(TypeError(node.params[i].line, node.params[i].index, "In call of method {}, type {} of parameter number {} does not conform to declared type {}.".format(node.id_method, expr.name, i, aux.name))) + node.type_expr = self.types.get_type(method.type_ret) + return node.type_expr + + @visitor.when(ast.DispatchParentInstanceNode) + def visit(self, node): + type_var = self.visit(node.variable) + id_class = type_var + id_parent = self.types.get_type(node.id_parent) + method = None + if not id_parent: + self.errors = True + print(TypeError(node.line, node.index3, "Type {} is not defined".format(node.id_parent))) + while not method and id_class: + if id_class == id_parent: + for n, m in id_class.methods.items(): + if n == node.id_method: + method = m + break + if not method: + self.errors = True + print(AttributeError(node.line, node.index2, "Parent class {} doesnt have a definition for method {}".format(node.id_parent, node.id_method))) + return self.types.get_type(method.type_ret) + break + id_class = id_class.inherits + if not id_class: + self.errors = True + print(TypeError(node.line, node.index, "Expression type {} does not conform to declared static dispatch type {}. ".format(type_var.name, node.id_parent))) + return self.types.get_type("Void") + else: + if len(method.params_types) != len(node.params): + self.errors = True + print(SemanticError(node.line, node.index2, "Method {} called with wrong number of arguments".format(node.id_method))) + else: + for i in range(0, len(node.params)): + aux = self.types.get_type(method.params_types[i]) + expr = self.visit(node.params[i]) + if not self.types.check_variance(aux, expr): + self.errors = True + print(TypeError(node.params[i].line, node.params[i].index, "In call of method {}, type {} of parameter {} does not conform to declared type {}.".format(node.id_method, expr.name, i, aux.name))) + node.type_expr = self.types.get_type(method.type_ret) + return node.type_expr + + @visitor.when(ast.BlockNode) + def visit(self, node): + node.type_expr = self.types.get_type("Void") + for expr in node.expr_list: + node.type_expr = self.visit(expr) + return node.type_expr + + @visitor.when(ast.PlusNode) + def visit(self, node): + left = self.visit(node.left) + right = self.visit(node.right) + type_int = self.types.get_type("Int") + if left != type_int or right != type_int: + self.errors = True + print(TypeError(node.line, node.index2, "non-Int arguments: {} + {}".format(left.name, right.name))) + node.type_expr = type_int + return node.type_expr + + @visitor.when(ast.MinusNode) + def visit(self, node): + left = self.visit(node.left) + right = self.visit(node.right) + type_int = self.types.get_type("Int") + if left != type_int or right != type_int: + self.errors = True + print(TypeError(node.line, node.index2, "non-Int arguments: {} - {}".format(left.name, right.name))) + node.type_expr = type_int + return node.type_expr + + @visitor.when(ast.StarNode) + def visit(self, node): + left = self.visit(node.left) + right = self.visit(node.right) + type_int = self.types.get_type("Int") + if left != type_int or right != type_int: + self.errors = True + print(TypeError(node.line, node.index2, "non-Int arguments: {} * {}".format(left.name, right.name))) + node.type_expr = type_int + return node.type_expr + + @visitor.when(ast.DivNode) + def visit(self, node): + left = self.visit(node.left) + right = self.visit(node.right) + type_int = self.types.get_type("Int") + if left != type_int or right != type_int: + self.errors = True + print(TypeError(node.line, node.index2, "non-Int arguments: {} / {}".format(left.name, right.name))) + node.type_expr = type_int + return node.type_expr + + @visitor.when(ast.NotNode) + def visit(self, node): + expr = self.visit(node.expr) + if expr != self.types.get_type("Bool"): + self.errors = True + print(TypeError(node.line, node.index2, "Argument of 'not' has type {} instead of Bool.".format(expr.name))) + node.type_expr = self.types.get_type("Bool") + return node.type_expr + + @visitor.when(ast.ComplementNode) + def visit(self, node): + expr = self.visit(node.expr) + type_int = self.types.get_type("Int") + if expr != type_int: + self.errors = True + print(TypeError(node.line, node.index2, "Argument of '~' has type {} instead of Int.".format(expr.name))) + node.type_expr = type_int + return node.type_expr + + @visitor.when(ast.IsVoidNode) + def visit(self, node): + node.type_expr = self.types.get_type("Bool") + return node.type_expr + + @visitor.when(ast.NewNode) + def visit(self, node): + node.type_expr = self.types.get_type(node.type) + if not node.type_expr: + self.errors = True + print(TypeError(node.line, node.index2, "'new' used with undefined class {}.".format(node.type))) + return node.type_expr + + @visitor.when(ast.LessThanNode) + def visit(self, node): + node.type_expr = self.types.get_type("Bool") + left = self.visit(node.left) + right = self.visit(node.right) + if left == right == self.types.get_type("Int"): + return node.type_expr + self.errors = True + print(TypeError(node.line, node.index2, "non-Int arguments: {} < {}".format(left.name, right.name))) + return node.type_expr + + @visitor.when(ast.LessEqualNode) + def visit(self, node): + node.type_expr = self.types.get_type("Bool") + left = self.visit(node.left) + right = self.visit(node.right) + if left == right == self.types.get_type("Int"): + return node.type_expr + self.errors = True + print(TypeError(node.line, node.index2, "non-Int arguments: {} <= {}".format(left.name, right.name))) + return node.type_expr + + @visitor.when(ast.EqualNode) + def visit(self, node): + node.type_expr = self.types.get_type("Bool") + left = self.visit(node.left) + right = self.visit(node.right) + static = ["Int", "Bool", "String"] + if (left.name in static or right.name in static) and left != right: + self.errors = True + print(TypeError(node.line, node.index2, "Illegal comparison with a basic type.")) + return node.type_expr + + @visitor.when(ast.VariableNode) + def visit(self, node): + if node.id == "self": + node.type_expr = self.class_type + else: + node.type_expr = node.var_info.type + return node.type_expr + + @visitor.when(ast.IntegerNode) + def visit(self, node): + node.type_expr = self.types.get_type("Int") + return node.type_expr + + @visitor.when(ast.StringNode) + def visit(self, node): + node.type_expr = self.types.get_type("String") + return node.type_expr + + @visitor.when(ast.BooleanNode) + def visit(self, node): + node.type_expr = self.types.get_type("Bool") + return node.type_expr + + @visitor.when(ast.NegationNode) + def visit(self, node): + type_int = self.types.get_type("Int") + node.type_expr = type_int + expr = self.visit(node.expr) + if expr != type_int: + self.errors = True + print(TypeError(node.line, node.index, "Negation operator is only valid with Integers")) + return node.type_expr \ No newline at end of file diff --git a/src/code_gen.py b/src/code_gen.py new file mode 100644 index 000000000..4a564c25e --- /dev/null +++ b/src/code_gen.py @@ -0,0 +1,683 @@ +import visitor +import cool_cil as cil + +class CodeGen: + def __init__(self): + self.output = [] + self.arguments = [] + self.types = {} + self.sp = 0 + self.gp = 0 + self.buffer = 0 + + def write(self, text): + if text is '\n': + self.output.append(text) + else: + self.output.append(text + '\n') + + @visitor.on('node') + def visit(self, node): + pass + + @visitor.when(cil.DataNode) + def visit(self, node): + self.write('{}: .asciiz {}'.format(node.name, node.value)) + + @visitor.when(cil.LabelNode) + def visit(self, node): + self.write('{}:'.format(node.name)) + + @visitor.when(cil.GotoNode) + def visit(self, node): + self.write(' j {}'.format(node.label.name)) + + @visitor.when(cil.GotoIfNode) + def visit(self, node): + if isinstance(node.conditional, int): + self.write(' li $t0 {}'.format(node.conditional)) + elif isinstance(node.conditional, bool): + if node.conditional: + self.write(' li $t0, 1') + else: + self.write(' li $t0, 0') + else: + self.write(' lw $t0 {}($sp)'.format(node.conditional.holder + 4)) + self.write(' beq $t0, 1, {}'.format(node.label.name)) + + @visitor.when(cil.ProgramNode) + def visit(self, node, types): + self.write('.data') + for data in node.data: + self.visit(data) + self.write('\n') + + self.write('.text') + self.write(' la $t0, ($gp)') + + for x in node.types: + self.types[x.name] = x + n = len(x.methods) * 4 + x.position = self.buffer + self.buffer += 8 + n + self.write(' la $t1, {}'.format(x.name)) + self.write(' sw $t1, 4($t0)') + m = 0 + for name, method in x.methods.items(): + method.position = 8 + m + m += 4 + self.write(' la $t2, {}'.format(method.name)) + self.write(' sw $t2, {}($t0)'.format(method.position)) + self.write(' add $t0, $t0, {}'.format(8 + n)) + + self.write(' la $t0, ($gp)') + self.write(' la $t2, ($gp)') + for x in node.types: + n = len(x.methods) * 4 + parent = types.get_parent_type(x.name) + if parent: + self.write(' li $t1, {}'.format(self.types[parent.name].position)) + self.write(' add $t1, $t1, $t2') + else: + self.write(' li $t1, 0') + self.write(' sw $t1, ($t0)') + self.write(' add $t0, $t0, {}'.format(8 + n)) + self.write(' li $a0, 128') + self.write(' li $v0, 9') + self.write(' syscall') + self.write(' sw $v0, {}($gp)'.format(self.buffer)) + + for n in node.code: + self.write('\n') + self.visit(n) + + self.write('length:') + self.write(' xor $t0, $t0, $t0') #letras + self.write(' xor $t1, $t1, $t1') #cero + self.write(' xor $v0, $v0, $v0') #result + self.write('loop_length:') + self.write(' lb $t0, ($a0)') + self.write(' beq $t0, $t1, end_length') + self.write(' addu $v0, $v0, 1') + self.write(' addu $a0, $a0, 1') + self.write(' j loop_length') + self.write('end_length:') + self.write(' jr $ra') + + self.write('concat:') + self.write(' xor $t0, $t0, $t0') # letras + self.write(' xor $t1, $t1, $t1') # cero + self.write('loop_concat1:') + self.write(' lb $t0, ($a0)') + self.write(' beq $t0, $t1, concat2') + self.write(' sb $t0, ($a2)') + self.write(' add $a0, $a0, 1') + self.write(' add $a2, $a2, 1') + self.write(' j loop_concat1') + self.write(' concat2:') + self.write('loop_concat2:') + self.write(' lb $t0, ($a1)') + self.write(' beq $t0, $t1, end_concat') + self.write(' sb $t0, ($a2)') + self.write(' add $a1, $a1, 1') + self.write(' add $a2, $a2, 1') + self.write(' j loop_concat2') + self.write('end_concat:') + self.write(' sb $t1, ($a2)') + self.write(' jr $ra') + + self.write('substring:') + self.write(' xor $t1, $t1, $t1') #cero + self.write(' add $a0, $a0, $a1') + self.write('write_substring:') + self.write(' lb $t0, ($a0)') + self.write(' beq $a2, $t1, end_substring') + self.write(' sb $t0, ($a3)') + self.write(' add $a0, $a0, 1') + self.write(' add $a3, $a3, 1') + self.write(' subu $a2, $a2, 1') + self.write(' j write_substring') + self.write('end_substring:') + self.write(' sb $t1, ($a3)') + self.write(' jr $ra') + + self.write('check_hierarchy:') + self.write(' la $t0, ($a0)') + self.write(' la $t1, ($a1)') + self.write(' xor $t2, $t2, $t2') + self.write(' beq $t0, $t1, goodend_check_hierarchy') + self.write('loop_check_hierarchy:') + self.write(' lw $t1, ($t1)') + self.write(' beq $t1, $t2, badend_check_hierarchy') + self.write(' beq $t0, $t1, goodend_check_hierarchy') + self.write(' j loop_check_hierarchy') + self.write('badend_check_hierarchy:') + self.write(' li $v0, 0') + self.write(' jr $ra') + self.write('goodend_check_hierarchy:') + self.write(' li $v0, 1') + self.write(' jr $ra') + + self.write('unboxing:') + self.write(' lw $t0, 4($a0)') + self.write(' beq $t0, 0, not_boxed') + self.write(' ld $v0, ($t0)') + self.write(' j end_unboxing') + self.write('not_boxed:') + self.write(' ld $v0, ($a0)') + self.write('end_unboxing:') + self.write(' jr $ra') + + self.write('error:') + self.write(' break 0') + + @visitor.when(cil.MethodNode) + def visit(self, node): + self.sp = 0 + self.write('{}:'.format(node.name)) + sp = len(node.local_vars) * 8 + n = sp + (len(node.params) - 1) * 8 + for param in node.params: + self.visit(param, n) + n -= 8 + if node.params: + self.write('\n') + self.write(' subu $sp, $sp, {}'.format(sp)) + for vars in node.local_vars: + self.visit(vars) + if node.local_vars: + self.write('\n') + for intruction in node.intructions: + self.visit(intruction) + self.write(' addu $sp, $sp, {}'.format(sp)) + self.write(' jr $ra') + + @visitor.when(cil.ParamNode) + def visit(self, node, n): + node.name.holder = n + + @visitor.when(cil.VarLocalNode) + def visit(self, node): + node.name.holder = self.sp + self.write(' li $t0, 0') + self.write(' sw $t0, {}($sp)'.format(self.sp)) + self.write(' sw $t0, {}($sp)'.format(self.sp + 4)) + self.sp += 8 + + @visitor.when(cil.AssignNode) + def visit(self, node): + if isinstance(node.source, int): + self.write(' la $t0, {}($gp)'.format(self.types["Int"].position)) + self.write(' li $t1, {}'.format(node.source)) + elif isinstance(node.source, bool): + self.write(' la $t0, {}($gp)'.format(self.types["Bool"].position)) + if node.source: + self.write(' li $t1, 1') + else: + self.write(' li $t1, 0') + else: + self.write(' ld $t0, {}($sp)'.format(node.source.holder)) + self.write(' sd $t0, {}($sp)'.format(node.destiny.holder)) + + @visitor.when(cil.GetAttrbNode) + def visit(self, node): + n = self.types[node.type.type.name].attrb.index(node.attrb) * 8 + self.write(' lw $t0, {}($sp)'.format(node.type.holder + 4)) + self.write(' ld $t1, {}($t0)'.format(n)) + self.write(' sd $t1, {}($sp)'.format(node.destiny.holder)) + + @visitor.when(cil.SetAttrbNode) + def visit(self, node): + n = self.types[node.type.type.name].attrb.index(node.attrb) * 8 + self.write(' lw $t0, {}($sp)'.format(node.type.holder + 4)) + if isinstance(node.value, int): + self.write(' la $t1, {}($gp)'.format(self.types["Int"].position)) + self.write(' li $t2, {}'.format(node.value)) + elif isinstance(node.value, bool): + self.write(' la $t1, {}($gp)'.format(self.types["Bool"].position)) + if node.value: + self.write(' li $t2, 1') + else: + self.write(' li $t2, 0') + else: + self.write(' ld $t1, {}($sp)'.format(node.value.holder)) + self.write(' sd $t1, {}($t0)'.format(n)) + + @visitor.when(cil.AllocateNode) + def visit(self, node): + t = self.types[node.type.name] + n = len(t.attrb) * 8 + self.write(' li $a0, {}'.format(n)) + self.write(' li $v0, 9') + self.write(' syscall') + self.write(' sw $v0, {}($sp)'.format(node.destiny.holder + 4)) + self.write(' la $t1, {}($gp)'.format(t.position)) + self.write(' sw $t1, {}($sp)'.format(node.destiny.holder)) + + @visitor.when(cil.LessEqualNode) + def visit(self, node): + if isinstance(node.left, int): + self.write(' li $t1, {}'.format(node.left)) + else: + self.write(' lw $t1, {}($sp)'.format(node.left.holder + 4)) + if isinstance(node.right, int): + self.write(' li $t2, {}'.format(node.right)) + else: + self.write(' lw $t2, {}($sp)'.format(node.right.holder + 4)) + self.write(' sle $t0, $t1, $t2') + self.write(' la $t1, {}($gp)'.format(self.types["Bool"].position)) + self.write(' sw $t1, {}($sp)'.format(node.destiny.holder)) + self.write(' sw $t0, {}($sp)'.format(node.destiny.holder + 4)) + + @visitor.when(cil.LessThanNode) + def visit(self, node): + if isinstance(node.left, int): + self.write(' li $t1, {}'.format(node.left)) + else: + self.write(' lw $t1, {}($sp)'.format(node.left.holder + 4)) + if isinstance(node.right, int): + self.write(' li $t2, {}'.format(node.right)) + else: + self.write(' lw $t2, {}($sp)'.format(node.right.holder + 4)) + + self.write(' slt $t0, $t1, $t2') + self.write(' la $t1, {}($gp)'.format(self.types["Bool"].position)) + self.write(' sw $t1, {}($sp)'.format(node.destiny.holder)) + self.write(' sw $t0, {}($sp)'.format(node.destiny.holder + 4)) + + @visitor.when(cil.EqualNode) + def visit(self, node): + if isinstance(node.left, int): + self.write(' li $t1, {}'.format(node.left)) + elif isinstance(node.left, bool): + if node.left: + self.write(' li $t1, 1') + else: + self.write(' li $t1, 0') + else: + self.write(' lw $t1, {}($sp)'.format(node.left.holder + 4)) + if isinstance(node.right, int): + self.write(' li $t2, {}'.format(node.right)) + elif isinstance(node.right, bool): + if node.right: + self.write(' li $t1, 1') + else: + self.write(' li $t1, 0') + else: + self.write(' lw $t2, {}($sp)'.format(node.right.holder + 4)) + self.write(' seq $t0, $t1, $t2') + self.write(' la $t1, {}($gp)'.format(self.types["Bool"].position)) + self.write(' sw $t1, {}($sp)'.format(node.destiny.holder)) + self.write(' sw $t0, {}($sp)'.format(node.destiny.holder + 4)) + + @visitor.when(cil.PlusNode) + def visit(self, node): + if isinstance(node.right, int): + self.write(' li $t2, {}'.format(node.right)) + else: + self.write(' lw $t2, {}($sp)'.format(node.right.holder + 4)) + if isinstance(node.left, int): + self.write(' li $t1, {}'.format(node.left)) + else: + self.write(' lw $t1, {}($sp)'.format(node.left.holder + 4)) + self.write(' add $t1, $t1, $t2') + self.write(' la $t0, {}($gp)'.format(self.types["Int"].position)) + self.write(' sd $t0, {}($sp)'.format(node.destiny.holder)) + + @visitor.when(cil.MinusNode) + def visit(self, node): + if isinstance(node.right, int): + self.write(' li $t2, {}'.format(node.right)) + else: + self.write(' lw $t2, {}($sp)'.format(node.right.holder + 4)) + if isinstance(node.left, int): + self.write(' li $t1, {}'.format(node.left)) + else: + self.write(' lw $t1, {}($sp)'.format(node.left.holder + 4)) + self.write(' sub $t1, $t1, $t2') + self.write(' la $t0, {}($gp)'.format(self.types["Int"].position)) + self.write(' sd $t0, {}($sp)'.format(node.destiny.holder)) + + @visitor.when(cil.StarNode) + def visit(self, node): + if isinstance(node.right, int): + self.write(' li $t2, {}'.format(node.right)) + else: + self.write(' lw $t2, {}($sp)'.format(node.right.holder + 4)) + if isinstance(node.left, int): + self.write(' li $t1, {}'.format(node.left)) + else: + self.write(' lw $t1, {}($sp)'.format(node.left.holder + 4)) + self.write(' mulo $t1, $t1, $t2') + self.write(' la $t0, {}($gp)'.format(self.types["Int"].position)) + self.write(' sd $t0, {}($sp)'.format(node.destiny.holder)) + + @visitor.when(cil.DivNode) + def visit(self, node): + if isinstance(node.right, int): + self.write(' li $t2, {}'.format(node.right)) + else: + self.write(' lw $t2, {}($sp)'.format(node.right.holder + 4)) + if isinstance(node.left, int): + self.write(' li $t1, {}'.format(node.left)) + else: + self.write(' lw $t1, {}($sp)'.format(node.left.holder + 4)) + self.write(' div $t1, $t2') + self.write(' mflo $t1') + self.write(' la $t0, {}($gp)'.format(self.types["Int"].position)) + self.write(' sd $t0, {}($sp)'.format(node.destiny.holder)) + + @visitor.when(cil.ComplementNode) + def visit(self, node): + if isinstance(node.expr, int): + self.write(' li $t0, {}'.format(node.expr)) + else: + self.write(' lw $t0, {}($sp)'.format(node.expr.holder + 4)) + self.write(' not $t0, $t0') + self.write(' la $t1, {}($gp)'.format(self.types["Int"].position)) + self.write(' sw $t1, {}($sp)'.format(node.destiny.holder)) + self.write(' sw $t0, {}($sp)'.format(node.destiny.holder + 4)) + + @visitor.when(cil.NotNode) + def visit(self, node): + if isinstance(node.expr, int): + self.write(' li $t0, {}'.format(node.expr)) + elif isinstance(node.expr, bool): + if node.expr: + self.write(' li $t0, 1') + else: + self.write(' li $t0, 0') + else: + self.write(' li $t0, {}'.format(node.expr.holder)) + self.write(' not $t0, $t0') + self.write(' la $t1, {}($gp)'.format(self.types["Bool"].position)) + self.write(' sw $t1, {}($sp)'.format(node.destiny.holder)) + self.write(' sw $t0, {}($sp)'.format(node.destiny.holder + 4)) + + @visitor.when(cil.ArgumentNode) + def visit(self, node): + self.arguments.append(node.name) + + @visitor.when(cil.DinamicCallNode) + def visit(self, node): + method = self.types[node.type].methods[node.function].position + n = len(self.arguments) * 8 + i = 8 + self.write(' lw $t2, {}($sp)'.format(self.arguments[0].holder)) + self.write(' subu $sp, $sp, {}'.format(n + 4)) + self.write(' sw $ra, {}($sp)'.format(n)) + for argument in self.arguments: + if isinstance(argument, int): + self.write(' li $t1, {}'.format(argument)) + self.write(' la $t0, {}($gp)'.format(self.types["Int"].position)) + self.write(' sd $t0, {}($sp)'.format(n - i)) + else: + self.write(' ld $t0, {}($sp)'.format(n + 4 + argument.holder)) + self.write(' sd $t0, {}($sp)'.format(n - i)) + i += 8 + self.write(' lw $t0, {}($t2)'.format(method)) + self.write(' jalr $t0') + self.write(' lw $ra, {}($sp)'.format(n)) + self.write(' addu $sp, $sp, {}'.format(n + 4)) + if isinstance(node.destiny, int): + self.write(' sd $v0, {}($sp)'.format(node.destiny)) + else: + self.write(' sd $v0, {}($sp)'.format(node.destiny.holder)) + self.arguments = [] + + @visitor.when(cil.StaticCallNode) + def visit(self, node): + n = len(self.arguments) * 8 + i = 8 + self.write(' subu $sp, $sp, {}'.format(n + 4)) + self.write(' sw $ra, {}($sp)'.format(n)) + for argument in self.arguments: + if isinstance(argument, int): + self.write(' li $t0, {}'.format(argument)) + self.write(' la $t1, {}($gp)'.format(self.types["Int"].position)) + self.write(' sd $t0, {}($sp)'.format(n - i + 4)) + elif isinstance(argument, bool): + if argument: + self.write(' li $t0, 1') + else: + self.write(' li $t0, 0') + self.write(' la $t1, {}($gp)'.format(self.types["Bool"].position)) + self.write(' sd $t0, {}($sp)'.format(n - i + 4)) + else: + self.write(' ld $t0, {}($sp)'.format(n + 4 + argument.holder)) + self.write(' sd $t0, {}($sp)'.format(n - i)) + i += 8 + self.write(' jal {}_{}'.format(node.type, node.function)) + self.write(' lw $ra, {}($sp)'.format(n)) + self.write(' addu $sp, $sp, {}'.format(n + 4)) + self.write(' sd $v0, {}($sp)'.format(node.destiny.holder)) + self.arguments = [] + + @visitor.when(cil.CheckHierarchy) + def visit(self, node): + self.write(' la $a0, {}($gp)'.format(self.types[node.type_A.name].position)) + if type(node.type_B) == int: + self.write(' la $a1, {}($gp)'.format(self.types["Int"].position)) + elif type(node.type_B) == bool: + self.write(' la $a1, {}($gp)'.format(self.types["Bool"].position)) + else: + self.write(' lw $a1, {}($sp)'.format(node.type_B.holder)) + self.write(' subu $sp, $sp, 4') + self.write(' sw $ra, ($sp)') + self.write(' jal check_hierarchy') + self.write(' lw $ra, ($sp)') + self.write(' addu $sp, $sp, 4') + self.write(' la $t1, {}($gp)'.format(self.types["Bool"].position)) + self.write(' sw $t1, {}($sp)'.format(node.destiny.holder)) + self.write(' sw $v0, {}($sp)'.format(node.destiny.holder + 4)) + + @visitor.when(cil.ReturnNode) + def visit(self, node): + if isinstance(node.value, int): + self.write(' la $v0, {}($gp)'.format(self.types["Int"].position)) + self.write(' li $v1, {}'.format(node.value)) + elif isinstance(node.value, bool): + self.write(' la $v0, {}($gp)'.format(self.types["Bool"].position)) + if node.value: + self.write(' li $v1, 1') + else: + self.write(' li $v1, 0') + else: + self.write(' ld $v0, {}($sp)'.format(node.value.holder)) + + @visitor.when(cil.EndProgram) + def visit(self, node): + self.write(' li $v0, 10') + self.write(' xor $a0, $a0, $a0') + self.write(' syscall') + +#Object + @visitor.when(cil.BoxingVariable) + def visit(self, node): + self.write(' li $v0, 9') + self.write(' li $a0, 8') + self.write(' syscall') + self.write(' la $t0, {}($gp)'.format(self.types["Object"].position)) + self.write(' sw $v0, {}($sp)'.format(node.destiny.holder + 4)) + self.write(' sw $t0, {}($sp)'.format(node.destiny.holder)) + if isinstance(node.variable, int): + self.write(' la $t0, {}($gp)'.format(self.types["Int"].position)) + self.write(' li $t1, {}'.format(node.variable)) + elif isinstance(node.variable, bool): + self.write(' la $t0, {}($gp)'.format(self.types["Bool"].position)) + if node.variable: + self.write(' li $t1, 1') + else: + self.write(' li $t1, 0') + else: + self.write(' ld $t0, {}($sp)'.format(node.variable.holder)) + self.write(' sd $t0, ($v0)') + + @visitor.when(cil.UnboxingVariable) + def visit(self, node): + self.write(' la $a0, {}($sp)'.format(node.variable.holder)) + self.write(' subu $sp, $sp, 4') + self.write(' sw $ra, ($sp)') + self.write(' jal unboxing') + self.write(' lw $ra, ($sp)') + self.write(' addu $sp, $sp, 4') + self.write(' sd $v0, {}($sp)'.format(node.destiny.holder)) + + @visitor.when(cil.TypeOfNode) + def visit(self, node): + self.write(' lw $t1, {}($sp)'.format(node.src.holder)) + self.write(' lw $t1, 4($t1)') + self.write(' la $t0, {}($gp)'.format(self.types["String"].position)) + self.write(' sd $t0, {}($sp)'.format(node.destiny.holder)) + + @visitor.when(cil.AbortNode) + def visit(self, node): + self.write(' li $v0, 10') + self.write(' xor $a0, $a0, $a0') + self.write(' syscall') + +#String + @visitor.when(cil.LoadNode) + def visit(self, node): + self.write(' la $t0, {}'.format(node.msg.name)) + self.write(' la $t1, {}($gp)'.format(self.types["String"].position)) + self.write(' sw $t1, {}($sp)'.format(node.destiny.holder)) + self.write(' sw $t0, {}($sp)'.format(node.destiny.holder + 4)) + + @visitor.when(cil.LengthNode) + def visit(self, node): + self.write(' lw $a0, {}($sp)'.format(node.src.holder + 4)) + self.write(' subu $sp, $sp, 4') + self.write(' sw $ra, ($sp)') + self.write(' jal length') + self.write(' lw $ra, ($sp)') + self.write(' addu $sp, $sp, 4') + self.write(' la $t0, {}($gp)'.format(self.types["Int"].position)) + self.write(' sw $t0, {}($sp)'.format(node.destiny.holder)) + self.write(' sw $v0, {}($sp)'.format(node.destiny.holder + 4)) + + @visitor.when(cil.ConcatNode) + def visit(self, node): + self.write(' lw $a0, {}($sp)'.format(node.str.holder + 4)) + self.write(' subu $sp, $sp, 4') + self.write(' sw $ra, ($sp)') + self.write(' jal length') + self.write(' lw $ra, ($sp)') + self.write(' addu $sp, $sp, 4') + self.write(' la $t0, ($v0)') + self.write(' lw $a0, {}($sp)'.format(node.src.holder + 4)) + self.write(' subu $sp, $sp, 8') + self.write(' sw $ra, 4($sp)') + self.write(' sw $t0, ($sp)') + self.write(' jal length') + self.write(' lw $t0, ($sp)') + self.write(' lw $ra, 4($sp)') + self.write(' addu $sp, $sp, 8') + self.write(' la $a0, ($v0)') + self.write(' addu $a0, $a0, $t0') + self.write(' addu $a0, $a0, 1') + self.write(' li $v0, 9') + self.write(' syscall') + self.write(' la $a2, ($v0)') + self.write(' lw $a0, {}($sp)'.format(node.str.holder + 4)) + self.write(' lw $a1, {}($sp)'.format(node.src.holder + 4)) + self.write(' subu $sp, $sp, 4') + self.write(' sw $ra, ($sp)') + self.write(' jal concat') + self.write(' lw $ra, ($sp)') + self.write(' addu $sp, $sp, 4') + self.write(' la $t0, {}($gp)'.format(self.types["String"].position)) + self.write(' sw $t0, {}($sp)'.format(node.destiny.holder)) + self.write(' sw $v0, {}($sp)'.format(node.destiny.holder + 4)) + + @visitor.when(cil.SubStringNode) + def visit(self, node): + self.write(' lw $a0, {}($sp)'.format(node.src.holder + 4)) + self.write(' subu $sp, $sp, 4') + self.write(' sw $ra, ($sp)') + self.write(' jal length') + self.write(' lw $ra, ($sp)') + self.write(' addu $sp, $sp, 4') + self.write(' lw $t0, {}($sp)'.format(node.a.holder + 4)) + self.write(' blt $t0, 0, error') + self.write(' lw $t1, {}($sp)'.format(node.b.holder + 4)) + self.write(' blt $t1, 0, error') + self.write(' add $t0, $t0, $t1') + self.write(' blt $v0, $t0, error') + self.write(' li $v0, 9') + self.write(' lw $a0, {}($sp)'.format(node.b.holder + 4)) + self.write(' add $a0, $a0, 1') + self.write(' syscall') + self.write(' la $a3, ($v0)') + self.write(' lw $a0, {}($sp)'.format(node.src.holder + 4)) + self.write(' lw $a1, {}($sp)'.format(node.a.holder + 4)) + self.write(' lw $a2, {}($sp)'.format(node.b.holder + 4)) + self.write(' subu $sp, $sp, 4') + self.write(' sw $ra, ($sp)') + self.write(' jal substring') + self.write(' lw $ra, ($sp)') + self.write(' addu $sp, $sp, 4') + self.write(' la $t1, {}($gp)'.format(self.types["String"].position)) + self.write(' sw $t1, {}($sp)'.format(node.destiny.holder)) + self.write(' sw $v0, {}($sp)'.format(node.destiny.holder + 4)) + +#IO + @visitor.when(cil.ReadIntegerNode) + def visit(self, node): + self.write(' li $v0, 5') + self.write(' syscall') + self.write(' sw $v0, {}($sp)'.format(node.destiny.holder + 4)) + self.write(' la $t0, {}($gp)'.format(self.types["Int"].position)) + self.write(' sw $t0, {}($sp)'.format(node.destiny.holder)) + + @visitor.when(cil.ReadStringNode) + def visit(self, node): + self.write(' lw $a0, {}($gp)'.format(self.buffer)) + self.write(' li $a1, 128') + self.write(' li $v0, 8') + self.write(' syscall') + self.write(' subu $sp, $sp, 8') + self.write(' sw $ra, 4($sp)') + self.write(' sw $a0, ($sp)') + self.write(' jal length') + self.write(' lw $a0, ($sp)') + self.write(' lw $ra, 4($sp)') + self.write(' addu $sp, $sp, 8') + self.write(' la $t0, ($a0)') + self.write(' la $t1, ($v0)') + self.write(' la $a0, ($v0)') + self.write(' li $v0, 9') + self.write(' syscall') + self.write(' la $a0, ($t0)') + self.write(' li $a1, 0') + self.write(' la $a2, ($t1)') + self.write(' la $a3, ($v0)') + self.write(' subu $sp, $sp, 8') + self.write(' sw $ra, ($sp)') + self.write(' jal substring') + self.write(' lw $ra, ($sp)') + self.write(' addu $sp, $sp, 8') + self.write(' la $t0, {}($gp)'.format(self.types["String"].position)) + self.write(' sw $t0, {}($sp)'.format(node.destiny.holder)) + self.write(' sw $v0, {}($sp)'.format(node.destiny.holder + 4)) + + @visitor.when(cil.PrintIntegerNode) + def visit(self, node): + self.write(' li $v0, 1') + if isinstance(node.src, int): + self.write(' li $a0, {}'.format(node.src)) + else: + self.write(' lw $a0, {}($sp)'.format(node.src.holder + 4)) + self.write('syscall') + self.write(' ld $v0, {}($sp)'.format(node.str_addr.holder)) + + @visitor.when(cil.PrintStringNode) + def visit(self, node): + self.write(' li $v0, 4') + self.write(' lw $a0, {}($sp)'.format(node.src.holder + 4)) + self.write('syscall') + self.write(' ld $v0, {}($sp)'.format(node.str_addr.holder)) + + @visitor.when(cil.ErrorNode) + def visit(self, node): + self.write(' j error') diff --git a/src/code_to_cil.py b/src/code_to_cil.py new file mode 100644 index 000000000..b076c6c0c --- /dev/null +++ b/src/code_to_cil.py @@ -0,0 +1,528 @@ +import visitor +import cool_cil as cil +import cool_ast as ast +from utils import MethodInfo, VarInfo + +class CodeToCIL: + def __init__(self, types): + self.types = types + self.dottypes = [] + self.dotdata = [] + self.dotcode = [] + self.arguments = [] + self.instructions = [] + self.local_vars = [] + self.current_type = None + self.self_type = None + self.current_method = "" + self.internal_count = 0 + self.label_count = 0 + + def new_label(self): + self.label_count += 1 + return "label_{}".format(self.label_count) + + def register_primitive_types(self): + methods = PrimitiveMethods() + for name in ["Object", "Int", "String", "Bool", "IO"]: + id_class = self.types.get_type(name) + self.register_type(name, id_class) + for n, m in id_class.methods.items(): + self.register_method(n, m.cil_name, methods.params[n], methods.cil_node[n]) + + def register_type(self, name, type): + attrb = [] + methods = {} + self.build_type(type, attrb, methods) + self.dottypes.append(Type(name, attrb, methods)) + self.dotdata.append(cil.DataNode(name, '"%s"' % name)) + + def build_type(self, id_class, attrb, methods): + if id_class == None: + return + self.build_type(id_class.inherits, attrb, methods) + if id_class.methods: + for name in id_class.methods: + methods[name] = Method(id_class.methods[name].cil_name) + if id_class.attrb: + for name in id_class.attrb: + attrb.append(name) + + def register_method(self, name, cil_name, params, cil_node): + instructions = [] + self.local_vars = [] + variables = [] + arguments = [] + local = None + + for param in params: + var = VarInfo(param) + variables.append(var) + arguments.append(cil.ParamNode(var)) + if name != "abort": + local = self.register_local_var() + variables.append(local) + cargs = tuple(variables) + instructions.append(cil_node(*cargs)) + if name != "abort": + instructions.append(cil.ReturnNode(local)) + self.dotcode.append(cil.MethodNode(cil_name, arguments, self.local_vars, instructions)) + + def register_local_var(self, node = None): + var = node.var_info if node else VarInfo('internal') + var.name = "{}_{}_{}".format(self.internal_count, self.current_method, var.name) + self.internal_count += 1 + var.holder = len(self.local_vars) + self.local_vars.append(cil.VarLocalNode(var)) + return var + + def register_data(self, value): + name = "data_{}".format(len(self.dotdata)) + data = cil.DataNode(name, value) + self.dotdata.append(data) + return data + + def check_variance(self, node, i, j): + type_A = self.types.get_type(node.case_list[i].variable.type) + type_B = self.types.get_type(node.case_list[j].variable.type) + check = self.types.check_variance(type_A, type_B) + return 1 if check else 0 + + @visitor.on('node') + def visit(self, node): + pass + + @visitor.when(ast.ProgramNode) + def visit(self, node): + main = ast.NewNode("Main") + main.type_expr = self.types.get_type("Main") + method = ast.MethodNode("entry", [], self.types.get_type("Int"), ast.DispatchInstanceNode(main, "main", [])) + method.info = MethodInfo("entry", method.type_expr, []) + method.info.cil_name = "entry" + self.visit(method) + for expr in node.expr: + self.visit(expr) + self.register_primitive_types() + return cil.ProgramNode(self.dottypes, self.dotdata, self.dotcode) + + @visitor.when(ast.ClassNode) + def visit(self, node): + self.current_type = node.info + self.register_type(node.type, node.info) + for expr in node.body: + if type(expr) is ast.MethodNode: + self.visit(expr) + + @visitor.when(ast.PropertyNode) + def visit(self, node): + return self.visit(node.decl) + + @visitor.when(ast.DeclarationNode) + def visit(self, node): + if node.expr == None: + return self.register_local_var(node) + else: + var = self.visit(node.expr) + if type(var) is VarInfo: + node.var_info.name = var.name + self.register_local_var(node) + self.instructions.append(cil.AssignNode(node.var_info, var)) + return var + + @visitor.when(ast.MethodNode) + def visit(self, node): + self.instructions = [] + self.arguments = [] + self.local_vars = [] + self.current_method = node.info.cil_name + self.self_type = VarInfo("self_type", self.current_type) + args = [] + args.append(cil.ParamNode(self.self_type)) + + for param in node.params: + args.append(cil.ParamNode(param.var_info)) + param.var_info.name = "{}_{}".format(node.name, param.id) + self.arguments.append(param.var_info) + + var = self.visit(node.body) + cil_node = cil.EndProgram(var) if node.name == "entry" else cil.ReturnNode(var) + self.instructions.append(cil_node) + self.dotcode.append(cil.MethodNode(self.current_method, args, self.local_vars, self.instructions)) + + @visitor.when(ast.AssignNode) + def visit(self, node): + var = self.visit(node.expr) + boxing = node.type_expr.name == "Object" and (type(var) is not VarInfo or var.type.name in ["Int", "Bool"]) + if node.var_info.name in self.current_type.attrb: + value = self.register_local_var() if boxing else var + if boxing: + self.instructions.append(cil.BoxingVariable(var, value)) + self.instructions.append(cil.SetAttrbNode(self.self_type, node.id, value)) + return var + elif node.var_info in self.arguments: + cil_node = cil.BoxingVariable(var, node.var_info) if boxing else cil.AssignNode(node.var_info, var) + self.instructions.append(cil_node) + else: + if node.var_info.holder == None: + self.register_local_var(node) + cil_node = cil.BoxingVariable(var, node.var_info) if boxing else cil.AssignNode(node.var_info, var) + self.instructions.append(cil_node) + return node.var_info + + @visitor.when(ast.WhileNode) + def visit(self, node): + start = cil.LabelNode(self.new_label()) + loop = cil.LabelNode(self.new_label()) + end = cil.LabelNode(self.new_label()) + self.instructions.append(start) + var_cond = self.visit(node.conditional) + self.instructions.append(cil.GotoIfNode(var_cond, loop)) + self.instructions.append(cil.GotoNode(end)) + self.instructions.append(loop) + self.visit(node.expr) + self.instructions.append(cil.GotoNode(start)) + self.instructions.append(end) + return 0 + + @visitor.when(ast.IfNode) + def visit(self, node): + then = cil.LabelNode(self.new_label()) + end = cil.LabelNode(self.new_label()) + var_cond = self.visit(node.conditional) + var = self.register_local_var() + var.type = node.type_expr + self.instructions.append(cil.GotoIfNode(var_cond, then)) + var_else = self.visit(node.expr_else) + self.instructions.append(cil.AssignNode(var, var_else)) + self.instructions.append(cil.GotoNode(end)) + self.instructions.append(then) + var_then = self.visit(node.expr_then) + self.instructions.append(cil.AssignNode(var, var_then)) + self.instructions.append(end) + return var + + @visitor.when(ast.LetInNode) + def visit(self, node): + for n in node.decl_list: + self.visit(n) + var = self.visit(node.expr) + return var + + @visitor.when(ast.CaseNode) + def visit(self, node): + labels = [] + tunels = [[]] + bases = [[]] + ends = [] + n = len(node.case_list) + end = cil.LabelNode(self.new_label()) + var = self.visit(node.expr) + checkr = self.register_local_var() + + if type(var) is VarInfo and var.type.name == "Object": + temp = self.register_local_var() + self.instructions.append(cil.UnboxingVariable(var, temp)) + var = temp + + for i in range(n): + temp = cil.LabelNode(self.new_label()) + labels.append(temp) + for j in range(i + 1, n): + t1 = cil.LabelNode(self.new_label()) + t2 = cil.LabelNode(self.new_label()) + tunels[len(tunels) - 1].append(t1) + bases[len(bases) - 1].append(t2) + bases.append([]) + tunels.append([]) + self.instructions.append(cil.CheckHierarchy(checkr, node.case_list[i].variable.type, var)) + self.instructions.append(cil.GotoIfNode(checkr, temp)) + self.instructions.append(cil.ErrorNode) + self.instructions.append(cil.GotoNode(end)) + + for i in range(0, n): + self.instructions.append(labels[i]) + for j in range(i + 1, n): + cond = self.check_variance(node, i, j) + self.instructions.append(cil.GotoIfNode(cond, tunels[i][j - i - 1])) + self.instructions.append(bases[i][j - i - 1]) + t = cil.LabelNode(self.new_label()) + ends.append(t) + self.instructions.append(cil.GotoNode(t)) + + for i in range(0, len(bases)): + for j in range(0, len(bases[i])): + self.instructions.append(tunels[i][j]) + self.instructions.append(cil.CheckHierarchy(checkr, node.case_list[i + j + 1].variable.type, var)) + self.instructions.append(cil.GotoIfNode(checkr, labels[i + j + 1])) + self.instructions.append(cil.GotoNode(bases[i][j])) + + var_ret = self.register_local_var() + for i in range(len(ends)): + self.instructions.append(ends[i]) + e = self.visit(node.case_list[i], var) + self.instructions.append(cil.AssignNode(var_ret, e)) + self.instructions.append(cil.GotoNode(end)) + + self.instructions.append(end) + return var_ret + + @visitor.when(ast.CaseItemNode) + def visit(self, node, expr): + var = self.visit(node.variable) + self.instructions.append(cil.AssignNode(var, expr)) + return self.visit(node.expr) + + @visitor.when(ast.DispatchNode) + def visit(self, node): + instructions = [] + var_ret = self.register_local_var() + var_ret.type = node.type_expr + instructions.append(cil.ArgumentNode(self.self_type)) + method = node.type_method + n = len(node.params) + + for i in range(n): + var = self.visit(node.params[i]) + if (type(var) is not VarInfo and node.type_expr.name == "Object") \ + or (method.params_types[i] == "Object" and (var.type.name in ["Int", "Bool"])): + temp = self.register_local_var() + temp.type = self.types.get_type(method.params_types[i]) + self.instructions.append(cil.BoxingVariable(var, temp)) + var = temp + instructions.append(cil.ArgumentNode(var)) + self.instructions += instructions + self.instructions.append(cil.DinamicCallNode(self.current_type.name, node.id, var_ret)) + return var_ret + + @visitor.when(ast.DispatchInstanceNode) + def visit(self, node): + instructions = [] + var_ret = self.register_local_var() + var_ret.type = node.type_expr + instructions.append(cil.ArgumentNode(self.visit(node.variable))) + method = node.type_method + n = len(node.params) + for i in range(n): + var = self.visit(node.params[i]) + if (type(var) is not VarInfo and node.type_expr.name == "Object") \ + or (method.params_types[i] == "Object" and (var.type.name in ["Int", "Bool"])): + temp = self.register_local_var() + temp.type = self.types.get_type(method.params_types[i]) + self.instructions.append(cil.BoxingVariable(var, temp)) + var = temp + instructions.append(cil.ArgumentNode(var)) + self.instructions += instructions + self.instructions.append(cil.DinamicCallNode(node.variable.type_expr.name, node.id_method, var_ret)) + return var_ret + + @visitor.when(ast.DispatchParentInstanceNode) + def visit(self, node): + instructions = [] + var_ret = self.register_local_var() + var_ret.type = node.type_expr + instructions.append(cil.ArgumentNode(self.visit(node.variable))) + method = self.types.get_type(node.id_parent).methods[node.id_method] + n = len(node.params) + for i in range(n): + var = self.visit(node.params[i]) + if (type(var) is not VarInfo and node.type_expr.name == "Object") \ + or (method.params_types[i] == "Object" and (var.type.name in ["Int", "Bool"])): + temp = self.register_local_var() + temp.type = self.types.get_type(method.params_types[i]) + self.instructions.append(cil.BoxingVariable(var, temp)) + var = temp + instructions.append(cil.ArgumentNode(var)) + self.instructions += instructions + self.instructions.append(cil.StaticCallNode(node.id_parent, node.id_method, var_ret)) + return var_ret + + @visitor.when(ast.BlockNode) + def visit(self, node): + var = 0 + for expr in node.expr_list: + var = self.visit(expr) + if type(var) is VarInfo: + var.type = node.type_expr + return var + + @visitor.when(ast.PlusNode) + def visit(self, node): + var = self.register_local_var() + var.type = node.type_expr + left = self.visit(node.left) + right = self.visit(node.right) + self.instructions.append(cil.PlusNode(var, left, right)) + return var + + @visitor.when(ast.MinusNode) + def visit(self, node): + var = self.register_local_var() + var.type = node.type_expr + left = self.visit(node.left) + right = self.visit(node.right) + self.instructions.append(cil.MinusNode(var, left, right)) + return var + + @visitor.when(ast.StarNode) + def visit(self, node): + var = self.register_local_var() + var.type = node.type_expr + left = self.visit(node.left) + right = self.visit(node.right) + self.instructions.append(cil.StarNode(var, left, right)) + return var + + @visitor.when(ast.DivNode) + def visit(self, node): + var = self.register_local_var() + var.type = node.type_expr + left = self.visit(node.left) + right = self.visit(node.right) + self.instructions.append(cil.DivNode(var, left, right)) + return var + + @visitor.when(ast.NotNode) + def visit(self, node): + var = self.register_local_var() + expr = self.visit(node.expr) + self.instructions.append(cil.NotNode(var, expr)) + return var + + @visitor.when(ast.ComplementNode) + def visit(self, node): + var = self.register_local_var() + var.type = node.type_expr + expr = self.visit(node.expr) + self.instructions.append(cil.ComplementNode(var, expr)) + return var + + @visitor.when(ast.IsVoidNode) + def visit(self, node): + var = self.register_local_var() + expr = self.visit(node.expr) + if type(expr) is not VarInfo or expr.type.name in ["Int", "String", "Bool"]: + return 0 + self.instructions.append(cil.EqualNode(var, expr, 0)) + return var + + @visitor.when(ast.NewNode) + def visit(self, node): + var = self.register_local_var() + var.type = node.type_expr + new_class = self.types.get_type(node.type) + self.instructions.append(cil.AllocateNode(var, new_class)) + temp_type = self.current_type + temp_self = self.self_type + self.self_type = var + id_class = new_class + while id_class: + self.current_type = id_class + for name, attrb in id_class.attrb.items(): + aux = None + if not attrb.decl.expr: + aux = self.register_local_var() + aux.type = attrb.decl.type + else: + aux = self.visit(attrb.decl.expr) + self.instructions.append(cil.SetAttrbNode(var, name, aux)) + id_class = id_class.inherits + self.self_type = temp_self + self.current_type = temp_type + return var + + @visitor.when(ast.LessThanNode) + def visit(self, node): + var = self.register_local_var() + var.type = node.type_expr + left = self.visit(node.left) + right = self.visit(node.right) + self.instructions.append(cil.LessThanNode(var, left, right)) + return var + + @visitor.when(ast.LessEqualNode) + def visit(self, node): + var = self.register_local_var() + var.type = node.type_expr + left = self.visit(node.left) + right = self.visit(node.right) + self.instructions.append(cil.LessEqualNode(var, left, right)) + return var + + @visitor.when(ast.EqualNode) + def visit(self, node): + var = self.register_local_var() + var.type = node.type_expr + left = self.visit(node.left) + right = self.visit(node.right) + self.instructions.append(cil.EqualNode(var, left, right)) + return var + + @visitor.when(ast.VariableNode) + def visit(self, node): + var = self.register_local_var() + var.type = node.var_info.type + if node.var_info.name in self.current_type.attrb: + self.instructions.append(cil.GetAttrbNode(var, self.self_type, node.id)) + return var + else: + return node.var_info + + @visitor.when(ast.IntegerNode) + def visit(self, node): + return node.integer + + @visitor.when(ast.StringNode) + def visit(self, node): + var = self.register_local_var() + var.type = node.type_expr + data = self.register_data(node.string) + self.instructions.append(cil.LoadNode(var, data)) + return var + + @visitor.when(ast.BooleanNode) + def visit(self, node): + return node.value + + @visitor.when(ast.NegationNode) + def visit(self, node): + expr = self.visit(node.expr) + if not type(expr) == int: + var = self.register_local_var() + var.type = node.type_expr + self.instructions.append(cil.MinusNode(var, 0, expr)) + return var + return -expr + +class Type: + def __init__(self, name, attrb, methods): + self.name = name + self.attrb = attrb + self.methods = methods + self.position = 0 + +class Method: + def __init__(self, name): + self.name = name + self.position = 0 + +class PrimitiveMethods: + def __init__(self): + self.cil_node = {"type_name": cil.TypeOfNode, + "abort" : cil.AbortNode, + "substr": cil.SubStringNode, + "length": cil.LengthNode, + "concat": cil.ConcatNode, + "in_string": cil.ReadStringNode, + "in_int": cil.ReadIntegerNode, + "out_string": cil.PrintStringNode, + "out_int": cil.PrintIntegerNode} + + self.params = {"type_name": ["self"], + "abort" : ["self"], + "substr": ["self", "i", "l"], + "length": ["self"], + "concat": ["self", "str"], + "in_string": [], + "in_int": [], + "out_string": ["self"], + "out_int": ["self"]} \ No newline at end of file diff --git a/src/cool_ast.py b/src/cool_ast.py new file mode 100644 index 000000000..247565583 --- /dev/null +++ b/src/cool_ast.py @@ -0,0 +1,241 @@ +class Node: + pass + +class ProgramNode(Node): + def __init__(self, expr): + self.expr = expr + +class ExpressionNode(Node): + def __init__(self): + self.type_expr = None + +class AtomicNode(ExpressionNode): + pass + +class ClassNode(AtomicNode): + def __init__(self, type, inherits, body, line = 0, index = 0, index2 = 0): + AtomicNode.__init__(self) + self.type = type + self.inherits = inherits + self.body = body + self.info = None + self.line = line + self.index = index + self.index2 = index2 + +class PropertyNode(AtomicNode): + def __init__(self, decl, line = 0, index = 0): + AtomicNode.__init__(self) + self.decl = decl + self.line = line + self.index = index + +class UtilNode(Node): + pass + +class DeclarationNode(UtilNode): + def __init__(self, id, type, expr, line, index, index2, index3): + UtilNode.__init__(self) + self.id = id + self.type = type + self.expr = expr + self.line = line + self.index = index + self.index2 = index2 + self.index3 = index3 + self.var_info = None + +class MethodNode(AtomicNode): + def __init__(self, id, params, type_ret, body, line=0, index=0, index2=0): + AtomicNode.__init__(self) + self.name = id + self.params = params + self.type_ret = type_ret + self.body = body + self.line = line + self.index = index + self.index2 = index2 + self.info = None + +class AssignNode(AtomicNode): + def __init__(self, id, expr, line, index, index2): + AtomicNode.__init__(self) + self.id = id + self.expr = expr + self.line = line + self.index = index + self.index2 = index2 + self.var_info = None + +class WhileNode(AtomicNode): + def __init__(self, conditional, expr, line, index, index2): + AtomicNode.__init__(self) + self.conditional = conditional + self.expr = expr + self.line = line + self.index = index + self.index2 = index2 + +class IfNode(AtomicNode): + def __init__(self, conditional, expr_then, expr_else, line, index): + AtomicNode.__init__(self) + self.conditional = conditional + self.expr_then = expr_then + self.expr_else = expr_else + self.line = line + self.index = index + +class LetInNode(AtomicNode): + def __init__(self, decl_list, expr, line, index): + AtomicNode.__init__(self) + self.decl_list = decl_list + self.expr = expr + self.line = line + self.index = index + +class CaseNode(AtomicNode): + def __init__(self, expr, case_list, line, index): + AtomicNode.__init__(self) + self.expr = expr + self.case_list = case_list + self.line = line + self.index = index + +class CaseItemNode(AtomicNode): + def __init__(self, variable, expr, line, index, index2): + AtomicNode.__init__(self) + self.variable = variable + self.expr = expr + self.line = line + self.index = index + self.index2 = index2 + +class DispatchNode(AtomicNode): + def __init__(self, id, params, line, index): + AtomicNode.__init__(self) + self.id = id + self.params = params + self.line = line + self.index = index + self.type_method = None + +class DispatchInstanceNode(ExpressionNode): + def __init__(self, variable, id_method, params, line=0, index=0, index2=0): + ExpressionNode.__init__(self) + self.variable = variable + self.id_method = id_method + self.params = params + self.line = line + self.index = index + self.index2 = index2 + self.type_method = None + +class DispatchParentInstanceNode(ExpressionNode): + def __init__(self, variable, id_parent, id_method, params, line, index, index2, index3): + ExpressionNode.__init__(self) + self.variable = variable + self.id_parent = id_parent + self.id_method = id_method + self.params = params + self.line = line + self.index = index + self.index2 = index2 + self.index3 = index3 + +class BlockNode(AtomicNode): + def __init__(self, expr_list, line, index): + AtomicNode.__init__(self) + self.expr_list = expr_list + self.line = line + self.index = index + +class BinaryOperatorNode(ExpressionNode): + def __init__(self, left, right, line, index, index2): + ExpressionNode.__init__(self) + self.left = left + self.right = right + self.line = line + self.index = index + self.index2 = index2 + +class PlusNode(BinaryOperatorNode): + pass + +class MinusNode(BinaryOperatorNode): + pass + +class StarNode(BinaryOperatorNode): + pass + +class DivNode(BinaryOperatorNode): + pass + +class UnaryOperator(ExpressionNode): + def __init__(self, expr, line, index, index2): + ExpressionNode.__init__(self) + self.expr = expr + self.line = line + self.index = index + self.index2 = index2 + +class NotNode(UnaryOperator): + pass + +class ComplementNode(UnaryOperator): + pass + +class IsVoidNode(AtomicNode): + def __init__(self, expr, line, index): + AtomicNode.__init__(self) + self.expr = expr + self.line = line + self.index = index + +class NewNode(AtomicNode): + def __init__(self, type, line=0, index=0, index2=0): + AtomicNode.__init__(self) + self.type = type + self.line = line + self.index = index + self.index2 = index2 + +class LessThanNode(BinaryOperatorNode): + pass + +class LessEqualNode(BinaryOperatorNode): + pass + +class EqualNode(BinaryOperatorNode): + pass + +class VariableNode(AtomicNode): + def __init__(self, id, line, index): + AtomicNode.__init__(self) + self.id = id + self.line = line + self.index = index + self.var_info = None + +class IntegerNode(AtomicNode): + def __init__(self, integer, line, index): + AtomicNode.__init__(self) + self.integer = integer + self.line = line + self.index = index + +class StringNode(AtomicNode): + def __init__(self, string, line, index): + AtomicNode.__init__(self) + self.string = str(string) + self.line = line + self.index = index + +class BooleanNode(ExpressionNode): + def __init__(self, value, line, index): + ExpressionNode.__init__(self) + self.value = True if value == "true" else False + self.line = line + self.index = index + +class NegationNode(UnaryOperator): + pass diff --git a/src/cool_cil.py b/src/cool_cil.py new file mode 100644 index 000000000..77bf42bbc --- /dev/null +++ b/src/cool_cil.py @@ -0,0 +1,200 @@ +class Node: + pass + +class InstructionNode(Node): + pass + +class ErrorNode(InstructionNode): + pass + +class DataNode(Node): + def __init__(self, name, value): + self.name = name + self.value = value + +class LabelNode(InstructionNode): + def __init__(self, name): + self.name = name + +class GotoNode(InstructionNode): + def __init__(self, label): + self.label = label + +class GotoIfNode(InstructionNode): + def __init__(self, conditional, label): + self.conditional = conditional + self.label = label + +class ProgramNode(Node): + def __init__(self, types, data, code): + self.types = types + self.data = data + self.code = code + +class ParamNode(Node): + def __init__(self, name): + self.name = name + +class MethodNode(Node): + def __init__(self, name, params, local_vars, intructions): + self.name = name + self.params = params + self.local_vars = local_vars + self.intructions = intructions + +class VarLocalNode(Node): + def __init__(self, name): + self.name = name + +class AssignNode(InstructionNode): + def __init__(self, destiny, source): + self.destiny = destiny + self.source = source + +class GetAttrbNode(InstructionNode): + def __init__(self, destiny, type, attrb): + self.destiny = destiny + self.type = type + self.attrb = attrb + +class SetAttrbNode(InstructionNode): + def __init__(self, type, attrb, value): + self.type = type + self.attrb = attrb + self.value = value + +class AllocateNode(InstructionNode): + def __init__(self, destiny, type): + self.destiny = destiny + self.type = type + self.destiny.type = type + +class ArithmeticNode(InstructionNode): + def __init__(self, destiny, left, right): + self.destiny = destiny + self.left = left + self.right = right + +class LessEqualNode(ArithmeticNode): + pass + +class LessThanNode(ArithmeticNode): + pass + +class EqualNode(ArithmeticNode): + pass + +class PlusNode(ArithmeticNode): + pass + +class MinusNode(ArithmeticNode): + pass + +class StarNode(ArithmeticNode): + pass + +class DivNode(ArithmeticNode): + pass + +class ComplementNode(InstructionNode): + def __init__(self, destiny, expr): + self.destiny = destiny + self.expr = expr + +class NotNode(InstructionNode): + def __init__(self, destiny, expr): + self.destiny = destiny + self.expr = expr + +class ArgumentNode(InstructionNode): + def __init__(self, name): + self.name = name + +class DinamicCallNode(InstructionNode): + def __init__(self, type, function, destiny): + self.type = type + self.function = function + self.destiny = destiny + +class StaticCallNode(InstructionNode): + def __init__(self, type, function, destiny): + self.type = type + self.function = function + self.destiny = destiny + +class CheckHierarchy(InstructionNode): + def __init__(self, destiny, type_A, type_B): + self.destiny = destiny + self.type_A = type_A + self.type_B = type_B + +class ReturnNode(InstructionNode): + def __init__(self, value = None): + self.value = value + +class EndProgram(InstructionNode): + def __init__(self, expr): + self.expr = expr + +#Object +class BoxingVariable(InstructionNode): + def __init__(self, variable, destiny): + self.variable = variable + self.destiny = destiny + +class UnboxingVariable(InstructionNode): + def __init__(self, variable, destiny): + self.variable = variable + self.destiny = destiny + +class TypeOfNode(InstructionNode): + def __init__(self, src, destiny): + self.src = src + self.destiny = destiny + +class AbortNode(InstructionNode): + def __init__(self, self_type): + self.self_type = self_type + +#String +class LoadNode(InstructionNode): + def __init__(self, destiny, msg): + self.destiny = destiny + self.msg = msg + +class LengthNode(InstructionNode): + def __init__(self, src, destiny): + self.src = src + self.destiny = destiny + +class ConcatNode(InstructionNode): + def __init__(self, str, src, destiny): + self.str = str + self.src = src + self.destiny = destiny + +class SubStringNode(InstructionNode): + def __init__(self, src, a, b, destiny): + self.src = src + self.a = a + self.b = b + self.destiny = destiny + +#IO +class ReadIntegerNode(InstructionNode): + def __init__(self, destiny): + self.destiny = destiny + +class ReadStringNode(InstructionNode): + def __init__(self, destiny): + self.destiny = destiny + +class PrintIntegerNode(InstructionNode): + def __init__(self, src, str_addr): + self.src = src + self.str_addr = str_addr + +class PrintStringNode(InstructionNode): + def __init__(self, src, str_addr): + self.src = src + self.str_addr = str_addr \ No newline at end of file diff --git a/src/coolc.sh b/src/coolc.sh index 3088de4f9..a802d1a5c 100755 --- a/src/coolc.sh +++ b/src/coolc.sh @@ -1,11 +1,14 @@ + # Incluya aquí las instrucciones necesarias para ejecutar su compilador -INPUT_FILE=$1 -OUTPUT_FILE=${INPUT_FILE:0: -2}mips +# INPUT_FILE=$1 +# OUTPUT_FILE=${INPUT_FILE:0: -2}mips # Si su compilador no lo hace ya, aquí puede imprimir la información de contacto -echo "LINEA_CON_NOMBRE_Y_VERSION_DEL_COMPILADOR" # TODO: Recuerde cambiar estas -echo "Copyright (c) 2019: Nombre1, Nombre2, Nombre3" # TODO: líneas a los valores correctos +echo "COOL Compiler Version 1.0" # Recuerde cambiar estas +echo "Copyright (c) 2021 School of Math and Computer Science, University of Havana: Pablo A. Fuentes." # líneas a los valores correctos # Llamar al compilador -echo "Compiling $INPUT_FILE into $OUTPUT_FILE" +# echo "Compiling $INPUT_FILE into $OUTPUT_FILE" + +python3 main.py $@ \ No newline at end of file diff --git a/src/errors.py b/src/errors.py new file mode 100644 index 000000000..558ab1013 --- /dev/null +++ b/src/errors.py @@ -0,0 +1,59 @@ +import sys + +class Error: + error_type = 'Error' + + def __init__(self, line, index, message): + self.line = line + self.index = index + self.message = message + + def __str__(self): + return '({}, {}) - {}: {}'.format(self.line, self.index, self.error_type, self.message) + +class CompilerError(Error): + ''' + Se reporta al detectar alguna anomalía con la entrada del compilador. + Por ejemplo, si el fichero a compilar no existe + ''' + error_type = "CompilerError" + +class LexicographicError(Error): + ''' + Errores detectados por el Lexer + ''' + error_type = "LexicographicError" + +class SyntacticError(Error): + ''' + Errores detectados por el parser + ''' + error_type = "SyntacticError" + +class NameError(Error): + ''' + Se reporta al referenciar un identificador en un ámbito que no es visible + ''' + error_type = "NameError" + +class TypeError(Error): + ''' + Se reporta al detectar un problema de tipos. Incluye: + - incompatibilidad de tipos entre rvalue y lvalue + - operación no definida entre objetos de ciertos tipos, y + - tipo referenciado no definido + ''' + error_type = "TypeError" + +class AttributeError(Error): + ''' + Se reporta cuando un atributo o método se referencia pero no está definido + ''' + + error_type = "AttributeError" + +class SemanticError(Error): + ''' + Cualquier otro error semántico + ''' + error_type = "SemanticError" diff --git a/src/main.py b/src/main.py new file mode 100644 index 000000000..a41b115bf --- /dev/null +++ b/src/main.py @@ -0,0 +1,59 @@ +import sys +from errors import CompilerError +from my_lexer import MyLexer +from my_parser import MyParser +from semantics import SemanticsAndTypes +from code_to_cil import CodeToCIL +from code_gen import CodeGen + +def main(): + files = sys.argv[1:] + if len(files) == 0: + print(CompilerError(0, 0, "No file is given to coolc compiler.")) + return + + # Check all files have the *.cl extension. + for file in files: + if not str(file).endswith(".cl"): + print(CompilerError(0, 0, "Cool program files must end with a .cl extension.")) + return + + input = "" + + # Read all files source codes and store it in memory. + for file in files: + try: + with open(file, encoding="utf-8") as file: + input += file.read() + except (IOError, FileNotFoundError): + print(CompilerError(0, 0, "Error! File \"{0}\" was not found".format(file))) + return + + #Lexical and Syntax Analysis + lexer = MyLexer(input) + lexer.build() + if lexer.check(): + exit() + parser = MyParser(lexer) + parser.build() + ast = parser.parse(input) + if parser.errors: + exit() + + #Semantic and Types Analysis + st = SemanticsAndTypes(ast) + if not st.check(): + exit() + + #Code Generation + ctcil = CodeToCIL(st.types) + cil = ctcil.visit(ast) + cg = CodeGen() + cg.visit(cil, st.types) + + f = open(files[0][:-3] + ".mips", 'w') + f.writelines(cg.output) + f.close() + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/src/my_lexer.py b/src/my_lexer.py new file mode 100644 index 000000000..73ebe9dbc --- /dev/null +++ b/src/my_lexer.py @@ -0,0 +1,351 @@ +import ply.lex as lex +from ply.lex import TOKEN +from errors import LexicographicError + +#Reserved words +keywords = { + 'class': 'CLASS', + 'let': 'LET', + 'loop': 'LOOP', + 'inherits': 'INHERITS', + 'pool': 'POOL', + 'if': 'IF', + 'then': 'THEN', + 'else': 'ELSE', + 'fi': 'FI', + 'while': 'WHILE', + 'case': 'CASE', + 'of': 'OF', + 'esac': 'ESAC', + 'new': 'NEW', + 'not': 'NOT', + 'isvoid': 'ISVOID', + 'in': 'IN', + 'true': 'TRUE', + 'false': 'FALSE' +} + +#Declare the tokens +tokens = ('TYPE', 'ID', 'INTEGER', 'STRING', 'ACTION', + "LPAREN", "RPAREN", "LBRACE", "RBRACE", "COLON", + "COMMA", "DOT", "SEMICOLON", "AT", "PLUS", "MINUS", + "MULTIPLY", "DIVIDE", "EQ", "LT", "LTEQ", "ASSIGN", + "COMPLEMENT") + tuple(keywords.values()) + +class MyLexer: + def __init__(self, data): + self.tokens = tokens + self.keywords = keywords + self.lexer = None + self.data = data + self.errors = False + self.eof = False + + #Build the lexer + def build(self, **kwargs): + self.lexer = lex.lex(module=self, **kwargs) + + def input(self, code): + self.lexer.input(code) + + def token(self): + next_token = None + try: + next_token = self.lexer.token() + except: + pass + return next_token + + def check(self): + self.input(self.data) + while not self.eof: + self.token() + return self.errors + + #Declare the states + @property + def states(self): + return ( + ('string', 'exclusive'), + ('comment1', 'exclusive'), + ('comment2', 'exclusive'), + ) + + #Ignored characters + t_ignore = ' \t\r\f\v' + + @TOKEN(r'\d+') + def t_INTEGER(self, token): + token.value = int(token.value) + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'[A-Z][a-zA-Z_0-9]*') + def t_TYPE(self, token): + #Check for reserved words + value = token.value.lower() + if value in self.keywords.keys(): + token.value = value + token.type = self.keywords[value] + else: + token.type = "TYPE" + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'[a-z][a-zA-Z_0-9]*') + def t_ID(self, token): + #Check for reserved words + value = token.value.lower() + if value in self.keywords.keys(): + token.value = value + token.type = self.keywords[value] + else: + token.type = "ID" + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\n+') + def t_newline(self, token): + token.lexer.lineno += len(token.value) + + #EOF handling rule + def t_eof(self, token): + self.eof = True + return None + + @TOKEN(r'\"') + def t_start_string(self, token): + token.lexer.push_state("string") + token.lexer.string_backslashed = False + token.lexer.string_buffer = "" + token.lexer.string_lineno = token.lineno + token.lexer.string_lexpos = find_column(self.data, token.lexpos) + + @TOKEN(r'\n') + def t_string_newline(self, token): + token.lexer.lineno += 1 + if not token.lexer.string_backslashed: + self.errors = True + token.lexpos = find_column(self.data, token.lexpos) + print(LexicographicError(token.lineno, token.lexpos, "Unterminated string constant")) + token.lexer.pop_state() + else: + token.lexer.string_backslashed = False + + @TOKEN(r'\"') + def t_string_end(self, token): + if not token.lexer.string_backslashed: + token.lexer.pop_state() + token.lineno = token.lexer.string_lineno + token.lexpos = token.lexer.string_lexpos + token.value = token.lexer.string_buffer + token.type = "STRING" + return token + else: + token.lexer.string_buffer += '"' + token.lexer.string_backslashed = False + + @TOKEN(r'[^\n]') + def t_string_anything(self, token): + if token.value == '\0': + token.lexpos = find_column(self.data, token.lexpos) + self.errors = True + print(LexicographicError(token.lineno, token.lexpos, "String contains null character")) + if token.lexer.string_backslashed: + if token.value == 'b': + token.lexer.string_buffer += '\b' + elif token.value == 't': + token.lexer.string_buffer += '\t' + elif token.value == 'n': + token.lexer.string_buffer += '\n' + elif token.value == 'f': + token.lexer.string_buffer += '\f' + elif token.value == '\\': + token.lexer.string_buffer += '\\' + else: + token.lexer.string_buffer += token.value + token.lexer.string_backslashed = False + else: + if token.value != '\\': + token.lexer.string_buffer += token.value + else: + token.lexer.string_backslashed = True + + #String error handler + def t_string_error(self, token): + token.lexer.skip(1) + + def t_string_eof(self, token): + self.errors = True + self.eof = True + token.lexpos = find_column(self.data, token.lexpos) + print(LexicographicError(token.lineno, token.lexpos, "EOF in string constant")) + + #String ignored characters + t_string_ignore = '' + + #Comments type 1 State + @TOKEN(r'\-\-') + def t_start_comment1(self, token): + token.lexer.push_state("comment1") + + @TOKEN(r'\n') + def t_comment1_end(self, token): + token.lexer.lineno += 1 + token.lexer.pop_state() + + def t_comment1_error(self, token): + self.lexer.skip(1) + + #Comment ignored characters + t_comment1_ignore = '' + + #Comments type 2 State + @TOKEN(r'\(\*') + def t_start_comment2(self, token): + token.lexer.push_state("comment2") + + @TOKEN(r'\(\*') + def t_comment2_nested(self, token): + token.lexer.push_state("comment2") + + @TOKEN(r'\*\)') + def t_comment2_end(self, token): + token.lexer.pop_state() + + @TOKEN(r'\n') + def t_comment2_newline(self, token): + token.lexer.lineno += 1 + + def t_comment2_error(self, token): + self.lexer.skip(1) + + def t_comment2_eof(self, token): + token.lexpos = find_column(self.data, token.lexpos) + self.errors = True + self.eof = True + print(LexicographicError(token.lineno, token.lexpos, "EOF in comment")) + return None + + #Comment ignored characters + t_comment2_ignore = '' + + #Operators + @TOKEN(r'\+') + def t_PLUS(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\-') + def t_MINUS(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\*') + def t_MULTIPLY(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\/') + def t_DIVIDE(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\:') + def t_COLON(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\;') + def t_SEMICOLON(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\(') + def t_LPAREN(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\)') + def t_RPAREN(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\{') + def t_LBRACE(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\}') + def t_RBRACE(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\@') + def t_AT(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\.') + def t_DOT(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\,') + def t_COMMA(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\=\>') + def t_ACTION(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\=') + def t_EQ(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\<\=') + def t_LTEQ(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\<\-') + def t_ASSIGN(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'\<') + def t_LT(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + @TOKEN(r'~') + def t_COMPLEMENT(self, token): + token.lexpos = find_column(self.data, token.lexpos) + return token + + #Error handling rule + def t_error(self, token): + token.lexpos = find_column(self.data, token.lexpos) + self.errors = True + print(LexicographicError(token.lineno, token.lexpos, "ERROR \"{}\"".format(token.value[0]))) + token.lexer.skip(1) + +def find_column(data, lexpos): + index = data.rfind('\n', 0, lexpos) + 1 + colum = 0 + n = 0 + while index < lexpos: + c = data[index] + if c == '\t': + colum += 4 - n + n = 0 + else: + colum = colum + 1 + n += 1 + if n == 4: + n = 0 + index += 1 + return colum + 1 diff --git a/src/my_parser.py b/src/my_parser.py new file mode 100644 index 000000000..afa3e1e5e --- /dev/null +++ b/src/my_parser.py @@ -0,0 +1,296 @@ +import ply.yacc as yacc +import cool_ast as ast +from my_lexer import tokens +from errors import SyntacticError + +class MyParser: + def __init__(self, lexer): + self.tokens = tokens + self.lexer = lexer + self.parser = None + self.errors = False + + #Build the parser + def build(self, **kwargs): + self.lexer.build() + self.parser = yacc.yacc(module=self, **kwargs) + + def parse(self, code): + try: + return self.parser.parse(code) + except: + return None + + #Precedence rules + precedence = ( + ('right', 'ASSIGN'), + ('left', 'NOT'), + ('nonassoc', 'LT', 'LTEQ', 'EQ'), + ('left', 'PLUS', 'MINUS'), + ('left', 'MULTIPLY', 'DIVIDE'), + ('right', 'ISVOID'), + ('right', 'COMPLEMENT'), + ('left', 'AT'), + ('left', 'DOT') + ) + + def p_program(self, parse): + '''program : class_expresion SEMICOLON class_list''' + parse[0] = ast.ProgramNode([parse[1]] + parse[3]) + + def p_class_list(self, parse): + '''class_list : class_expresion SEMICOLON class_list + | empty''' + if len(parse) > 2: + parse[0] = [parse[1]] + parse[3] + else: + parse[0] = [] + + def p_class_expresion(self, parse): + '''class_expresion : CLASS TYPE LBRACE feature_list + | CLASS TYPE INHERITS TYPE LBRACE feature_list''' + if parse[3] == '{': + parse[0] = ast.ClassNode(parse[2], None, parse[4], parse.lineno(2), parse.lexpos(2)) + elif parse[3] == 'inherits': + parse[0] = ast.ClassNode(parse[2], parse[4], parse[6], parse.lineno(2), parse.lexpos(2), parse.lexpos(4)) + + def p_feature_list(self, parse): + '''feature_list : method_decl feature_list + | property_decl feature_list + | RBRACE''' + if len(parse) > 2: + parse[0] = [parse[1]] + parse[2] + else: + parse[0] = [] + + def p_property_decl(self, parse): + '''property_decl : declare_expresion SEMICOLON''' + parse[0] = ast.PropertyNode(parse[1], parse[1].line, parse[1].index) + + def p_declare_expresion(self, parse): + '''declare_expresion : ID COLON TYPE ASSIGN expr + | ID COLON TYPE''' + if len(parse) > 4: + parse[0] = ast.DeclarationNode(parse[1], parse[3], parse[5], parse.lineno(1), parse.lexpos(1), parse.lexpos(3),0) + else: + parse[0] = ast.DeclarationNode(parse[1], parse[3], None, parse.lineno(1), parse.lexpos(1), parse.lexpos(3),0) + + def p_method_decl(self, parse): + '''method_decl : ID LPAREN formal RPAREN COLON TYPE LBRACE expr RBRACE SEMICOLON''' + parse[0] = ast.MethodNode(parse[1], parse[3], parse[6], parse[8], parse.lineno(1), parse.lexpos(1), parse.lexpos(6)) + + def p_formal(self, parse): + ''' formal : declare_method formal_a + | empty ''' + if len(parse) > 2: + parse[0] = [parse[1]] + parse[2] + else: + parse[0] = [] + + def p_formal_a(self, parse): + '''formal_a : COMMA declare_method formal_a + | empty''' + if len(parse) > 2: + parse[0] = [parse[2]] + parse[3] + else: + parse[0] = [] + + def p_declare_method(self, parse): + '''declare_method : ID COLON TYPE''' + parse[0] = ast.DeclarationNode(parse[1], parse[3], None, parse.lineno(1), parse.lexpos(1), parse.lexpos(3), 0) + + def p_expr(self, parse): + '''expr : assign_expresion + | while_expresion + | v_expr''' + parse[0] = parse[1] + + def p_assign_expresion(self, parse): + '''assign_expresion : ID ASSIGN expr''' + parse[0] = ast.AssignNode(parse[1], parse[3], parse.lineno(1), parse.lexpos(1), parse.lexpos(2)) + + def p_while_expresion(self, parse): + '''while_expresion : WHILE v_expr LOOP expr POOL''' + parse[0] = ast.WhileNode(parse[2], parse[4], parse.lineno(1), parse.lexpos(1), parse[2].index) + + def p_v_expr(self, parse): + '''v_expr : conditional_expresion + | let_expresion + | case_expresion + | dispatch_expresion + | dispatch_instance + | block_expresion + | binary_operator + | neg + | compl + | is_void + | new_expresion + | term + | comparison_expresion''' + parse[0] = parse[1] + + def p_conditional_expresion(self, parse): + '''conditional_expresion : IF v_expr THEN expr ELSE expr FI''' + parse[0] = ast.IfNode(parse[2], parse[4], parse[6], parse.lineno(1), parse.lexpos(1)) + + def p_let_expresion(self, parse): + '''let_expresion : LET let_declr_list IN expr''' + parse[0] = ast.LetInNode(parse[2], parse[4], parse.lineno(1), parse.lexpos(1)) + + def p_let_declr_list(self, parse): + '''let_declr_list : declare_expresion let_declr_list_a''' + parse[0] = [parse[1]] + parse[2] + + def p_let_declr_list_a(self, parse): + '''let_declr_list_a : COMMA declare_expresion let_declr_list_a + | empty''' + if len(parse) > 3: + parse[0] = [parse[2]] + parse[3] + else: + parse[0] = [] + + def p_case_expresion(self, parse): + '''case_expresion : CASE expr OF case_list ESAC''' + parse[0] = ast.CaseNode(parse[2], parse[4], parse.lineno(1), parse.lexpos(1)) + + def p_case_list(self, parse): + '''case_list : declare_method ACTION expr SEMICOLON case_list_a''' + parse[0] = [ast.CaseItemNode(parse[1], parse[3], parse[1].line, parse[1].index2)] + parse[5] + + def p_case_list_a(self, parse): + '''case_list_a : declare_method ACTION expr SEMICOLON case_list_a + | empty''' + if len(parse) > 2: + parse[0] = [ast.CaseItemNode(parse[1], parse[3], parse[1].line, parse[1].index2)] + parse[5] + else: + parse[0] = [] + + def p_dispatch_expresion(self, parse): + '''dispatch_expresion : ID LPAREN dispatch_p_list RPAREN ''' + parse[0] = ast.DispatchNode(parse[1], parse[3], parse.lineno(1), parse.lexpos(1)) + + def p_dispatch_p_list(self, parse): + '''dispatch_p_list : v_expr dispatch_p_list_a + | empty''' + if len(parse) > 2: + parse[0] = [parse[1]] + parse[2] + else: + parse[0] = [] + + def p_dispatch_p_list_a(self, parse): + '''dispatch_p_list_a : COMMA v_expr dispatch_p_list_a + | empty''' + if len(parse) > 2: + parse[0] = [parse[2]] + parse[3] + else: + parse[0] = [] + + def p_dispatch_instance(self, parse): + '''dispatch_instance : v_expr DOT ID LPAREN dispatch_p_list RPAREN + | v_expr AT TYPE DOT ID LPAREN dispatch_p_list RPAREN ''' + if len(parse) > 7: + parse[0] = ast.DispatchParentInstanceNode(parse[1], parse[3], parse[5], parse[7], parse.lineno(2), parse[1].index, parse.lexpos(5), parse.lexpos(3)) + else: + parse[0] = ast.DispatchInstanceNode(parse[1], parse[3], parse[5], parse.lineno(2), parse[1].index, parse.lexpos(3)) + + def p_block_expresion(self, parse): + '''block_expresion : LBRACE block_expr RBRACE''' + parse[0] = ast.BlockNode(parse[2], parse.lineno(1), parse.lexpos(1)) + + def p_block_expr(self, parse): + '''block_expr : expr SEMICOLON block_expr_a''' + parse[0] = [parse[1]] + parse[3] + + def p_block_expr_a(self, parse): + '''block_expr_a : expr SEMICOLON block_expr_a + | empty''' + if len(parse) > 2: + parse[0] = [parse[1]] + parse[3] + else: + parse[0] = [] + + def p_binary_operator(self, parse): + '''binary_operator : v_expr PLUS v_expr + | v_expr MINUS v_expr + | v_expr MULTIPLY v_expr + | v_expr DIVIDE v_expr''' + if parse[2] == '+': + parse[0] = ast.PlusNode(parse[1], parse[3], parse.lineno(2), parse[1].index, parse.lexpos(2)) + elif parse[2] == '-': + parse[0] = ast.MinusNode(parse[1], parse[3], parse.lineno(2), parse[1].index, parse.lexpos(2)) + elif parse[2] == '*': + parse[0] = ast.StarNode(parse[1], parse[3], parse.lineno(2), parse[1].index, parse.lexpos(2)) + elif parse[2] == '/': + parse[0] = ast.DivNode(parse[1], parse[3], parse.lineno(2), parse[1].index, parse.lexpos(2)) + + def p_neg(self, parse): + '''neg : NOT expr''' + parse[0] = ast.NotNode(parse[2], parse.lineno(1), parse.lexpos(1), parse.lexpos(1) + 4) + + def p_compl(self, parse): + '''compl : COMPLEMENT expr''' + parse[0] = ast.ComplementNode(parse[2], parse.lineno(1), parse.lexpos(1), parse.lexpos(1) + 1) + + def p_is_void(self, parse): + '''is_void : ISVOID expr''' + parse[0] = ast.IsVoidNode(parse[2], parse.lineno(1), parse.lexpos(1)) + + def p_new_expresion(self, parse): + '''new_expresion : NEW TYPE''' + parse[0] = ast.NewNode(parse[2], parse.lineno(1), parse.lexpos(1), parse.lexpos(2)) + + def p_comparison_expresion(self, parse): + '''comparison_expresion : v_expr LT v_expr + | v_expr LTEQ v_expr + | v_expr EQ v_expr''' + if parse[2] == '<': + parse[0] = ast.LessThanNode(parse[1], parse[3], parse.lineno(2), parse[1].index, parse.lexpos(2)) + elif parse[2] == '<=': + parse[0] = ast.LessEqualNode(parse[1], parse[3], parse.lineno(2), parse[1].index, parse.lexpos(2)) + elif parse[2] == '=': + parse[0] = ast.EqualNode(parse[1], parse[3], parse.lineno(2), parse[1].index, parse.lexpos(2)) + + def p_term(self, parse): + '''term : var + | num + | str + | bool + | negnum + | LPAREN v_expr RPAREN''' + if parse[1] == '(': + parse[0] = parse[2] + else: + parse[0] = parse[1] + + def p_var(self, parse): + '''var : ID''' + parse[0] = ast.VariableNode(parse[1], parse.lineno(1), parse.lexpos(1)) + + def p_num(self, parse): + '''num : INTEGER''' + parse[0] = ast.IntegerNode(parse[1], parse.lineno(1), parse.lexpos(1)) + + def p_str(self, parse): + '''str : STRING''' + parse[0] = ast.StringNode(parse[1], parse.lineno(1), parse.lexpos(1)) + + def p_bool(self, parse): + '''bool : TRUE + | FALSE''' + parse[0] = ast.BooleanNode(parse[1], parse.lineno(1), parse.lexpos(1)) + + def p_negnum(self, parse): + '''negnum : MINUS term''' + parse[0] = ast.NegationNode(parse[2], parse.lineno(1), parse.lexpos(1)) + + def p_empty(self, parse): + '''empty :''' + pass + + #Error rule + def p_error(self, parse): + self.errors = True + if parse: + print(SyntacticError(parse.lineno, parse.lexpos, "ERROR at or near {}".format(parse.value))) + else: + print(SyntacticError(0, 0, "ERROR at or near EOF")) \ No newline at end of file diff --git a/src/parsetab.py b/src/parsetab.py new file mode 100644 index 000000000..3e658ea35 --- /dev/null +++ b/src/parsetab.py @@ -0,0 +1,109 @@ + +# parsetab.py +# This file is automatically generated. Do not edit. +# pylint: disable=W,C,R +_tabversion = '3.10' + +_lr_method = 'LALR' + +_lr_signature = 'rightASSIGNleftNOTnonassocLTLTEQEQleftPLUSMINUSleftMULTIPLYDIVIDErightISVOIDrightCOMPLEMENTleftATleftDOTACTION ASSIGN AT CASE CLASS COLON COMMA COMPLEMENT DIVIDE DOT ELSE EQ ESAC FALSE FI ID IF IN INHERITS INTEGER ISVOID LBRACE LET LOOP LPAREN LT LTEQ MINUS MULTIPLY NEW NOT OF PLUS POOL RBRACE RPAREN SEMICOLON STRING THEN TRUE TYPE WHILEprogram : class_expresion SEMICOLON class_listclass_list : class_expresion SEMICOLON class_list\n\t\t\t\t\t | emptyclass_expresion : CLASS TYPE LBRACE feature_list\n\t\t\t\t\t\t | CLASS TYPE INHERITS TYPE LBRACE feature_listfeature_list : method_decl feature_list\n\t\t\t\t\t\t| property_decl feature_list\n\t\t\t\t\t\t| RBRACEproperty_decl : declare_expresion SEMICOLONdeclare_expresion : ID COLON TYPE ASSIGN expr\n\t\t\t\t\t\t\t | ID COLON TYPEmethod_decl : ID LPAREN formal RPAREN COLON TYPE LBRACE expr RBRACE SEMICOLON formal : declare_method formal_a\n\t\t\t\t | empty formal_a : COMMA declare_method formal_a\n\t\t\t\t\t| emptydeclare_method : ID COLON TYPEexpr : assign_expresion\n\t\t\t\t| while_expresion\n\t\t\t\t| v_exprassign_expresion : ID ASSIGN exprwhile_expresion : WHILE v_expr LOOP expr POOLv_expr : conditional_expresion\n\t\t\t\t | let_expresion\n\t\t\t\t | case_expresion\n\t\t\t\t | dispatch_expresion\n\t\t\t\t | dispatch_instance\n\t\t\t\t | block_expresion\n\t\t\t\t | binary_operator\n\t\t\t\t | neg\n\t\t\t\t | compl\n\t\t\t\t | is_void\n\t\t\t\t | new_expresion\n\t\t\t\t | term\n\t\t\t\t | comparison_expresionconditional_expresion : IF v_expr THEN expr ELSE expr FIlet_expresion : LET let_declr_list IN exprlet_declr_list : declare_expresion let_declr_list_alet_declr_list_a : COMMA declare_expresion let_declr_list_a\n\t\t\t\t\t\t\t| emptycase_expresion : CASE expr OF case_list ESACcase_list : declare_method ACTION expr SEMICOLON case_list_acase_list_a : declare_method ACTION expr SEMICOLON case_list_a\n\t\t\t\t\t | emptydispatch_expresion : ID LPAREN dispatch_p_list RPAREN dispatch_p_list : v_expr dispatch_p_list_a\n\t\t\t\t\t\t | emptydispatch_p_list_a : COMMA v_expr dispatch_p_list_a\n\t\t\t\t\t\t\t | emptydispatch_instance : v_expr DOT ID LPAREN dispatch_p_list RPAREN\n\t\t\t\t\t\t\t | v_expr AT TYPE DOT ID LPAREN dispatch_p_list RPAREN block_expresion : LBRACE block_expr RBRACEblock_expr : expr SEMICOLON block_expr_ablock_expr_a : expr SEMICOLON block_expr_a\n\t\t\t\t\t\t| emptybinary_operator : v_expr PLUS v_expr\n\t\t\t\t\t\t | v_expr MINUS v_expr\n\t\t\t\t\t\t | v_expr MULTIPLY v_expr\n\t\t\t\t\t\t | v_expr DIVIDE v_exprneg : NOT exprcompl : COMPLEMENT expris_void : ISVOID exprnew_expresion : NEW TYPEcomparison_expresion : v_expr LT v_expr\n\t\t\t\t\t\t\t\t| v_expr LTEQ v_expr\n\t\t\t\t\t\t\t\t| v_expr EQ v_exprterm : var\n\t\t\t\t| num\n\t\t\t\t| str\n\t\t\t\t| bool\n\t\t\t\t| negnum\n\t\t\t\t| LPAREN v_expr RPARENvar : IDnum : INTEGERstr : STRINGbool : TRUE\n\t\t | FALSEnegnum : MINUS termempty :' + +_lr_action_items = {'MINUS':([37,41,42,43,44,45,46,48,49,50,51,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,74,75,76,77,78,81,82,85,86,87,89,90,91,92,93,94,96,101,102,103,104,105,106,107,108,109,110,111,113,114,115,116,117,118,120,124,126,128,130,131,138,140,145,147,149,150,154,155,156,157,160,161,167,168,172,],[41,41,-31,-32,41,41,-68,-30,94,-23,-34,-27,41,-77,-35,-25,41,-19,-18,-24,-71,-76,41,-75,-28,-70,-73,41,-69,-29,-67,-74,41,-33,41,-26,-78,-73,94,-73,-63,41,41,41,41,41,41,41,-62,94,41,41,94,-60,-61,41,-52,41,41,94,94,-58,-59,94,-57,-56,41,41,94,-21,-72,41,-37,41,-45,41,-22,41,-41,41,94,41,-50,-36,-51,41,]),'NOT':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,]),'SEMICOLON':([3,10,13,14,15,19,20,30,31,42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,71,72,73,74,76,78,81,82,84,86,87,101,106,107,109,113,114,115,116,117,118,120,130,131,135,140,147,148,150,155,161,162,167,168,173,],[5,18,-4,21,-8,-7,-6,-11,-5,-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-10,-29,-67,-74,-33,-26,-78,-73,110,-73,-63,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,149,-37,-45,158,-22,-41,-50,166,-36,-51,174,]),'INHERITS':([4,],[7,]),'LET':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,]),'COMMA':([27,30,38,40,42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,71,72,73,74,76,78,81,82,86,87,97,101,106,107,109,113,114,115,116,117,118,120,128,130,131,139,140,147,150,155,157,161,167,168,],[34,-11,34,-17,-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-10,-29,-67,-74,-33,-26,-78,-73,-73,-63,123,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,145,-21,-72,123,-37,-45,-22,-41,145,-50,-36,-51,]),'$end':([1,5,8,9,18,25,],[0,-79,-3,-1,-79,-2,]),'FI':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,86,87,101,106,107,109,113,114,115,116,117,118,120,130,131,140,147,150,155,161,163,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,-73,-63,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,-37,-45,-22,-41,-50,167,-36,-51,]),'COMPLEMENT':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,]),'MULTIPLY':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,91,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,91,-73,-63,-62,91,91,-60,-61,-52,91,91,-58,-59,91,91,91,91,-21,-72,-37,-45,-22,-41,91,-50,-36,-51,]),'TRUE':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,]),'IF':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,]),'LBRACE':([4,17,37,44,45,54,58,64,69,75,77,80,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[6,24,44,44,44,44,44,44,44,44,44,108,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,]),'WHILE':([37,44,54,58,75,77,104,108,110,111,124,126,149,154,156,172,],[45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,]),'COLON':([16,29,35,99,],[23,36,39,23,]),'LTEQ':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,93,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,93,-73,-63,-62,93,93,-60,-61,-52,None,None,-58,-59,None,-57,-56,93,-21,-72,-37,-45,-22,-41,93,-50,-36,-51,]),'STRING':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,]),'NEW':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,]),'LPAREN':([16,37,41,44,45,54,58,64,68,69,75,77,86,89,90,91,92,93,94,96,103,104,108,110,111,119,124,126,138,145,149,151,154,156,160,172,],[22,69,69,69,69,69,69,69,103,69,69,69,103,69,69,69,69,69,69,69,69,69,69,69,69,138,69,69,69,69,69,160,69,69,69,69,]),'IN':([30,42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,71,72,73,74,76,78,81,82,86,87,97,98,101,106,107,109,113,114,115,116,117,118,120,121,122,130,131,139,140,147,150,153,155,161,167,168,],[-11,-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-10,-29,-67,-74,-33,-26,-78,-73,-73,-63,-79,124,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-40,-38,-21,-72,-79,-37,-45,-22,-39,-41,-50,-36,-51,]),'DOT':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,112,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,95,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,95,-73,-63,-62,95,95,-60,-61,-52,137,95,95,95,95,95,95,95,95,-21,-72,-37,-45,-22,-41,95,-50,-36,-51,]),'TYPE':([2,7,23,36,39,47,88,],[4,17,30,40,80,87,112,]),'ACTION':([40,141,170,],[-17,154,172,]),'ELSE':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,86,87,101,106,107,109,113,114,115,116,117,118,120,130,131,140,143,147,150,155,161,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,-73,-63,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,-37,156,-45,-22,-41,-50,-36,-51,]),'ASSIGN':([30,68,],[37,104,]),'ISVOID':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,]),'OF':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,86,87,100,101,106,107,109,113,114,115,116,117,118,120,130,131,140,147,150,155,161,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,-73,-63,125,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,-37,-45,-22,-41,-50,-36,-51,]),'ESAC':([142,166,169,171,174,175,],[155,-79,-44,-42,-79,-43,]),'THEN':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,86,87,101,102,106,107,109,113,114,115,116,117,118,120,130,131,140,147,150,155,161,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,-73,-63,-62,126,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,-37,-45,-22,-41,-50,-36,-51,]),'RPAREN':([22,26,27,28,32,33,38,40,42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,79,81,82,86,87,101,103,105,106,107,109,113,114,115,116,117,118,120,127,128,129,130,131,138,140,144,146,147,150,152,155,157,160,161,164,165,167,168,],[-79,-14,-79,35,-13,-16,-79,-17,-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-15,-78,-73,-73,-63,-62,-79,131,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-47,-79,147,-21,-72,-79,-37,-49,-46,-45,-22,161,-41,-79,-79,-50,-48,168,-36,-51,]),'DIVIDE':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,92,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,92,-73,-63,-62,92,92,-60,-61,-52,92,92,-58,-59,92,92,92,92,-21,-72,-37,-45,-22,-41,92,-50,-36,-51,]),'EQ':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,89,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,89,-73,-63,-62,89,89,-60,-61,-52,None,None,-58,-59,None,-57,-56,89,-21,-72,-37,-45,-22,-41,89,-50,-36,-51,]),'LT':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,90,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,90,-73,-63,-62,90,90,-60,-61,-52,None,None,-58,-59,None,-57,-56,90,-21,-72,-37,-45,-22,-41,90,-50,-36,-51,]),'LOOP':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,106,107,109,113,114,115,116,117,118,120,130,131,140,147,150,155,161,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,111,-73,-63,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,-37,-45,-22,-41,-50,-36,-51,]),'ID':([6,11,12,21,22,24,34,37,41,44,45,52,54,58,64,69,75,77,89,90,91,92,93,94,95,96,103,104,108,110,111,123,124,125,126,137,138,145,149,154,156,158,160,166,172,174,],[16,16,16,-9,29,16,29,68,82,68,86,99,68,68,86,86,68,68,86,86,86,86,86,86,119,86,86,68,68,68,68,99,68,29,68,151,86,86,68,68,68,-12,86,29,68,29,]),'POOL':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,86,87,101,106,107,109,113,114,115,116,117,118,120,130,131,136,140,147,150,155,161,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,-73,-63,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,150,-37,-45,-22,-41,-50,-36,-51,]),'PLUS':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,96,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,96,-73,-63,-62,96,96,-60,-61,-52,96,96,-58,-59,96,-57,-56,96,-21,-72,-37,-45,-22,-41,96,-50,-36,-51,]),'INTEGER':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,]),'CASE':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,]),'FALSE':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,]),'CLASS':([0,5,18,],[2,2,2,]),'AT':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,88,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,88,-73,-63,-62,88,88,-60,-61,-52,88,88,88,88,88,88,88,88,-21,-72,-37,-45,-22,-41,88,-50,-36,-51,]),'RBRACE':([6,11,12,21,24,42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,83,86,87,101,106,107,109,110,113,114,115,116,117,118,120,130,131,132,133,134,140,147,149,150,155,158,159,161,167,168,],[15,15,15,-9,15,-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,109,-73,-63,-62,-60,-61,-52,-79,-66,-64,-58,-59,-65,-57,-56,-21,-72,148,-55,-53,-37,-45,-79,-22,-41,-12,-54,-50,-36,-51,]),} + +_lr_action = {} +for _k, _v in _lr_action_items.items(): + for _x,_y in zip(_v[0],_v[1]): + if not _x in _lr_action: _lr_action[_x] = {} + _lr_action[_x][_k] = _y +del _lr_action_items + +_lr_goto_items = {'formal_a':([27,38,],[32,79,]),'empty':([5,18,22,27,38,97,103,110,128,138,139,149,157,160,166,174,],[8,8,26,33,33,121,127,133,144,127,121,133,144,127,169,169,]),'declare_method':([22,34,125,166,174,],[27,38,141,170,170,]),'while_expresion':([37,44,54,58,75,77,104,108,110,111,124,126,149,154,156,172,],[59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,]),'compl':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,]),'dispatch_instance':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,]),'declare_expresion':([6,11,12,24,52,123,],[14,14,14,14,97,139,]),'block_expr_a':([110,149,],[134,159,]),'let_declr_list_a':([97,139,],[122,153,]),'program':([0,],[1,]),'let_declr_list':([52,],[98,]),'new_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,]),'formal':([22,],[28,]),'term':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[51,81,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,]),'block_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,]),'num':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,]),'let_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,]),'method_decl':([6,11,12,24,],[12,12,12,12,]),'dispatch_p_list':([103,138,160,],[129,152,165,]),'neg':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,]),'class_expresion':([0,5,18,],[3,10,10,]),'negnum':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,]),'property_decl':([6,11,12,24,],[11,11,11,11,]),'conditional_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,]),'block_expr':([44,],[83,]),'case_list_a':([166,174,],[171,175,]),'bool':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,]),'expr':([37,44,54,58,75,77,104,108,110,111,124,126,149,154,156,172,],[71,84,100,101,106,107,130,132,135,136,140,143,135,162,163,173,]),'binary_operator':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,]),'class_list':([5,18,],[9,25,]),'feature_list':([6,11,12,24,],[13,19,20,31,]),'assign_expresion':([37,44,54,58,75,77,104,108,110,111,124,126,149,154,156,172,],[60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,]),'str':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,]),'dispatch_p_list_a':([128,157,],[146,164,]),'var':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,]),'is_void':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,]),'comparison_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,]),'case_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,]),'v_expr':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[49,49,85,49,49,102,105,49,49,113,114,115,116,117,118,120,128,49,49,49,49,49,49,128,157,49,49,49,128,49,]),'dispatch_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,]),'case_list':([125,],[142,]),} + +_lr_goto = {} +for _k, _v in _lr_goto_items.items(): + for _x, _y in zip(_v[0], _v[1]): + if not _x in _lr_goto: _lr_goto[_x] = {} + _lr_goto[_x][_k] = _y +del _lr_goto_items +_lr_productions = [ + ("S' -> program","S'",1,None,None,None), + ('program -> class_expresion SEMICOLON class_list','program',3,'p_program','my_parser.py',38), + ('class_list -> class_expresion SEMICOLON class_list','class_list',3,'p_class_list','my_parser.py',42), + ('class_list -> empty','class_list',1,'p_class_list','my_parser.py',43), + ('class_expresion -> CLASS TYPE LBRACE feature_list','class_expresion',4,'p_class_expresion','my_parser.py',50), + ('class_expresion -> CLASS TYPE INHERITS TYPE LBRACE feature_list','class_expresion',6,'p_class_expresion','my_parser.py',51), + ('feature_list -> method_decl feature_list','feature_list',2,'p_feature_list','my_parser.py',58), + ('feature_list -> property_decl feature_list','feature_list',2,'p_feature_list','my_parser.py',59), + ('feature_list -> RBRACE','feature_list',1,'p_feature_list','my_parser.py',60), + ('property_decl -> declare_expresion SEMICOLON','property_decl',2,'p_property_decl','my_parser.py',67), + ('declare_expresion -> ID COLON TYPE ASSIGN expr','declare_expresion',5,'p_declare_expresion','my_parser.py',71), + ('declare_expresion -> ID COLON TYPE','declare_expresion',3,'p_declare_expresion','my_parser.py',72), + ('method_decl -> ID LPAREN formal RPAREN COLON TYPE LBRACE expr RBRACE SEMICOLON','method_decl',10,'p_method_decl','my_parser.py',79), + ('formal -> declare_method formal_a','formal',2,'p_formal','my_parser.py',83), + ('formal -> empty','formal',1,'p_formal','my_parser.py',84), + ('formal_a -> COMMA declare_method formal_a','formal_a',3,'p_formal_a','my_parser.py',91), + ('formal_a -> empty','formal_a',1,'p_formal_a','my_parser.py',92), + ('declare_method -> ID COLON TYPE','declare_method',3,'p_declare_method','my_parser.py',99), + ('expr -> assign_expresion','expr',1,'p_expr','my_parser.py',103), + ('expr -> while_expresion','expr',1,'p_expr','my_parser.py',104), + ('expr -> v_expr','expr',1,'p_expr','my_parser.py',105), + ('assign_expresion -> ID ASSIGN expr','assign_expresion',3,'p_assign_expresion','my_parser.py',109), + ('while_expresion -> WHILE v_expr LOOP expr POOL','while_expresion',5,'p_while_expresion','my_parser.py',113), + ('v_expr -> conditional_expresion','v_expr',1,'p_v_expr','my_parser.py',117), + ('v_expr -> let_expresion','v_expr',1,'p_v_expr','my_parser.py',118), + ('v_expr -> case_expresion','v_expr',1,'p_v_expr','my_parser.py',119), + ('v_expr -> dispatch_expresion','v_expr',1,'p_v_expr','my_parser.py',120), + ('v_expr -> dispatch_instance','v_expr',1,'p_v_expr','my_parser.py',121), + ('v_expr -> block_expresion','v_expr',1,'p_v_expr','my_parser.py',122), + ('v_expr -> binary_operator','v_expr',1,'p_v_expr','my_parser.py',123), + ('v_expr -> neg','v_expr',1,'p_v_expr','my_parser.py',124), + ('v_expr -> compl','v_expr',1,'p_v_expr','my_parser.py',125), + ('v_expr -> is_void','v_expr',1,'p_v_expr','my_parser.py',126), + ('v_expr -> new_expresion','v_expr',1,'p_v_expr','my_parser.py',127), + ('v_expr -> term','v_expr',1,'p_v_expr','my_parser.py',128), + ('v_expr -> comparison_expresion','v_expr',1,'p_v_expr','my_parser.py',129), + ('conditional_expresion -> IF v_expr THEN expr ELSE expr FI','conditional_expresion',7,'p_conditional_expresion','my_parser.py',133), + ('let_expresion -> LET let_declr_list IN expr','let_expresion',4,'p_let_expresion','my_parser.py',137), + ('let_declr_list -> declare_expresion let_declr_list_a','let_declr_list',2,'p_let_declr_list','my_parser.py',141), + ('let_declr_list_a -> COMMA declare_expresion let_declr_list_a','let_declr_list_a',3,'p_let_declr_list_a','my_parser.py',145), + ('let_declr_list_a -> empty','let_declr_list_a',1,'p_let_declr_list_a','my_parser.py',146), + ('case_expresion -> CASE expr OF case_list ESAC','case_expresion',5,'p_case_expresion','my_parser.py',153), + ('case_list -> declare_method ACTION expr SEMICOLON case_list_a','case_list',5,'p_case_list','my_parser.py',157), + ('case_list_a -> declare_method ACTION expr SEMICOLON case_list_a','case_list_a',5,'p_case_list_a','my_parser.py',161), + ('case_list_a -> empty','case_list_a',1,'p_case_list_a','my_parser.py',162), + ('dispatch_expresion -> ID LPAREN dispatch_p_list RPAREN','dispatch_expresion',4,'p_dispatch_expresion','my_parser.py',169), + ('dispatch_p_list -> v_expr dispatch_p_list_a','dispatch_p_list',2,'p_dispatch_p_list','my_parser.py',173), + ('dispatch_p_list -> empty','dispatch_p_list',1,'p_dispatch_p_list','my_parser.py',174), + ('dispatch_p_list_a -> COMMA v_expr dispatch_p_list_a','dispatch_p_list_a',3,'p_dispatch_p_list_a','my_parser.py',181), + ('dispatch_p_list_a -> empty','dispatch_p_list_a',1,'p_dispatch_p_list_a','my_parser.py',182), + ('dispatch_instance -> v_expr DOT ID LPAREN dispatch_p_list RPAREN','dispatch_instance',6,'p_dispatch_instance','my_parser.py',189), + ('dispatch_instance -> v_expr AT TYPE DOT ID LPAREN dispatch_p_list RPAREN','dispatch_instance',8,'p_dispatch_instance','my_parser.py',190), + ('block_expresion -> LBRACE block_expr RBRACE','block_expresion',3,'p_block_expresion','my_parser.py',197), + ('block_expr -> expr SEMICOLON block_expr_a','block_expr',3,'p_block_expr','my_parser.py',201), + ('block_expr_a -> expr SEMICOLON block_expr_a','block_expr_a',3,'p_block_expr_a','my_parser.py',205), + ('block_expr_a -> empty','block_expr_a',1,'p_block_expr_a','my_parser.py',206), + ('binary_operator -> v_expr PLUS v_expr','binary_operator',3,'p_binary_operator','my_parser.py',213), + ('binary_operator -> v_expr MINUS v_expr','binary_operator',3,'p_binary_operator','my_parser.py',214), + ('binary_operator -> v_expr MULTIPLY v_expr','binary_operator',3,'p_binary_operator','my_parser.py',215), + ('binary_operator -> v_expr DIVIDE v_expr','binary_operator',3,'p_binary_operator','my_parser.py',216), + ('neg -> NOT expr','neg',2,'p_neg','my_parser.py',227), + ('compl -> COMPLEMENT expr','compl',2,'p_compl','my_parser.py',231), + ('is_void -> ISVOID expr','is_void',2,'p_is_void','my_parser.py',235), + ('new_expresion -> NEW TYPE','new_expresion',2,'p_new_expresion','my_parser.py',239), + ('comparison_expresion -> v_expr LT v_expr','comparison_expresion',3,'p_comparison_expresion','my_parser.py',243), + ('comparison_expresion -> v_expr LTEQ v_expr','comparison_expresion',3,'p_comparison_expresion','my_parser.py',244), + ('comparison_expresion -> v_expr EQ v_expr','comparison_expresion',3,'p_comparison_expresion','my_parser.py',245), + ('term -> var','term',1,'p_term','my_parser.py',254), + ('term -> num','term',1,'p_term','my_parser.py',255), + ('term -> str','term',1,'p_term','my_parser.py',256), + ('term -> bool','term',1,'p_term','my_parser.py',257), + ('term -> negnum','term',1,'p_term','my_parser.py',258), + ('term -> LPAREN v_expr RPAREN','term',3,'p_term','my_parser.py',259), + ('var -> ID','var',1,'p_var','my_parser.py',266), + ('num -> INTEGER','num',1,'p_num','my_parser.py',270), + ('str -> STRING','str',1,'p_str','my_parser.py',274), + ('bool -> TRUE','bool',1,'p_bool','my_parser.py',278), + ('bool -> FALSE','bool',1,'p_bool','my_parser.py',279), + ('negnum -> MINUS term','negnum',2,'p_negnum','my_parser.py',283), + ('empty -> ','empty',0,'p_empty','my_parser.py',287), +] diff --git a/src/semantics.py b/src/semantics.py new file mode 100644 index 000000000..b6d98f964 --- /dev/null +++ b/src/semantics.py @@ -0,0 +1,127 @@ +import visitor +import cool_ast as ast +from utils import TypesExist, MethodInfo, Scope +from check_inherit import CheckInherintance1, CheckInherintance2 +from check_semantics import CheckSemantics +from check_types import CheckTypes +from errors import * + +class SemanticsAndTypes: + def __init__(self, tree): + self.tree = tree + self.types = TypesExist() + + def check(self): + ct = CreateTypes(self.types) + ct.visit(self.tree) + if ct.errors: + return False + ci = CheckInherintance1(ct.types) + ci.visit(self.tree) + if ci.errors: + return False + ci2 = CheckInherintance2() + ci2.visit(self.tree) + if ci2.errors: + return False + crs = CreateScopes(ci.types) + crs.visit(self.tree) + cs = CheckSemantics(crs.types) + cs.visit(self.tree) + if cs.errors: + return False + cts = CheckTypes(ci.types) + cts.visit(self.tree) + self.types = cts.types + return not cts.errors + +class CreateTypes: + def __init__(self, types): + self.types = types + self.errors = False + + @visitor.on('node') + def visit(self, node): + pass + + @visitor.when(ast.ProgramNode) + def visit(self, node): + for expr in node.expr: + self.visit(expr) + + @visitor.when(ast.ClassNode) + def visit(self, node): + if node.type in ["Int", "String", "Bool", "IO", "Object"]: + self.errors = True + print(SemanticError(node.line, node.index, "Redefinition of basic class {}.".format(node.type))) + elif self.types.is_defined(node.type): + self.errors = True + print(SemanticError(node.line, node.index, "Classes may not be redefined")) + elif node.inherits in ["Int", "String", "Bool"]: + self.errors = True + print(SemanticError(node.line, node.index2, "Class {} cannot inherit class {}.".format(node.type, node.inherits))) + attrb = {} + methods = {} + for n in node.body: + if type(n) is ast.PropertyNode: + if n.decl.id == "self": + self.errors = True + print(SemanticError(n.line, n.index, "'self' cannot be the name of an attribute.")) + elif n.decl.id in attrb: + self.errors = True + print(SemanticError(n.line, n.index, "Property {} already defined in type {}".format(n.decl.id, node.type))) + else: + attrb[n.decl.id] = n + else: + params = [] + for p in n.params: + params.append(p.type) + if n.name in methods: + self.errors = True + print(SemanticError(n.line, n.index, "Method {} already defined in type {}".format(n.name, node.type))) + else: + method = MethodInfo(n.name, n.type_ret, params, n.line, n.index) + methods[n.name] = method + n.info = method + node.info = self.types.set_type(node.type, methods, attrb) + +class CreateScopes: + def __init__(self, types): + self.types = types + + @visitor.on('node') + def visit(self, node): + pass + + @visitor.when(ast.ProgramNode) + def visit(self, node): + n = len(node.expr) + while n > 0: + for expr in node.expr: + scope = self.types.get_scope(expr.type) + if scope == None: + if expr.inherits in ["IO", "Object"] or expr.inherits == None: + self.visit(expr, Scope()) + n -= 1 + else: + inherits_scope = self.types.get_scope(expr.inherits) + if inherits_scope != None: + self.visit(expr, inherits_scope.new_scope()) + n -= 1 + + @visitor.when(ast.ClassNode) + def visit(self, node, scope): + for n in node.body: + if type(n) is ast.PropertyNode: + self.visit(n, scope) + self.types.set_scope(node.type, scope) + + @visitor.when(ast.PropertyNode) + def visit(self, node, scope): + self.visit(node.decl, scope) + + @visitor.when(ast.DeclarationNode) + def visit(self, node, scope): + if scope.get_var(node.id) == None: + node.var_info = scope.append(node.id) + node.var_info.type = self.types.get_type(node.type) \ No newline at end of file diff --git a/src/utils.py b/src/utils.py new file mode 100644 index 000000000..b945a61af --- /dev/null +++ b/src/utils.py @@ -0,0 +1,147 @@ +import sys +import itertools as itl +from cool_ast import DeclarationNode, PropertyNode + +class TypesExist: + def __init__(self): + #methods for primitive types + object_methods = {"type_name" : MethodInfo("type_name", "String", []), + "abort" : MethodInfo("abort", "Object", [])} + + string_methods = {"length" : MethodInfo("length", "Int", []), + "concat" : MethodInfo("concat", "String", ["String"]), + "substr" : MethodInfo("substr", "String", ["Int", "Int"])} + + io_methods = {"in_int" : MethodInfo("in_int", "Int", []), + "out_int": MethodInfo("out_int", "IO", ["Int"]), + "in_string" : MethodInfo("in_string", "String", []), + "out_string": MethodInfo("out_string", "IO", ["String"])} + + #primitive types declaration + type_object = ClassInfo("Object", None, object_methods, {"holder": PropertyNode(DeclarationNode("holder", None, None,0,0,0,0))}) + type_int = ClassInfo("Int", type_object) + type_string = ClassInfo("String", type_object, string_methods) + type_bool = ClassInfo("Bool", type_object) + type_io = ClassInfo("IO", type_object, io_methods) + void = ClassInfo("Void") + + #dicctionary witch types + self.types = {"Object": type_object, + "Int": type_int, + "String": type_string, + "Bool": type_bool, + "IO": type_io, + "Void": void + } + + def is_defined(self, name): + return True if name in self.types else False + + def get_type(self, name): + return self.types[name] if self.is_defined(name) else None + + def get_parent_type(self, name): + return self.types[name].inherits if self.is_defined(name) else None + + def set_type(self, name, methods, attrb): + self.types[name] = ClassInfo(name, self.types["Object"], methods, attrb) + return self.types[name] + + def change_inherits(self, name, inherits): + self.types[name].inherits = self.types[inherits] + + def set_scope(self, name, scope): + self.types[name].scope = scope + + def get_scope(self, name): + return self.types[name].scope + + def check_inheritance(self, type_A, type_B): + parents = [] + a = type_A + b = type_B + if a == b: + return a + while a.inherits != None: + parents.append(a) + a = a.inherits + while b != None: + if b in parents: + return b + b = b.inherits + return self.types["Object"] + + def check_variance(self, type_A, type_B): + b = type_B + while True: + if b == None: + return False + if type_A == b: + return True + b = b.inherits + +class MethodInfo: + def __init__(self, name, type_ret, params_types, line = 0, index = 0): + self.name = name + self.type_ret = type_ret + self.params_types = params_types + self.cil_name = "" + self.line = line + self.index = index + +class ClassInfo: + def __init__(self, name, inherits = None, methods = None, attrb = None): + self.name = name + self.inherits = inherits + self.methods = methods if methods else {} + self.attrb = attrb if attrb else {} + self.scope = None + self.generate_cil_names() + + def generate_cil_names(self): + for name, method in self.methods.items(): + method.cil_name = '{}_{}'.format(self.name, name) + +class VarInfo: + def __init__(self, name, type = None): + self.name = name + self.type = type if type else ClassInfo("Void") + self.holder = None + +class Scope: + def __init__(self, parent = None): + self.parent = parent + self.locals = [] + self.children = [] + self.index = 0 if parent == None else len(parent.locals) + + def append(self, name): + var = VarInfo(name) + self.locals.append(var) + return var + + def new_scope(self): + scope = Scope(self) + self.children.append(scope) + return scope + + def get_var(self, name): + current = self + top = len(self.locals) + while current != None: + var = Scope.find(name, current, top) + if var != None: + return var + top = current.index + current = current.parent + return None + + def is_local(self, name): + return Scope.find(name, self) != None + + @staticmethod + def find(name, scope, top = None): + if top == None: + top = len(scope.locals) + candidates = (var for var in itl.islice(scope.locals, top) if var.name == name) + return next(candidates, None) diff --git a/src/visitor.py b/src/visitor.py new file mode 100644 index 000000000..964842836 --- /dev/null +++ b/src/visitor.py @@ -0,0 +1,80 @@ +# The MIT License (MIT) +# +# Copyright (c) 2013 Curtis Schlak +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +import inspect + +__all__ = ['on', 'when'] + +def on(param_name): + def f(fn): + dispatcher = Dispatcher(param_name, fn) + return dispatcher + return f + + +def when(param_type): + def f(fn): + frame = inspect.currentframe().f_back + func_name = fn.func_name if 'func_name' in dir(fn) else fn.__name__ + dispatcher = frame.f_locals[func_name] + if not isinstance(dispatcher, Dispatcher): + dispatcher = dispatcher.dispatcher + dispatcher.add_target(param_type, fn) + def ff(*args, **kw): + return dispatcher(*args, **kw) + ff.dispatcher = dispatcher + return ff + return f + + +class Dispatcher(object): + def __init__(self, param_name, fn): + frame = inspect.currentframe().f_back.f_back + top_level = frame.f_locals == frame.f_globals + self.param_index = self.__argspec(fn).args.index(param_name) + self.param_name = param_name + self.targets = {} + + def __call__(self, *args, **kw): + typ = args[self.param_index].__class__ + d = self.targets.get(typ) + if d is not None: + return d(*args, **kw) + else: + issub = issubclass + t = self.targets + ks = t.keys() + ans = [t[k](*args, **kw) for k in ks if issub(typ, k)] + if len(ans) == 1: + return ans.pop() + return ans + + def add_target(self, typ, target): + self.targets[typ] = target + + @staticmethod + def __argspec(fn): + # Support for Python 3 type hints requires inspect.getfullargspec + if hasattr(inspect, 'getfullargspec'): + return inspect.getfullargspec(fn) + else: + return inspect.getargspec(fn) From 93b77c9f9f8085f558e6db8a0b026e345ceefcbd Mon Sep 17 00:00:00 2001 From: Pablo A Fuentes <91356359+pfuentes2021@users.noreply.github.com> Date: Sat, 25 Sep 2021 20:29:05 -0400 Subject: [PATCH 3/9] Add files via upload --- src/Readme.md | 156 +- src/check_semantics.py | 3 - src/check_types.py | 10 - src/code_to_cil.py | 9 - src/cool_ast.py | 2 - src/coolc.sh | 28 +- src/main.py | 2 + src/my_parser.py | 5 - src/parsetab.py | 22 +- src/ply/__init__.py | 5 + src/ply/cpp.py | 974 +++++++++++ src/ply/ctokens.py | 127 ++ src/ply/lex.py | 1099 +++++++++++++ src/ply/yacc.py | 3504 ++++++++++++++++++++++++++++++++++++++++ src/ply/ygen.py | 69 + src/semantics.py | 2 +- 16 files changed, 5883 insertions(+), 134 deletions(-) create mode 100644 src/ply/__init__.py create mode 100644 src/ply/cpp.py create mode 100644 src/ply/ctokens.py create mode 100644 src/ply/lex.py create mode 100644 src/ply/yacc.py create mode 100644 src/ply/ygen.py diff --git a/src/Readme.md b/src/Readme.md index 1200371b5..cdca282ec 100644 --- a/src/Readme.md +++ b/src/Readme.md @@ -1,78 +1,78 @@ -# COOL: Proyecto de Compilación - -La evaluación de la asignatura Complementos de Compilación, inscrita en el programa del 4to año de la Licenciatura en Ciencia de la Computación de la Facultad de Matemática y Computación de la -Universidad de La Habana, consiste este curso en la implementación de un compilador completamente -funcional para el lenguaje _COOL_. - -_COOL (Classroom Object-Oriented Language)_ es un pequeño lenguaje que puede ser implementado con un esfuerzo razonable en un semestre del curso. Aun así, _COOL_ mantiene muchas de las características de los lenguajes de programación modernos, incluyendo orientación a objetos, tipado estático y manejo automático de memoria. - -### Sobre el Lenguaje COOL - -Ud. podrá encontrar la especificación formal del lenguaje COOL en el documento _"COOL Language Reference Manual"_, que se distribuye junto con el presente texto. - -## Código Fuente - -### Compilando su proyecto - -Si es necesario compilar su proyecto, incluya todas las instrucciones necesarias en un archivo [`/src/makefile`](/src/makefile). -Durante la evaluación su proyecto se compilará ejecutando la siguiente secuencia: - -```bash -$ cd source -$ make clean -$ make -``` - -### Ejecutando su proyecto - -Incluya en un archivo [`/src/coolc.sh`](/src/coolc.sh) todas las instrucciones que hacen falta para lanzar su compilador. Recibirá como entrada un archivo con extensión `.cl` y debe generar como salida un archivo `.mips` cuyo nombre será el mismo que la entrada. - -Para lanzar el compilador, se ejecutará la siguiente instrucción: - -```bash -$ cd source -$ ./coolc.sh -``` - -### Sobre el Compilador de COOL - -El compilador de COOL se ejecutará como se ha definido anteriormente. -En caso de que no ocurran errores durante la operación del compilador, **coolc.sh** deberá terminar con código de salida 0, generar (o sobrescribir si ya existe) en la misma carpeta del archivo **.cl** procesado, y con el mismo nombre que éste, un archivo con extension **.mips** que pueda ser ejecutado con **spim**. Además, reportar a la salida estándar solamente lo siguiente: - - - - -En caso de que ocurran errores durante la operación del compilador, **coolc.sh** deberá terminar con código -de salida (exit code) 1 y reportar a la salida estándar (standard output stream) lo que sigue... - - - - _1 - ... - _n - -... donde `_i` tiene el siguiente formato: - - (,) - : - -Los campos `` y `` indican la ubicación del error en el fichero **.cl** procesado. En caso -de que la naturaleza del error sea tal que no pueda asociárselo a una línea y columna en el archivo de -código fuente, el valor de dichos campos debe ser 0. - -El campo `` será alguno entre: - -- `CompilerError`: se reporta al detectar alguna anomalía con la entrada del compilador. Por ejemplo, si el fichero a compilar no existe. -- `LexicographicError`: errores detectados por el lexer. -- `SyntacticError`: errores detectados por el parser. -- `NameError`: se reporta al referenciar un `identificador` en un ámbito en el que no es visible. -- `TypeError`: se reporta al detectar un problema de tipos. Incluye: - - incompatibilidad de tipos entre `rvalue` y `lvalue`, - - operación no definida entre objetos de ciertos tipos, y - - tipo referenciado pero no definido. -- `AttributeError`: se reporta cuando un atributo o método se referencia pero no está definido. -- `SemanticError`: cualquier otro error semántico. - -### Sobre la Implementación del Compilador de COOL - -El compilador debe estar implementado en `python`. Usted debe utilizar una herramienta generadora de analizadores -lexicográficos y sintácticos. Puede utilizar la que sea de su preferencia. +# COOL: Proyecto de Compilación + +La evaluación de la asignatura Complementos de Compilación, inscrita en el programa del 4to año de la Licenciatura en Ciencia de la Computación de la Facultad de Matemática y Computación de la +Universidad de La Habana, consiste este curso en la implementación de un compilador completamente +funcional para el lenguaje _COOL_. + +_COOL (Classroom Object-Oriented Language)_ es un pequeño lenguaje que puede ser implementado con un esfuerzo razonable en un semestre del curso. Aun así, _COOL_ mantiene muchas de las características de los lenguajes de programación modernos, incluyendo orientación a objetos, tipado estático y manejo automático de memoria. + +### Sobre el Lenguaje COOL + +Ud. podrá encontrar la especificación formal del lenguaje COOL en el documento _"COOL Language Reference Manual"_, que se distribuye junto con el presente texto. + +## Código Fuente + +### Compilando su proyecto + +Si es necesario compilar su proyecto, incluya todas las instrucciones necesarias en un archivo [`/src/makefile`](/src/makefile). +Durante la evaluación su proyecto se compilará ejecutando la siguiente secuencia: + +```bash +$ cd source +$ make clean +$ make +``` + +### Ejecutando su proyecto + +Incluya en un archivo [`/src/coolc.sh`](/src/coolc.sh) todas las instrucciones que hacen falta para lanzar su compilador. Recibirá como entrada un archivo con extensión `.cl` y debe generar como salida un archivo `.mips` cuyo nombre será el mismo que la entrada. + +Para lanzar el compilador, se ejecutará la siguiente instrucción: + +```bash +$ cd source +$ ./coolc.sh +``` + +### Sobre el Compilador de COOL + +El compilador de COOL se ejecutará como se ha definido anteriormente. +En caso de que no ocurran errores durante la operación del compilador, **coolc.sh** deberá terminar con código de salida 0, generar (o sobrescribir si ya existe) en la misma carpeta del archivo **.cl** procesado, y con el mismo nombre que éste, un archivo con extension **.mips** que pueda ser ejecutado con **spim**. Además, reportar a la salida estándar solamente lo siguiente: + + + + +En caso de que ocurran errores durante la operación del compilador, **coolc.sh** deberá terminar con código +de salida (exit code) 1 y reportar a la salida estándar (standard output stream) lo que sigue... + + + + _1 + ... + _n + +... donde `_i` tiene el siguiente formato: + + (,) - : + +Los campos `` y `` indican la ubicación del error en el fichero **.cl** procesado. En caso +de que la naturaleza del error sea tal que no pueda asociárselo a una línea y columna en el archivo de +código fuente, el valor de dichos campos debe ser 0. + +El campo `` será alguno entre: + +- `CompilerError`: se reporta al detectar alguna anomalía con la entrada del compilador. Por ejemplo, si el fichero a compilar no existe. +- `LexicographicError`: errores detectados por el lexer. +- `SyntacticError`: errores detectados por el parser. +- `NameError`: se reporta al referenciar un `identificador` en un ámbito en el que no es visible. +- `TypeError`: se reporta al detectar un problema de tipos. Incluye: + - incompatibilidad de tipos entre `rvalue` y `lvalue`, + - operación no definida entre objetos de ciertos tipos, y + - tipo referenciado pero no definido. +- `AttributeError`: se reporta cuando un atributo o método se referencia pero no está definido. +- `SemanticError`: cualquier otro error semántico. + +### Sobre la Implementación del Compilador de COOL + +El compilador debe estar implementado en `python`. Usted debe utilizar una herramienta generadora de analizadores +lexicográficos y sintácticos. Puede utilizar la que sea de su preferencia. diff --git a/src/check_semantics.py b/src/check_semantics.py index 13b934ca6..ad97f741e 100644 --- a/src/check_semantics.py +++ b/src/check_semantics.py @@ -160,6 +160,3 @@ def visit(self, node, scope): else: node.var_info = VarInfo("self", self.current_type) - @visitor.when(ast.NegationNode) - def visit(self, node, scope): - self.visit(node.expr, scope) diff --git a/src/check_types.py b/src/check_types.py index 2c1a8aaf4..607648df1 100644 --- a/src/check_types.py +++ b/src/check_types.py @@ -369,14 +369,4 @@ def visit(self, node): @visitor.when(ast.BooleanNode) def visit(self, node): node.type_expr = self.types.get_type("Bool") - return node.type_expr - - @visitor.when(ast.NegationNode) - def visit(self, node): - type_int = self.types.get_type("Int") - node.type_expr = type_int - expr = self.visit(node.expr) - if expr != type_int: - self.errors = True - print(TypeError(node.line, node.index, "Negation operator is only valid with Integers")) return node.type_expr \ No newline at end of file diff --git a/src/code_to_cil.py b/src/code_to_cil.py index b076c6c0c..fb07b7a24 100644 --- a/src/code_to_cil.py +++ b/src/code_to_cil.py @@ -483,15 +483,6 @@ def visit(self, node): def visit(self, node): return node.value - @visitor.when(ast.NegationNode) - def visit(self, node): - expr = self.visit(node.expr) - if not type(expr) == int: - var = self.register_local_var() - var.type = node.type_expr - self.instructions.append(cil.MinusNode(var, 0, expr)) - return var - return -expr class Type: def __init__(self, name, attrb, methods): diff --git a/src/cool_ast.py b/src/cool_ast.py index 247565583..18f15f866 100644 --- a/src/cool_ast.py +++ b/src/cool_ast.py @@ -237,5 +237,3 @@ def __init__(self, value, line, index): self.line = line self.index = index -class NegationNode(UnaryOperator): - pass diff --git a/src/coolc.sh b/src/coolc.sh index a802d1a5c..8001a7f0d 100755 --- a/src/coolc.sh +++ b/src/coolc.sh @@ -1,14 +1,14 @@ - -# Incluya aquí las instrucciones necesarias para ejecutar su compilador - -# INPUT_FILE=$1 -# OUTPUT_FILE=${INPUT_FILE:0: -2}mips - -# Si su compilador no lo hace ya, aquí puede imprimir la información de contacto -echo "COOL Compiler Version 1.0" # Recuerde cambiar estas -echo "Copyright (c) 2021 School of Math and Computer Science, University of Havana: Pablo A. Fuentes." # líneas a los valores correctos - -# Llamar al compilador -# echo "Compiling $INPUT_FILE into $OUTPUT_FILE" - -python3 main.py $@ \ No newline at end of file + +# Incluya aquí las instrucciones necesarias para ejecutar su compilador + + INPUT_FILE=$1 + OUTPUT_FILE=${INPUT_FILE:0: -2}mips + +# Si su compilador no lo hace ya, aquí puede imprimir la información de contacto +echo "COOL Compiler Version 1.0" # Recuerde cambiar estas +echo "Copyright (c) 2021 School of Math and Computer Science, University of Havana: Pablo A. Fuentes." # líneas a los valores correctos + +# Llamar al compilador +# echo "Compiling $INPUT_FILE into $OUTPUT_FILE" + +python3 main.py $INPUT_FILE \ No newline at end of file diff --git a/src/main.py b/src/main.py index a41b115bf..9569254fb 100644 --- a/src/main.py +++ b/src/main.py @@ -8,6 +8,8 @@ def main(): files = sys.argv[1:] + #files = ["C:\\Users\\PabloAdrianFuentes\\Desktop\\cool-compiler-2021-master2\\tests\\parser\\assignment2.cl"] + if len(files) == 0: print(CompilerError(0, 0, "No file is given to coolc compiler.")) return diff --git a/src/my_parser.py b/src/my_parser.py index afa3e1e5e..8474b1327 100644 --- a/src/my_parser.py +++ b/src/my_parser.py @@ -255,7 +255,6 @@ def p_term(self, parse): | num | str | bool - | negnum | LPAREN v_expr RPAREN''' if parse[1] == '(': parse[0] = parse[2] @@ -279,10 +278,6 @@ def p_bool(self, parse): | FALSE''' parse[0] = ast.BooleanNode(parse[1], parse.lineno(1), parse.lexpos(1)) - def p_negnum(self, parse): - '''negnum : MINUS term''' - parse[0] = ast.NegationNode(parse[2], parse.lineno(1), parse.lexpos(1)) - def p_empty(self, parse): '''empty :''' pass diff --git a/src/parsetab.py b/src/parsetab.py index 3e658ea35..bf7ae8c9d 100644 --- a/src/parsetab.py +++ b/src/parsetab.py @@ -6,9 +6,9 @@ _lr_method = 'LALR' -_lr_signature = 'rightASSIGNleftNOTnonassocLTLTEQEQleftPLUSMINUSleftMULTIPLYDIVIDErightISVOIDrightCOMPLEMENTleftATleftDOTACTION ASSIGN AT CASE CLASS COLON COMMA COMPLEMENT DIVIDE DOT ELSE EQ ESAC FALSE FI ID IF IN INHERITS INTEGER ISVOID LBRACE LET LOOP LPAREN LT LTEQ MINUS MULTIPLY NEW NOT OF PLUS POOL RBRACE RPAREN SEMICOLON STRING THEN TRUE TYPE WHILEprogram : class_expresion SEMICOLON class_listclass_list : class_expresion SEMICOLON class_list\n\t\t\t\t\t | emptyclass_expresion : CLASS TYPE LBRACE feature_list\n\t\t\t\t\t\t | CLASS TYPE INHERITS TYPE LBRACE feature_listfeature_list : method_decl feature_list\n\t\t\t\t\t\t| property_decl feature_list\n\t\t\t\t\t\t| RBRACEproperty_decl : declare_expresion SEMICOLONdeclare_expresion : ID COLON TYPE ASSIGN expr\n\t\t\t\t\t\t\t | ID COLON TYPEmethod_decl : ID LPAREN formal RPAREN COLON TYPE LBRACE expr RBRACE SEMICOLON formal : declare_method formal_a\n\t\t\t\t | empty formal_a : COMMA declare_method formal_a\n\t\t\t\t\t| emptydeclare_method : ID COLON TYPEexpr : assign_expresion\n\t\t\t\t| while_expresion\n\t\t\t\t| v_exprassign_expresion : ID ASSIGN exprwhile_expresion : WHILE v_expr LOOP expr POOLv_expr : conditional_expresion\n\t\t\t\t | let_expresion\n\t\t\t\t | case_expresion\n\t\t\t\t | dispatch_expresion\n\t\t\t\t | dispatch_instance\n\t\t\t\t | block_expresion\n\t\t\t\t | binary_operator\n\t\t\t\t | neg\n\t\t\t\t | compl\n\t\t\t\t | is_void\n\t\t\t\t | new_expresion\n\t\t\t\t | term\n\t\t\t\t | comparison_expresionconditional_expresion : IF v_expr THEN expr ELSE expr FIlet_expresion : LET let_declr_list IN exprlet_declr_list : declare_expresion let_declr_list_alet_declr_list_a : COMMA declare_expresion let_declr_list_a\n\t\t\t\t\t\t\t| emptycase_expresion : CASE expr OF case_list ESACcase_list : declare_method ACTION expr SEMICOLON case_list_acase_list_a : declare_method ACTION expr SEMICOLON case_list_a\n\t\t\t\t\t | emptydispatch_expresion : ID LPAREN dispatch_p_list RPAREN dispatch_p_list : v_expr dispatch_p_list_a\n\t\t\t\t\t\t | emptydispatch_p_list_a : COMMA v_expr dispatch_p_list_a\n\t\t\t\t\t\t\t | emptydispatch_instance : v_expr DOT ID LPAREN dispatch_p_list RPAREN\n\t\t\t\t\t\t\t | v_expr AT TYPE DOT ID LPAREN dispatch_p_list RPAREN block_expresion : LBRACE block_expr RBRACEblock_expr : expr SEMICOLON block_expr_ablock_expr_a : expr SEMICOLON block_expr_a\n\t\t\t\t\t\t| emptybinary_operator : v_expr PLUS v_expr\n\t\t\t\t\t\t | v_expr MINUS v_expr\n\t\t\t\t\t\t | v_expr MULTIPLY v_expr\n\t\t\t\t\t\t | v_expr DIVIDE v_exprneg : NOT exprcompl : COMPLEMENT expris_void : ISVOID exprnew_expresion : NEW TYPEcomparison_expresion : v_expr LT v_expr\n\t\t\t\t\t\t\t\t| v_expr LTEQ v_expr\n\t\t\t\t\t\t\t\t| v_expr EQ v_exprterm : var\n\t\t\t\t| num\n\t\t\t\t| str\n\t\t\t\t| bool\n\t\t\t\t| negnum\n\t\t\t\t| LPAREN v_expr RPARENvar : IDnum : INTEGERstr : STRINGbool : TRUE\n\t\t | FALSEnegnum : MINUS termempty :' +_lr_signature = 'rightASSIGNleftNOTnonassocLTLTEQEQleftPLUSMINUSleftMULTIPLYDIVIDErightISVOIDrightCOMPLEMENTleftATleftDOTACTION ASSIGN AT CASE CLASS COLON COMMA COMPLEMENT DIVIDE DOT ELSE EQ ESAC FALSE FI ID IF IN INHERITS INTEGER ISVOID LBRACE LET LOOP LPAREN LT LTEQ MINUS MULTIPLY NEW NOT OF PLUS POOL RBRACE RPAREN SEMICOLON STRING THEN TRUE TYPE WHILEprogram : class_expresion SEMICOLON class_listclass_list : class_expresion SEMICOLON class_list\n\t\t\t\t\t | emptyclass_expresion : CLASS TYPE LBRACE feature_list\n\t\t\t\t\t\t | CLASS TYPE INHERITS TYPE LBRACE feature_listfeature_list : method_decl feature_list\n\t\t\t\t\t\t| property_decl feature_list\n\t\t\t\t\t\t| RBRACEproperty_decl : declare_expresion SEMICOLONdeclare_expresion : ID COLON TYPE ASSIGN expr\n\t\t\t\t\t\t\t | ID COLON TYPEmethod_decl : ID LPAREN formal RPAREN COLON TYPE LBRACE expr RBRACE SEMICOLON formal : declare_method formal_a\n\t\t\t\t | empty formal_a : COMMA declare_method formal_a\n\t\t\t\t\t| emptydeclare_method : ID COLON TYPEexpr : assign_expresion\n\t\t\t\t| while_expresion\n\t\t\t\t| v_exprassign_expresion : ID ASSIGN exprwhile_expresion : WHILE v_expr LOOP expr POOLv_expr : conditional_expresion\n\t\t\t\t | let_expresion\n\t\t\t\t | case_expresion\n\t\t\t\t | dispatch_expresion\n\t\t\t\t | dispatch_instance\n\t\t\t\t | block_expresion\n\t\t\t\t | binary_operator\n\t\t\t\t | neg\n\t\t\t\t | compl\n\t\t\t\t | is_void\n\t\t\t\t | new_expresion\n\t\t\t\t | term\n\t\t\t\t | comparison_expresionconditional_expresion : IF v_expr THEN expr ELSE expr FIlet_expresion : LET let_declr_list IN exprlet_declr_list : declare_expresion let_declr_list_alet_declr_list_a : COMMA declare_expresion let_declr_list_a\n\t\t\t\t\t\t\t| emptycase_expresion : CASE expr OF case_list ESACcase_list : declare_method ACTION expr SEMICOLON case_list_acase_list_a : declare_method ACTION expr SEMICOLON case_list_a\n\t\t\t\t\t | emptydispatch_expresion : ID LPAREN dispatch_p_list RPAREN dispatch_p_list : v_expr dispatch_p_list_a\n\t\t\t\t\t\t | emptydispatch_p_list_a : COMMA v_expr dispatch_p_list_a\n\t\t\t\t\t\t\t | emptydispatch_instance : v_expr DOT ID LPAREN dispatch_p_list RPAREN\n\t\t\t\t\t\t\t | v_expr AT TYPE DOT ID LPAREN dispatch_p_list RPAREN block_expresion : LBRACE block_expr RBRACEblock_expr : expr SEMICOLON block_expr_ablock_expr_a : expr SEMICOLON block_expr_a\n\t\t\t\t\t\t| emptybinary_operator : v_expr PLUS v_expr\n\t\t\t\t\t\t | v_expr MINUS v_expr\n\t\t\t\t\t\t | v_expr MULTIPLY v_expr\n\t\t\t\t\t\t | v_expr DIVIDE v_exprneg : NOT exprcompl : COMPLEMENT expris_void : ISVOID exprnew_expresion : NEW TYPEcomparison_expresion : v_expr LT v_expr\n\t\t\t\t\t\t\t\t| v_expr LTEQ v_expr\n\t\t\t\t\t\t\t\t| v_expr EQ v_exprterm : var\n\t\t\t\t| num\n\t\t\t\t| str\n\t\t\t\t| bool\n\t\t\t\t| LPAREN v_expr RPARENvar : IDnum : INTEGERstr : STRINGbool : TRUE\n\t\t | FALSEempty :' -_lr_action_items = {'MINUS':([37,41,42,43,44,45,46,48,49,50,51,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,74,75,76,77,78,81,82,85,86,87,89,90,91,92,93,94,96,101,102,103,104,105,106,107,108,109,110,111,113,114,115,116,117,118,120,124,126,128,130,131,138,140,145,147,149,150,154,155,156,157,160,161,167,168,172,],[41,41,-31,-32,41,41,-68,-30,94,-23,-34,-27,41,-77,-35,-25,41,-19,-18,-24,-71,-76,41,-75,-28,-70,-73,41,-69,-29,-67,-74,41,-33,41,-26,-78,-73,94,-73,-63,41,41,41,41,41,41,41,-62,94,41,41,94,-60,-61,41,-52,41,41,94,94,-58,-59,94,-57,-56,41,41,94,-21,-72,41,-37,41,-45,41,-22,41,-41,41,94,41,-50,-36,-51,41,]),'NOT':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,]),'SEMICOLON':([3,10,13,14,15,19,20,30,31,42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,71,72,73,74,76,78,81,82,84,86,87,101,106,107,109,113,114,115,116,117,118,120,130,131,135,140,147,148,150,155,161,162,167,168,173,],[5,18,-4,21,-8,-7,-6,-11,-5,-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-10,-29,-67,-74,-33,-26,-78,-73,110,-73,-63,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,149,-37,-45,158,-22,-41,-50,166,-36,-51,174,]),'INHERITS':([4,],[7,]),'LET':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,]),'COMMA':([27,30,38,40,42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,71,72,73,74,76,78,81,82,86,87,97,101,106,107,109,113,114,115,116,117,118,120,128,130,131,139,140,147,150,155,157,161,167,168,],[34,-11,34,-17,-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-10,-29,-67,-74,-33,-26,-78,-73,-73,-63,123,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,145,-21,-72,123,-37,-45,-22,-41,145,-50,-36,-51,]),'$end':([1,5,8,9,18,25,],[0,-79,-3,-1,-79,-2,]),'FI':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,86,87,101,106,107,109,113,114,115,116,117,118,120,130,131,140,147,150,155,161,163,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,-73,-63,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,-37,-45,-22,-41,-50,167,-36,-51,]),'COMPLEMENT':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,]),'MULTIPLY':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,91,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,91,-73,-63,-62,91,91,-60,-61,-52,91,91,-58,-59,91,91,91,91,-21,-72,-37,-45,-22,-41,91,-50,-36,-51,]),'TRUE':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,]),'IF':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,]),'LBRACE':([4,17,37,44,45,54,58,64,69,75,77,80,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[6,24,44,44,44,44,44,44,44,44,44,108,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,]),'WHILE':([37,44,54,58,75,77,104,108,110,111,124,126,149,154,156,172,],[45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,]),'COLON':([16,29,35,99,],[23,36,39,23,]),'LTEQ':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,93,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,93,-73,-63,-62,93,93,-60,-61,-52,None,None,-58,-59,None,-57,-56,93,-21,-72,-37,-45,-22,-41,93,-50,-36,-51,]),'STRING':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,]),'NEW':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,]),'LPAREN':([16,37,41,44,45,54,58,64,68,69,75,77,86,89,90,91,92,93,94,96,103,104,108,110,111,119,124,126,138,145,149,151,154,156,160,172,],[22,69,69,69,69,69,69,69,103,69,69,69,103,69,69,69,69,69,69,69,69,69,69,69,69,138,69,69,69,69,69,160,69,69,69,69,]),'IN':([30,42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,71,72,73,74,76,78,81,82,86,87,97,98,101,106,107,109,113,114,115,116,117,118,120,121,122,130,131,139,140,147,150,153,155,161,167,168,],[-11,-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-10,-29,-67,-74,-33,-26,-78,-73,-73,-63,-79,124,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-40,-38,-21,-72,-79,-37,-45,-22,-39,-41,-50,-36,-51,]),'DOT':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,112,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,95,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,95,-73,-63,-62,95,95,-60,-61,-52,137,95,95,95,95,95,95,95,95,-21,-72,-37,-45,-22,-41,95,-50,-36,-51,]),'TYPE':([2,7,23,36,39,47,88,],[4,17,30,40,80,87,112,]),'ACTION':([40,141,170,],[-17,154,172,]),'ELSE':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,86,87,101,106,107,109,113,114,115,116,117,118,120,130,131,140,143,147,150,155,161,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,-73,-63,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,-37,156,-45,-22,-41,-50,-36,-51,]),'ASSIGN':([30,68,],[37,104,]),'ISVOID':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,]),'OF':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,86,87,100,101,106,107,109,113,114,115,116,117,118,120,130,131,140,147,150,155,161,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,-73,-63,125,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,-37,-45,-22,-41,-50,-36,-51,]),'ESAC':([142,166,169,171,174,175,],[155,-79,-44,-42,-79,-43,]),'THEN':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,86,87,101,102,106,107,109,113,114,115,116,117,118,120,130,131,140,147,150,155,161,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,-73,-63,-62,126,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,-37,-45,-22,-41,-50,-36,-51,]),'RPAREN':([22,26,27,28,32,33,38,40,42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,79,81,82,86,87,101,103,105,106,107,109,113,114,115,116,117,118,120,127,128,129,130,131,138,140,144,146,147,150,152,155,157,160,161,164,165,167,168,],[-79,-14,-79,35,-13,-16,-79,-17,-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-15,-78,-73,-73,-63,-62,-79,131,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-47,-79,147,-21,-72,-79,-37,-49,-46,-45,-22,161,-41,-79,-79,-50,-48,168,-36,-51,]),'DIVIDE':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,92,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,92,-73,-63,-62,92,92,-60,-61,-52,92,92,-58,-59,92,92,92,92,-21,-72,-37,-45,-22,-41,92,-50,-36,-51,]),'EQ':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,89,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,89,-73,-63,-62,89,89,-60,-61,-52,None,None,-58,-59,None,-57,-56,89,-21,-72,-37,-45,-22,-41,89,-50,-36,-51,]),'LT':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,90,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,90,-73,-63,-62,90,90,-60,-61,-52,None,None,-58,-59,None,-57,-56,90,-21,-72,-37,-45,-22,-41,90,-50,-36,-51,]),'LOOP':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,106,107,109,113,114,115,116,117,118,120,130,131,140,147,150,155,161,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,111,-73,-63,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,-37,-45,-22,-41,-50,-36,-51,]),'ID':([6,11,12,21,22,24,34,37,41,44,45,52,54,58,64,69,75,77,89,90,91,92,93,94,95,96,103,104,108,110,111,123,124,125,126,137,138,145,149,154,156,158,160,166,172,174,],[16,16,16,-9,29,16,29,68,82,68,86,99,68,68,86,86,68,68,86,86,86,86,86,86,119,86,86,68,68,68,68,99,68,29,68,151,86,86,68,68,68,-12,86,29,68,29,]),'POOL':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,86,87,101,106,107,109,113,114,115,116,117,118,120,130,131,136,140,147,150,155,161,167,168,],[-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,-73,-63,-62,-60,-61,-52,-66,-64,-58,-59,-65,-57,-56,-21,-72,150,-37,-45,-22,-41,-50,-36,-51,]),'PLUS':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,96,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,96,-73,-63,-62,96,96,-60,-61,-52,96,96,-58,-59,96,-57,-56,96,-21,-72,-37,-45,-22,-41,96,-50,-36,-51,]),'INTEGER':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,]),'CASE':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,]),'FALSE':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,]),'CLASS':([0,5,18,],[2,2,2,]),'AT':([42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,85,86,87,101,102,105,106,107,109,113,114,115,116,117,118,120,128,130,131,140,147,150,155,157,161,167,168,],[-31,-32,-68,-30,88,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,88,-73,-63,-62,88,88,-60,-61,-52,88,88,88,88,88,88,88,88,-21,-72,-37,-45,-22,-41,88,-50,-36,-51,]),'RBRACE':([6,11,12,21,24,42,43,46,48,49,50,51,53,55,56,57,59,60,61,62,63,65,66,67,68,70,72,73,74,76,78,81,82,83,86,87,101,106,107,109,110,113,114,115,116,117,118,120,130,131,132,133,134,140,147,149,150,155,158,159,161,167,168,],[15,15,15,-9,15,-31,-32,-68,-30,-20,-23,-34,-27,-77,-35,-25,-19,-18,-24,-71,-76,-75,-28,-70,-73,-69,-29,-67,-74,-33,-26,-78,-73,109,-73,-63,-62,-60,-61,-52,-79,-66,-64,-58,-59,-65,-57,-56,-21,-72,148,-55,-53,-37,-45,-79,-22,-41,-12,-54,-50,-36,-51,]),} +_lr_action_items = {'DOT':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,86,87,98,101,102,103,106,112,113,114,115,116,118,119,120,124,125,126,132,139,150,152,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,93,-75,-72,-35,-76,-26,-74,-29,-61,-62,93,-72,-60,93,-63,93,-52,135,93,93,93,93,93,93,93,93,-21,-71,-37,-45,-41,93,-22,-50,-36,-51,]),'EQ':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,86,87,98,101,102,103,106,113,114,115,116,118,119,120,124,125,126,132,139,150,152,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,95,-75,-72,-35,-76,-26,-74,-29,-61,-62,95,-72,-60,95,-63,95,-52,-59,None,-57,None,-56,None,-58,95,-21,-71,-37,-45,-41,95,-22,-50,-36,-51,]),'TYPE':([1,6,23,33,38,71,88,],[4,11,31,39,77,102,112,]),'LBRACE':([4,11,37,46,50,55,60,64,66,70,75,77,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[7,19,46,46,46,46,46,46,46,46,46,104,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,]),'COLON':([14,29,32,85,],[23,33,38,23,]),'LT':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,86,87,98,101,102,103,106,113,114,115,116,118,119,120,124,125,126,132,139,150,152,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,90,-75,-72,-35,-76,-26,-74,-29,-61,-62,90,-72,-60,90,-63,90,-52,-59,None,-57,None,-56,None,-58,90,-21,-71,-37,-45,-41,90,-22,-50,-36,-51,]),'AT':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,86,87,98,101,102,103,106,113,114,115,116,118,119,120,124,125,126,132,139,150,152,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,88,-75,-72,-35,-76,-26,-74,-29,-61,-62,88,-72,-60,88,-63,88,-52,88,88,88,88,88,88,88,88,-21,-71,-37,-45,-41,88,-22,-50,-36,-51,]),'ACTION':([39,138,167,],[-17,151,168,]),'CASE':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,]),'THEN':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,86,87,98,102,106,113,114,115,116,118,119,120,125,126,132,139,150,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,-20,-75,-72,-35,-76,-26,-74,-29,-61,-62,111,-72,-60,-63,-52,-59,-64,-57,-65,-56,-66,-58,-21,-71,-37,-45,-41,-22,-50,-36,-51,]),'POOL':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,87,98,102,106,113,114,115,116,118,119,120,125,126,132,139,143,150,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,-20,-75,-72,-35,-76,-26,-74,-29,-61,-62,-72,-60,-63,-52,-59,-64,-57,-65,-56,-66,-58,-21,-71,-37,-45,153,-41,-22,-50,-36,-51,]),'IN':([31,41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,67,68,69,72,73,74,76,81,82,83,84,87,98,102,106,108,109,113,114,115,116,118,119,120,125,126,132,133,139,146,150,153,158,161,164,],[-11,-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,-20,-75,-10,-72,-35,-76,-26,-74,-29,-61,-62,107,-77,-72,-60,-63,-52,-38,-40,-59,-64,-57,-65,-56,-66,-58,-21,-71,-37,-77,-45,-39,-41,-22,-50,-36,-51,]),'ELSE':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,87,98,102,106,113,114,115,116,118,119,120,125,126,132,134,139,150,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,-20,-75,-72,-35,-76,-26,-74,-29,-61,-62,-72,-60,-63,-52,-59,-64,-57,-65,-56,-66,-58,-21,-71,-37,147,-45,-41,-22,-50,-36,-51,]),'TRUE':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,]),'RBRACE':([7,12,17,19,21,41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,80,81,82,87,98,102,105,106,113,114,115,116,118,119,120,125,126,128,129,130,132,139,145,150,153,154,155,158,161,164,],[15,15,15,15,-9,-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,-20,-75,-72,-35,-76,-26,-74,-29,106,-61,-62,-72,-60,-63,-77,-52,-59,-64,-57,-65,-56,-66,-58,-21,-71,144,-53,-55,-37,-45,-77,-41,-22,-12,-54,-50,-36,-51,]),'NOT':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,]),'RPAREN':([22,27,28,30,34,35,39,40,41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,78,81,82,87,98,99,101,102,106,113,114,115,116,118,119,120,122,123,124,125,126,132,136,139,141,142,149,150,152,153,157,158,160,161,162,164,],[-77,-14,32,-77,-13,-16,-17,-77,-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,-20,-75,-72,-35,-76,-26,-74,-29,-15,-61,-62,-72,-60,-77,126,-63,-52,-59,-64,-57,-65,-56,-66,-58,139,-47,-77,-21,-71,-37,-77,-45,-46,-49,158,-41,-77,-22,-77,-50,-48,-36,164,-51,]),'ID':([7,12,17,19,21,22,36,37,46,50,55,58,60,64,66,70,75,89,90,91,92,93,94,95,96,99,100,104,105,107,110,111,121,127,135,136,140,145,147,151,154,157,163,168,170,],[14,14,14,14,-9,29,29,68,68,68,68,85,87,68,68,87,87,87,87,87,87,117,87,87,87,87,68,68,68,68,85,68,29,68,148,87,87,68,68,68,-12,87,29,68,29,]),'LOOP':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,87,98,102,103,106,113,114,115,116,118,119,120,125,126,132,139,150,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,-20,-75,-72,-35,-76,-26,-74,-29,-61,-62,-72,-60,-63,127,-52,-59,-64,-57,-65,-56,-66,-58,-21,-71,-37,-45,-41,-22,-50,-36,-51,]),'COMPLEMENT':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,]),'IF':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,]),'LPAREN':([14,37,46,50,55,60,64,66,68,70,75,87,89,90,91,92,94,95,96,99,100,104,105,107,111,117,127,136,140,145,147,148,151,157,168,],[22,70,70,70,70,70,70,70,99,70,70,99,70,70,70,70,70,70,70,70,70,70,70,70,70,136,70,70,70,70,70,157,70,70,70,]),'INTEGER':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,]),'COMMA':([30,31,39,40,41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,67,68,69,72,73,74,76,81,82,84,87,98,102,106,113,114,115,116,118,119,120,124,125,126,132,133,139,150,152,153,158,161,164,],[36,-11,-17,36,-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,-20,-75,-10,-72,-35,-76,-26,-74,-29,-61,-62,110,-72,-60,-63,-52,-59,-64,-57,-65,-56,-66,-58,140,-21,-71,-37,110,-45,-41,140,-22,-50,-36,-51,]),'NEW':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,]),'MULTIPLY':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,86,87,98,101,102,103,106,113,114,115,116,118,119,120,124,125,126,132,139,150,152,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,96,-75,-72,-35,-76,-26,-74,-29,-61,-62,96,-72,-60,96,-63,96,-52,-59,96,96,96,96,96,-58,96,-21,-71,-37,-45,-41,96,-22,-50,-36,-51,]),'$end':([3,5,9,10,18,25,],[0,-77,-1,-3,-77,-2,]),'FALSE':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,]),'MINUS':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,86,87,98,101,102,103,106,113,114,115,116,118,119,120,124,125,126,132,139,150,152,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,91,-75,-72,-35,-76,-26,-74,-29,-61,-62,91,-72,-60,91,-63,91,-52,-59,91,-57,91,-56,91,-58,91,-21,-71,-37,-45,-41,91,-22,-50,-36,-51,]),'LTEQ':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,86,87,98,101,102,103,106,113,114,115,116,118,119,120,124,125,126,132,139,150,152,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,92,-75,-72,-35,-76,-26,-74,-29,-61,-62,92,-72,-60,92,-63,92,-52,-59,None,-57,None,-56,None,-58,92,-21,-71,-37,-45,-41,92,-22,-50,-36,-51,]),'SEMICOLON':([2,8,13,15,16,20,24,26,31,41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,67,68,69,72,73,74,76,79,81,82,87,98,102,106,113,114,115,116,118,119,120,125,126,131,132,139,144,150,153,158,159,161,164,169,],[5,18,21,-8,-4,-7,-6,-5,-11,-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,-20,-75,-10,-72,-35,-76,-26,-74,-29,105,-61,-62,-72,-60,-63,-52,-59,-64,-57,-65,-56,-66,-58,-21,-71,145,-37,-45,154,-41,-22,-50,163,-36,-51,170,]),'ISVOID':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,]),'STRING':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,]),'CLASS':([0,5,18,],[1,1,1,]),'OF':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,87,97,98,102,106,113,114,115,116,118,119,120,125,126,132,139,150,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,-20,-75,-72,-35,-76,-26,-74,-29,-61,-62,-72,121,-60,-63,-52,-59,-64,-57,-65,-56,-66,-58,-21,-71,-37,-45,-41,-22,-50,-36,-51,]),'ESAC':([137,163,165,166,170,171,],[150,-77,-44,-42,-77,-43,]),'LET':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,]),'WHILE':([37,46,50,55,64,66,100,104,105,107,111,127,145,147,151,168,],[75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,75,]),'DIVIDE':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,86,87,98,101,102,103,106,113,114,115,116,118,119,120,124,125,126,132,139,150,152,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,89,-75,-72,-35,-76,-26,-74,-29,-61,-62,89,-72,-60,89,-63,89,-52,-59,89,89,89,89,89,-58,89,-21,-71,-37,-45,-41,89,-22,-50,-36,-51,]),'ASSIGN':([31,68,],[37,100,]),'INHERITS':([4,],[6,]),'FI':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,87,98,102,106,113,114,115,116,118,119,120,125,126,132,139,150,153,156,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,-20,-75,-72,-35,-76,-26,-74,-29,-61,-62,-72,-60,-63,-52,-59,-64,-57,-65,-56,-66,-58,-21,-71,-37,-45,-41,-22,161,-50,-36,-51,]),'PLUS':([41,42,43,44,45,47,48,49,51,52,53,54,56,57,59,61,62,63,65,68,69,72,73,74,76,81,82,86,87,98,101,102,103,106,113,114,115,116,118,119,120,124,125,126,132,139,150,152,153,158,161,164,],[-19,-70,-68,-32,-33,-67,-18,-31,-28,-73,-69,-25,-34,-27,-24,-23,-30,94,-75,-72,-35,-76,-26,-74,-29,-61,-62,94,-72,-60,94,-63,94,-52,-59,94,-57,94,-56,94,-58,94,-21,-71,-37,-45,-41,94,-22,-50,-36,-51,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): @@ -17,7 +17,7 @@ _lr_action[_x][_k] = _y del _lr_action_items -_lr_goto_items = {'formal_a':([27,38,],[32,79,]),'empty':([5,18,22,27,38,97,103,110,128,138,139,149,157,160,166,174,],[8,8,26,33,33,121,127,133,144,127,121,133,144,127,169,169,]),'declare_method':([22,34,125,166,174,],[27,38,141,170,170,]),'while_expresion':([37,44,54,58,75,77,104,108,110,111,124,126,149,154,156,172,],[59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,]),'compl':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,]),'dispatch_instance':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,]),'declare_expresion':([6,11,12,24,52,123,],[14,14,14,14,97,139,]),'block_expr_a':([110,149,],[134,159,]),'let_declr_list_a':([97,139,],[122,153,]),'program':([0,],[1,]),'let_declr_list':([52,],[98,]),'new_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,]),'formal':([22,],[28,]),'term':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[51,81,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,]),'block_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,]),'num':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,]),'let_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,]),'method_decl':([6,11,12,24,],[12,12,12,12,]),'dispatch_p_list':([103,138,160,],[129,152,165,]),'neg':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,]),'class_expresion':([0,5,18,],[3,10,10,]),'negnum':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,]),'property_decl':([6,11,12,24,],[11,11,11,11,]),'conditional_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,]),'block_expr':([44,],[83,]),'case_list_a':([166,174,],[171,175,]),'bool':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,]),'expr':([37,44,54,58,75,77,104,108,110,111,124,126,149,154,156,172,],[71,84,100,101,106,107,130,132,135,136,140,143,135,162,163,173,]),'binary_operator':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,]),'class_list':([5,18,],[9,25,]),'feature_list':([6,11,12,24,],[13,19,20,31,]),'assign_expresion':([37,44,54,58,75,77,104,108,110,111,124,126,149,154,156,172,],[60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,]),'str':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,]),'dispatch_p_list_a':([128,157,],[146,164,]),'var':([37,41,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,]),'is_void':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,]),'comparison_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,]),'case_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,]),'v_expr':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[49,49,85,49,49,102,105,49,49,113,114,115,116,117,118,120,128,49,49,49,49,49,49,128,157,49,49,49,128,49,]),'dispatch_expresion':([37,44,45,54,58,64,69,75,77,89,90,91,92,93,94,96,103,104,108,110,111,124,126,138,145,149,154,156,160,172,],[78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,78,]),'case_list':([125,],[142,]),} +_lr_goto_items = {'conditional_expresion':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,]),'property_decl':([7,12,17,19,],[12,12,12,12,]),'class_expresion':([0,5,18,],[2,8,8,]),'block_expresion':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,]),'declare_expresion':([7,12,17,19,58,110,],[13,13,13,13,84,133,]),'num':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,]),'dispatch_p_list_a':([124,152,],[141,160,]),'case_list_a':([163,170,],[166,171,]),'v_expr':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[63,63,63,63,86,63,63,101,103,113,114,115,116,118,119,120,124,63,63,63,63,63,63,124,152,63,63,63,124,63,]),'case_list':([121,],[137,]),'is_void':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,]),'new_expresion':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,]),'let_declr_list_a':([84,133,],[108,146,]),'block_expr':([46,],[80,]),'while_expresion':([37,46,50,55,64,66,100,104,105,107,111,127,145,147,151,168,],[41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,]),'formal_a':([30,40,],[34,78,]),'feature_list':([7,12,17,19,],[16,20,24,26,]),'var':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,]),'expr':([37,46,50,55,64,66,100,104,105,107,111,127,145,147,151,168,],[67,79,81,82,97,98,125,128,131,132,134,143,131,156,159,169,]),'let_declr_list':([58,],[83,]),'compl':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,]),'neg':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,]),'empty':([5,18,22,30,40,84,99,105,124,133,136,145,152,157,163,170,],[10,10,27,35,35,109,123,130,142,109,123,130,142,123,165,165,]),'comparison_expresion':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,]),'program':([0,],[3,]),'term':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,]),'str':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,]),'case_expresion':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,]),'bool':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,]),'assign_expresion':([37,46,50,55,64,66,100,104,105,107,111,127,145,147,151,168,],[48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,]),'dispatch_expresion':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,]),'block_expr_a':([105,145,],[129,155,]),'dispatch_instance':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,]),'class_list':([5,18,],[9,25,]),'let_expresion':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,]),'binary_operator':([37,46,50,55,60,64,66,70,75,89,90,91,92,94,95,96,99,100,104,105,107,111,127,136,140,145,147,151,157,168,],[76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,76,]),'dispatch_p_list':([99,136,157,],[122,149,162,]),'formal':([22,],[28,]),'declare_method':([22,36,121,163,170,],[30,40,138,167,167,]),'method_decl':([7,12,17,19,],[17,17,17,17,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): @@ -97,13 +97,11 @@ ('term -> num','term',1,'p_term','my_parser.py',255), ('term -> str','term',1,'p_term','my_parser.py',256), ('term -> bool','term',1,'p_term','my_parser.py',257), - ('term -> negnum','term',1,'p_term','my_parser.py',258), - ('term -> LPAREN v_expr RPAREN','term',3,'p_term','my_parser.py',259), - ('var -> ID','var',1,'p_var','my_parser.py',266), - ('num -> INTEGER','num',1,'p_num','my_parser.py',270), - ('str -> STRING','str',1,'p_str','my_parser.py',274), - ('bool -> TRUE','bool',1,'p_bool','my_parser.py',278), - ('bool -> FALSE','bool',1,'p_bool','my_parser.py',279), - ('negnum -> MINUS term','negnum',2,'p_negnum','my_parser.py',283), - ('empty -> ','empty',0,'p_empty','my_parser.py',287), + ('term -> LPAREN v_expr RPAREN','term',3,'p_term','my_parser.py',258), + ('var -> ID','var',1,'p_var','my_parser.py',265), + ('num -> INTEGER','num',1,'p_num','my_parser.py',269), + ('str -> STRING','str',1,'p_str','my_parser.py',273), + ('bool -> TRUE','bool',1,'p_bool','my_parser.py',277), + ('bool -> FALSE','bool',1,'p_bool','my_parser.py',278), + ('empty -> ','empty',0,'p_empty','my_parser.py',282), ] diff --git a/src/ply/__init__.py b/src/ply/__init__.py new file mode 100644 index 000000000..23707c635 --- /dev/null +++ b/src/ply/__init__.py @@ -0,0 +1,5 @@ +# PLY package +# Author: David Beazley (dave@dabeaz.com) + +__version__ = '3.11' +__all__ = ['lex','yacc'] diff --git a/src/ply/cpp.py b/src/ply/cpp.py new file mode 100644 index 000000000..50a44a18e --- /dev/null +++ b/src/ply/cpp.py @@ -0,0 +1,974 @@ +# ----------------------------------------------------------------------------- +# ply: cpp.py +# +# Copyright (C) 2001-2019 +# David M. Beazley (Dabeaz LLC) +# All rights reserved. +# +# Latest version: https://github.com/dabeaz/ply +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# * Neither the name of David Beazley or Dabeaz LLC may be used to +# endorse or promote products derived from this software without +# specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# ----------------------------------------------------------------------------- + +# This module implements an ANSI-C style lexical preprocessor for PLY. +# ----------------------------------------------------------------------------- +from __future__ import generators + +import sys + +# Some Python 3 compatibility shims +if sys.version_info.major < 3: + STRING_TYPES = (str, unicode) +else: + STRING_TYPES = str + xrange = range + +# ----------------------------------------------------------------------------- +# Default preprocessor lexer definitions. These tokens are enough to get +# a basic preprocessor working. Other modules may import these if they want +# ----------------------------------------------------------------------------- + +tokens = ( + 'CPP_ID','CPP_INTEGER', 'CPP_FLOAT', 'CPP_STRING', 'CPP_CHAR', 'CPP_WS', 'CPP_COMMENT1', 'CPP_COMMENT2', 'CPP_POUND','CPP_DPOUND' +) + +literals = "+-*/%|&~^<>=!?()[]{}.,;:\\\'\"" + +# Whitespace +def t_CPP_WS(t): + r'\s+' + t.lexer.lineno += t.value.count("\n") + return t + +t_CPP_POUND = r'\#' +t_CPP_DPOUND = r'\#\#' + +# Identifier +t_CPP_ID = r'[A-Za-z_][\w_]*' + +# Integer literal +def CPP_INTEGER(t): + r'(((((0x)|(0X))[0-9a-fA-F]+)|(\d+))([uU][lL]|[lL][uU]|[uU]|[lL])?)' + return t + +t_CPP_INTEGER = CPP_INTEGER + +# Floating literal +t_CPP_FLOAT = r'((\d+)(\.\d+)(e(\+|-)?(\d+))? | (\d+)e(\+|-)?(\d+))([lL]|[fF])?' + +# String literal +def t_CPP_STRING(t): + r'\"([^\\\n]|(\\(.|\n)))*?\"' + t.lexer.lineno += t.value.count("\n") + return t + +# Character constant 'c' or L'c' +def t_CPP_CHAR(t): + r'(L)?\'([^\\\n]|(\\(.|\n)))*?\'' + t.lexer.lineno += t.value.count("\n") + return t + +# Comment +def t_CPP_COMMENT1(t): + r'(/\*(.|\n)*?\*/)' + ncr = t.value.count("\n") + t.lexer.lineno += ncr + # replace with one space or a number of '\n' + t.type = 'CPP_WS'; t.value = '\n' * ncr if ncr else ' ' + return t + +# Line comment +def t_CPP_COMMENT2(t): + r'(//.*?(\n|$))' + # replace with '/n' + t.type = 'CPP_WS'; t.value = '\n' + return t + +def t_error(t): + t.type = t.value[0] + t.value = t.value[0] + t.lexer.skip(1) + return t + +import re +import copy +import time +import os.path + +# ----------------------------------------------------------------------------- +# trigraph() +# +# Given an input string, this function replaces all trigraph sequences. +# The following mapping is used: +# +# ??= # +# ??/ \ +# ??' ^ +# ??( [ +# ??) ] +# ??! | +# ??< { +# ??> } +# ??- ~ +# ----------------------------------------------------------------------------- + +_trigraph_pat = re.compile(r'''\?\?[=/\'\(\)\!<>\-]''') +_trigraph_rep = { + '=':'#', + '/':'\\', + "'":'^', + '(':'[', + ')':']', + '!':'|', + '<':'{', + '>':'}', + '-':'~' +} + +def trigraph(input): + return _trigraph_pat.sub(lambda g: _trigraph_rep[g.group()[-1]],input) + +# ------------------------------------------------------------------ +# Macro object +# +# This object holds information about preprocessor macros +# +# .name - Macro name (string) +# .value - Macro value (a list of tokens) +# .arglist - List of argument names +# .variadic - Boolean indicating whether or not variadic macro +# .vararg - Name of the variadic parameter +# +# When a macro is created, the macro replacement token sequence is +# pre-scanned and used to create patch lists that are later used +# during macro expansion +# ------------------------------------------------------------------ + +class Macro(object): + def __init__(self,name,value,arglist=None,variadic=False): + self.name = name + self.value = value + self.arglist = arglist + self.variadic = variadic + if variadic: + self.vararg = arglist[-1] + self.source = None + +# ------------------------------------------------------------------ +# Preprocessor object +# +# Object representing a preprocessor. Contains macro definitions, +# include directories, and other information +# ------------------------------------------------------------------ + +class Preprocessor(object): + def __init__(self,lexer=None): + if lexer is None: + lexer = lex.lexer + self.lexer = lexer + self.macros = { } + self.path = [] + self.temp_path = [] + + # Probe the lexer for selected tokens + self.lexprobe() + + tm = time.localtime() + self.define("__DATE__ \"%s\"" % time.strftime("%b %d %Y",tm)) + self.define("__TIME__ \"%s\"" % time.strftime("%H:%M:%S",tm)) + self.parser = None + + # ----------------------------------------------------------------------------- + # tokenize() + # + # Utility function. Given a string of text, tokenize into a list of tokens + # ----------------------------------------------------------------------------- + + def tokenize(self,text): + tokens = [] + self.lexer.input(text) + while True: + tok = self.lexer.token() + if not tok: break + tokens.append(tok) + return tokens + + # --------------------------------------------------------------------- + # error() + # + # Report a preprocessor error/warning of some kind + # ---------------------------------------------------------------------- + + def error(self,file,line,msg): + print("%s:%d %s" % (file,line,msg)) + + # ---------------------------------------------------------------------- + # lexprobe() + # + # This method probes the preprocessor lexer object to discover + # the token types of symbols that are important to the preprocessor. + # If this works right, the preprocessor will simply "work" + # with any suitable lexer regardless of how tokens have been named. + # ---------------------------------------------------------------------- + + def lexprobe(self): + + # Determine the token type for identifiers + self.lexer.input("identifier") + tok = self.lexer.token() + if not tok or tok.value != "identifier": + print("Couldn't determine identifier type") + else: + self.t_ID = tok.type + + # Determine the token type for integers + self.lexer.input("12345") + tok = self.lexer.token() + if not tok or int(tok.value) != 12345: + print("Couldn't determine integer type") + else: + self.t_INTEGER = tok.type + self.t_INTEGER_TYPE = type(tok.value) + + # Determine the token type for strings enclosed in double quotes + self.lexer.input("\"filename\"") + tok = self.lexer.token() + if not tok or tok.value != "\"filename\"": + print("Couldn't determine string type") + else: + self.t_STRING = tok.type + + # Determine the token type for whitespace--if any + self.lexer.input(" ") + tok = self.lexer.token() + if not tok or tok.value != " ": + self.t_SPACE = None + else: + self.t_SPACE = tok.type + + # Determine the token type for newlines + self.lexer.input("\n") + tok = self.lexer.token() + if not tok or tok.value != "\n": + self.t_NEWLINE = None + print("Couldn't determine token for newlines") + else: + self.t_NEWLINE = tok.type + + self.t_WS = (self.t_SPACE, self.t_NEWLINE) + + # Check for other characters used by the preprocessor + chars = [ '<','>','#','##','\\','(',')',',','.'] + for c in chars: + self.lexer.input(c) + tok = self.lexer.token() + if not tok or tok.value != c: + print("Unable to lex '%s' required for preprocessor" % c) + + # ---------------------------------------------------------------------- + # add_path() + # + # Adds a search path to the preprocessor. + # ---------------------------------------------------------------------- + + def add_path(self,path): + self.path.append(path) + + # ---------------------------------------------------------------------- + # group_lines() + # + # Given an input string, this function splits it into lines. Trailing whitespace + # is removed. Any line ending with \ is grouped with the next line. This + # function forms the lowest level of the preprocessor---grouping into text into + # a line-by-line format. + # ---------------------------------------------------------------------- + + def group_lines(self,input): + lex = self.lexer.clone() + lines = [x.rstrip() for x in input.splitlines()] + for i in xrange(len(lines)): + j = i+1 + while lines[i].endswith('\\') and (j < len(lines)): + lines[i] = lines[i][:-1]+lines[j] + lines[j] = "" + j += 1 + + input = "\n".join(lines) + lex.input(input) + lex.lineno = 1 + + current_line = [] + while True: + tok = lex.token() + if not tok: + break + current_line.append(tok) + if tok.type in self.t_WS and '\n' in tok.value: + yield current_line + current_line = [] + + if current_line: + yield current_line + + # ---------------------------------------------------------------------- + # tokenstrip() + # + # Remove leading/trailing whitespace tokens from a token list + # ---------------------------------------------------------------------- + + def tokenstrip(self,tokens): + i = 0 + while i < len(tokens) and tokens[i].type in self.t_WS: + i += 1 + del tokens[:i] + i = len(tokens)-1 + while i >= 0 and tokens[i].type in self.t_WS: + i -= 1 + del tokens[i+1:] + return tokens + + + # ---------------------------------------------------------------------- + # collect_args() + # + # Collects comma separated arguments from a list of tokens. The arguments + # must be enclosed in parenthesis. Returns a tuple (tokencount,args,positions) + # where tokencount is the number of tokens consumed, args is a list of arguments, + # and positions is a list of integers containing the starting index of each + # argument. Each argument is represented by a list of tokens. + # + # When collecting arguments, leading and trailing whitespace is removed + # from each argument. + # + # This function properly handles nested parenthesis and commas---these do not + # define new arguments. + # ---------------------------------------------------------------------- + + def collect_args(self,tokenlist): + args = [] + positions = [] + current_arg = [] + nesting = 1 + tokenlen = len(tokenlist) + + # Search for the opening '('. + i = 0 + while (i < tokenlen) and (tokenlist[i].type in self.t_WS): + i += 1 + + if (i < tokenlen) and (tokenlist[i].value == '('): + positions.append(i+1) + else: + self.error(self.source,tokenlist[0].lineno,"Missing '(' in macro arguments") + return 0, [], [] + + i += 1 + + while i < tokenlen: + t = tokenlist[i] + if t.value == '(': + current_arg.append(t) + nesting += 1 + elif t.value == ')': + nesting -= 1 + if nesting == 0: + if current_arg: + args.append(self.tokenstrip(current_arg)) + positions.append(i) + return i+1,args,positions + current_arg.append(t) + elif t.value == ',' and nesting == 1: + args.append(self.tokenstrip(current_arg)) + positions.append(i+1) + current_arg = [] + else: + current_arg.append(t) + i += 1 + + # Missing end argument + self.error(self.source,tokenlist[-1].lineno,"Missing ')' in macro arguments") + return 0, [],[] + + # ---------------------------------------------------------------------- + # macro_prescan() + # + # Examine the macro value (token sequence) and identify patch points + # This is used to speed up macro expansion later on---we'll know + # right away where to apply patches to the value to form the expansion + # ---------------------------------------------------------------------- + + def macro_prescan(self,macro): + macro.patch = [] # Standard macro arguments + macro.str_patch = [] # String conversion expansion + macro.var_comma_patch = [] # Variadic macro comma patch + i = 0 + while i < len(macro.value): + if macro.value[i].type == self.t_ID and macro.value[i].value in macro.arglist: + argnum = macro.arglist.index(macro.value[i].value) + # Conversion of argument to a string + if i > 0 and macro.value[i-1].value == '#': + macro.value[i] = copy.copy(macro.value[i]) + macro.value[i].type = self.t_STRING + del macro.value[i-1] + macro.str_patch.append((argnum,i-1)) + continue + # Concatenation + elif (i > 0 and macro.value[i-1].value == '##'): + macro.patch.append(('c',argnum,i-1)) + del macro.value[i-1] + i -= 1 + continue + elif ((i+1) < len(macro.value) and macro.value[i+1].value == '##'): + macro.patch.append(('c',argnum,i)) + del macro.value[i + 1] + continue + # Standard expansion + else: + macro.patch.append(('e',argnum,i)) + elif macro.value[i].value == '##': + if macro.variadic and (i > 0) and (macro.value[i-1].value == ',') and \ + ((i+1) < len(macro.value)) and (macro.value[i+1].type == self.t_ID) and \ + (macro.value[i+1].value == macro.vararg): + macro.var_comma_patch.append(i-1) + i += 1 + macro.patch.sort(key=lambda x: x[2],reverse=True) + + # ---------------------------------------------------------------------- + # macro_expand_args() + # + # Given a Macro and list of arguments (each a token list), this method + # returns an expanded version of a macro. The return value is a token sequence + # representing the replacement macro tokens + # ---------------------------------------------------------------------- + + def macro_expand_args(self,macro,args,expanded): + # Make a copy of the macro token sequence + rep = [copy.copy(_x) for _x in macro.value] + + # Make string expansion patches. These do not alter the length of the replacement sequence + + str_expansion = {} + for argnum, i in macro.str_patch: + if argnum not in str_expansion: + str_expansion[argnum] = ('"%s"' % "".join([x.value for x in args[argnum]])).replace("\\","\\\\") + rep[i] = copy.copy(rep[i]) + rep[i].value = str_expansion[argnum] + + # Make the variadic macro comma patch. If the variadic macro argument is empty, we get rid + comma_patch = False + if macro.variadic and not args[-1]: + for i in macro.var_comma_patch: + rep[i] = None + comma_patch = True + + # Make all other patches. The order of these matters. It is assumed that the patch list + # has been sorted in reverse order of patch location since replacements will cause the + # size of the replacement sequence to expand from the patch point. + + expanded_args = { } + for ptype, argnum, i in macro.patch: + # Concatenation. Argument is left unexpanded + if ptype == 'c': + rep[i:i+1] = args[argnum] + # Normal expansion. Argument is macro expanded first + elif ptype == 'e': + if argnum not in expanded_args: + expanded_args[argnum] = self.expand_macros(args[argnum],expanded) + rep[i:i+1] = expanded_args[argnum] + + # Get rid of removed comma if necessary + if comma_patch: + rep = [_i for _i in rep if _i] + + return rep + + + # ---------------------------------------------------------------------- + # expand_macros() + # + # Given a list of tokens, this function performs macro expansion. + # The expanded argument is a dictionary that contains macros already + # expanded. This is used to prevent infinite recursion. + # ---------------------------------------------------------------------- + + def expand_macros(self,tokens,expanded=None): + if expanded is None: + expanded = {} + i = 0 + while i < len(tokens): + t = tokens[i] + if t.type == self.t_ID: + if t.value in self.macros and t.value not in expanded: + # Yes, we found a macro match + expanded[t.value] = True + + m = self.macros[t.value] + if not m.arglist: + # A simple macro + ex = self.expand_macros([copy.copy(_x) for _x in m.value],expanded) + for e in ex: + e.lineno = t.lineno + tokens[i:i+1] = ex + i += len(ex) + else: + # A macro with arguments + j = i + 1 + while j < len(tokens) and tokens[j].type in self.t_WS: + j += 1 + if j < len(tokens) and tokens[j].value == '(': + tokcount,args,positions = self.collect_args(tokens[j:]) + if not m.variadic and len(args) != len(m.arglist): + self.error(self.source,t.lineno,"Macro %s requires %d arguments" % (t.value,len(m.arglist))) + i = j + tokcount + elif m.variadic and len(args) < len(m.arglist)-1: + if len(m.arglist) > 2: + self.error(self.source,t.lineno,"Macro %s must have at least %d arguments" % (t.value, len(m.arglist)-1)) + else: + self.error(self.source,t.lineno,"Macro %s must have at least %d argument" % (t.value, len(m.arglist)-1)) + i = j + tokcount + else: + if m.variadic: + if len(args) == len(m.arglist)-1: + args.append([]) + else: + args[len(m.arglist)-1] = tokens[j+positions[len(m.arglist)-1]:j+tokcount-1] + del args[len(m.arglist):] + + # Get macro replacement text + rep = self.macro_expand_args(m,args,expanded) + rep = self.expand_macros(rep,expanded) + for r in rep: + r.lineno = t.lineno + tokens[i:j+tokcount] = rep + i += len(rep) + else: + # This is not a macro. It is just a word which + # equals to name of the macro. Hence, go to the + # next token. + i += 1 + + del expanded[t.value] + continue + elif t.value == '__LINE__': + t.type = self.t_INTEGER + t.value = self.t_INTEGER_TYPE(t.lineno) + + i += 1 + return tokens + + # ---------------------------------------------------------------------- + # evalexpr() + # + # Evaluate an expression token sequence for the purposes of evaluating + # integral expressions. + # ---------------------------------------------------------------------- + + def evalexpr(self,tokens): + # tokens = tokenize(line) + # Search for defined macros + i = 0 + while i < len(tokens): + if tokens[i].type == self.t_ID and tokens[i].value == 'defined': + j = i + 1 + needparen = False + result = "0L" + while j < len(tokens): + if tokens[j].type in self.t_WS: + j += 1 + continue + elif tokens[j].type == self.t_ID: + if tokens[j].value in self.macros: + result = "1L" + else: + result = "0L" + if not needparen: break + elif tokens[j].value == '(': + needparen = True + elif tokens[j].value == ')': + break + else: + self.error(self.source,tokens[i].lineno,"Malformed defined()") + j += 1 + tokens[i].type = self.t_INTEGER + tokens[i].value = self.t_INTEGER_TYPE(result) + del tokens[i+1:j+1] + i += 1 + tokens = self.expand_macros(tokens) + return self.evalexpr_expanded(tokens) + + # ---------------------------------------------------------------------- + # evalexpr_expanded() + # + # Helper for evalexpr that evaluates the expression that had its macros + # and defined(...) expressions expanded by evalexpr + # ---------------------------------------------------------------------- + + def evalexpr_expanded(self, tokens): + for i,t in enumerate(tokens): + if t.type == self.t_ID: + tokens[i] = copy.copy(t) + tokens[i].type = self.t_INTEGER + tokens[i].value = self.t_INTEGER_TYPE("0") + elif t.type == self.t_INTEGER: + tokens[i] = copy.copy(t) + # Strip off any trailing suffixes + tokens[i].value = str(tokens[i].value) + while tokens[i].value[-1] not in "0123456789abcdefABCDEF": + tokens[i].value = tokens[i].value[:-1] + + return self.evalexpr_string("".join([str(x.value) for x in tokens])) + + # ---------------------------------------------------------------------- + # evalexpr_string() + # + # Helper for evalexpr that evaluates a string expression + # This implementation does basic C->python conversion and then uses eval() + # ---------------------------------------------------------------------- + def evalexpr_string(self, expr): + expr = expr.replace("&&"," and ") + expr = expr.replace("||"," or ") + expr = expr.replace("!"," not ") + expr = expr.replace(" not ="," !=") + try: + result = eval(expr) + except Exception: + self.error(self.source,tokens[0].lineno,"Couldn't evaluate expression") + result = 0 + return result + + # ---------------------------------------------------------------------- + # parsegen() + # + # Parse an input string/ + # ---------------------------------------------------------------------- + def parsegen(self,input,source=None): + + # Replace trigraph sequences + t = trigraph(input) + lines = self.group_lines(t) + + if not source: + source = "" + + self.define("__FILE__ \"%s\"" % source) + + self.source = source + chunk = [] + enable = True + iftrigger = False + ifstack = [] + + for x in lines: + for i,tok in enumerate(x): + if tok.type not in self.t_WS: break + if tok.value == '#': + # Preprocessor directive + + # insert necessary whitespace instead of eaten tokens + for tok in x: + if tok.type in self.t_WS and '\n' in tok.value: + chunk.append(tok) + + dirtokens = self.tokenstrip(x[i+1:]) + if dirtokens: + name = dirtokens[0].value + args = self.tokenstrip(dirtokens[1:]) + else: + name = "" + args = [] + + if name == 'define': + if enable: + for tok in self.expand_macros(chunk): + yield tok + chunk = [] + self.define(args) + elif name == 'include': + if enable: + for tok in self.expand_macros(chunk): + yield tok + chunk = [] + oldfile = self.macros['__FILE__'] + for tok in self.include(args): + yield tok + self.macros['__FILE__'] = oldfile + self.source = source + elif name == 'undef': + if enable: + for tok in self.expand_macros(chunk): + yield tok + chunk = [] + self.undef(args) + elif name == 'ifdef': + ifstack.append((enable,iftrigger)) + if enable: + if not args[0].value in self.macros: + enable = False + iftrigger = False + else: + iftrigger = True + elif name == 'ifndef': + ifstack.append((enable,iftrigger)) + if enable: + if args[0].value in self.macros: + enable = False + iftrigger = False + else: + iftrigger = True + elif name == 'if': + ifstack.append((enable,iftrigger)) + if enable: + result = self.evalexpr(args) + if not result: + enable = False + iftrigger = False + else: + iftrigger = True + elif name == 'elif': + if ifstack: + if ifstack[-1][0]: # We only pay attention if outer "if" allows this + if enable: # If already true, we flip enable False + enable = False + elif not iftrigger: # If False, but not triggered yet, we'll check expression + result = self.evalexpr(args) + if result: + enable = True + iftrigger = True + else: + self.error(self.source,dirtokens[0].lineno,"Misplaced #elif") + + elif name == 'else': + if ifstack: + if ifstack[-1][0]: + if enable: + enable = False + elif not iftrigger: + enable = True + iftrigger = True + else: + self.error(self.source,dirtokens[0].lineno,"Misplaced #else") + + elif name == 'endif': + if ifstack: + enable,iftrigger = ifstack.pop() + else: + self.error(self.source,dirtokens[0].lineno,"Misplaced #endif") + else: + # Unknown preprocessor directive + pass + + else: + # Normal text + if enable: + chunk.extend(x) + + for tok in self.expand_macros(chunk): + yield tok + chunk = [] + + # ---------------------------------------------------------------------- + # include() + # + # Implementation of file-inclusion + # ---------------------------------------------------------------------- + + def include(self,tokens): + # Try to extract the filename and then process an include file + if not tokens: + return + if tokens: + if tokens[0].value != '<' and tokens[0].type != self.t_STRING: + tokens = self.expand_macros(tokens) + + if tokens[0].value == '<': + # Include <...> + i = 1 + while i < len(tokens): + if tokens[i].value == '>': + break + i += 1 + else: + print("Malformed #include <...>") + return + filename = "".join([x.value for x in tokens[1:i]]) + path = self.path + [""] + self.temp_path + elif tokens[0].type == self.t_STRING: + filename = tokens[0].value[1:-1] + path = self.temp_path + [""] + self.path + else: + print("Malformed #include statement") + return + for p in path: + iname = os.path.join(p,filename) + try: + data = self.read_include_file(iname) + dname = os.path.dirname(iname) + if dname: + self.temp_path.insert(0,dname) + for tok in self.parsegen(data,filename): + yield tok + if dname: + del self.temp_path[0] + break + except IOError: + pass + else: + print("Couldn't find '%s'" % filename) + + # ---------------------------------------------------------------------- + # read_include_file() + # + # Reads a source file for inclusion using #include + # Could be overridden to e.g. customize encoding, limit access to + # certain paths on the filesystem, or provide the contents of system + # include files + # ---------------------------------------------------------------------- + + def read_include_file(self, filepath): + with open(filepath, 'r', encoding='utf-8', errors='surrogateescape') as file: + return file.read() + + # ---------------------------------------------------------------------- + # define() + # + # Define a new macro + # ---------------------------------------------------------------------- + + def define(self,tokens): + if isinstance(tokens,STRING_TYPES): + tokens = self.tokenize(tokens) + + linetok = tokens + try: + name = linetok[0] + if len(linetok) > 1: + mtype = linetok[1] + else: + mtype = None + if not mtype: + m = Macro(name.value,[]) + self.macros[name.value] = m + elif mtype.type in self.t_WS: + # A normal macro + m = Macro(name.value,self.tokenstrip(linetok[2:])) + self.macros[name.value] = m + elif mtype.value == '(': + # A macro with arguments + tokcount, args, positions = self.collect_args(linetok[1:]) + variadic = False + for a in args: + if variadic: + print("No more arguments may follow a variadic argument") + break + astr = "".join([str(_i.value) for _i in a]) + if astr == "...": + variadic = True + a[0].type = self.t_ID + a[0].value = '__VA_ARGS__' + variadic = True + del a[1:] + continue + elif astr[-3:] == "..." and a[0].type == self.t_ID: + variadic = True + del a[1:] + # If, for some reason, "." is part of the identifier, strip off the name for the purposes + # of macro expansion + if a[0].value[-3:] == '...': + a[0].value = a[0].value[:-3] + continue + if len(a) > 1 or a[0].type != self.t_ID: + print("Invalid macro argument") + break + else: + mvalue = self.tokenstrip(linetok[1+tokcount:]) + i = 0 + while i < len(mvalue): + if i+1 < len(mvalue): + if mvalue[i].type in self.t_WS and mvalue[i+1].value == '##': + del mvalue[i] + continue + elif mvalue[i].value == '##' and mvalue[i+1].type in self.t_WS: + del mvalue[i+1] + i += 1 + m = Macro(name.value,mvalue,[x[0].value for x in args],variadic) + self.macro_prescan(m) + self.macros[name.value] = m + else: + print("Bad macro definition") + except LookupError: + print("Bad macro definition") + + # ---------------------------------------------------------------------- + # undef() + # + # Undefine a macro + # ---------------------------------------------------------------------- + + def undef(self,tokens): + id = tokens[0].value + try: + del self.macros[id] + except LookupError: + pass + + # ---------------------------------------------------------------------- + # parse() + # + # Parse input text. + # ---------------------------------------------------------------------- + def parse(self,input,source=None,ignore={}): + self.ignore = ignore + self.parser = self.parsegen(input,source) + + # ---------------------------------------------------------------------- + # token() + # + # Method to return individual tokens + # ---------------------------------------------------------------------- + def token(self): + try: + while True: + tok = next(self.parser) + if tok.type not in self.ignore: return tok + except StopIteration: + self.parser = None + return None + +if __name__ == '__main__': + import ply.lex as lex + lexer = lex.lex() + + # Run a preprocessor + import sys + with open(sys.argv[1]) as f: + input = f.read() + + p = Preprocessor(lexer) + p.parse(input,sys.argv[1]) + while True: + tok = p.token() + if not tok: break + print(p.source, tok) diff --git a/src/ply/ctokens.py b/src/ply/ctokens.py new file mode 100644 index 000000000..b265e59ff --- /dev/null +++ b/src/ply/ctokens.py @@ -0,0 +1,127 @@ +# ---------------------------------------------------------------------- +# ctokens.py +# +# Token specifications for symbols in ANSI C and C++. This file is +# meant to be used as a library in other tokenizers. +# ---------------------------------------------------------------------- + +# Reserved words + +tokens = [ + # Literals (identifier, integer constant, float constant, string constant, char const) + 'ID', 'TYPEID', 'INTEGER', 'FLOAT', 'STRING', 'CHARACTER', + + # Operators (+,-,*,/,%,|,&,~,^,<<,>>, ||, &&, !, <, <=, >, >=, ==, !=) + 'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'MODULO', + 'OR', 'AND', 'NOT', 'XOR', 'LSHIFT', 'RSHIFT', + 'LOR', 'LAND', 'LNOT', + 'LT', 'LE', 'GT', 'GE', 'EQ', 'NE', + + # Assignment (=, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |=) + 'EQUALS', 'TIMESEQUAL', 'DIVEQUAL', 'MODEQUAL', 'PLUSEQUAL', 'MINUSEQUAL', + 'LSHIFTEQUAL','RSHIFTEQUAL', 'ANDEQUAL', 'XOREQUAL', 'OREQUAL', + + # Increment/decrement (++,--) + 'INCREMENT', 'DECREMENT', + + # Structure dereference (->) + 'ARROW', + + # Ternary operator (?) + 'TERNARY', + + # Delimeters ( ) [ ] { } , . ; : + 'LPAREN', 'RPAREN', + 'LBRACKET', 'RBRACKET', + 'LBRACE', 'RBRACE', + 'COMMA', 'PERIOD', 'SEMI', 'COLON', + + # Ellipsis (...) + 'ELLIPSIS', +] + +# Operators +t_PLUS = r'\+' +t_MINUS = r'-' +t_TIMES = r'\*' +t_DIVIDE = r'/' +t_MODULO = r'%' +t_OR = r'\|' +t_AND = r'&' +t_NOT = r'~' +t_XOR = r'\^' +t_LSHIFT = r'<<' +t_RSHIFT = r'>>' +t_LOR = r'\|\|' +t_LAND = r'&&' +t_LNOT = r'!' +t_LT = r'<' +t_GT = r'>' +t_LE = r'<=' +t_GE = r'>=' +t_EQ = r'==' +t_NE = r'!=' + +# Assignment operators + +t_EQUALS = r'=' +t_TIMESEQUAL = r'\*=' +t_DIVEQUAL = r'/=' +t_MODEQUAL = r'%=' +t_PLUSEQUAL = r'\+=' +t_MINUSEQUAL = r'-=' +t_LSHIFTEQUAL = r'<<=' +t_RSHIFTEQUAL = r'>>=' +t_ANDEQUAL = r'&=' +t_OREQUAL = r'\|=' +t_XOREQUAL = r'\^=' + +# Increment/decrement +t_INCREMENT = r'\+\+' +t_DECREMENT = r'--' + +# -> +t_ARROW = r'->' + +# ? +t_TERNARY = r'\?' + +# Delimeters +t_LPAREN = r'\(' +t_RPAREN = r'\)' +t_LBRACKET = r'\[' +t_RBRACKET = r'\]' +t_LBRACE = r'\{' +t_RBRACE = r'\}' +t_COMMA = r',' +t_PERIOD = r'\.' +t_SEMI = r';' +t_COLON = r':' +t_ELLIPSIS = r'\.\.\.' + +# Identifiers +t_ID = r'[A-Za-z_][A-Za-z0-9_]*' + +# Integer literal +t_INTEGER = r'\d+([uU]|[lL]|[uU][lL]|[lL][uU])?' + +# Floating literal +t_FLOAT = r'((\d+)(\.\d+)(e(\+|-)?(\d+))? | (\d+)e(\+|-)?(\d+))([lL]|[fF])?' + +# String literal +t_STRING = r'\"([^\\\n]|(\\.))*?\"' + +# Character constant 'c' or L'c' +t_CHARACTER = r'(L)?\'([^\\\n]|(\\.))*?\'' + +# Comment (C-Style) +def t_COMMENT(t): + r'/\*(.|\n)*?\*/' + t.lexer.lineno += t.value.count('\n') + return t + +# Comment (C++-Style) +def t_CPPCOMMENT(t): + r'//.*\n' + t.lexer.lineno += 1 + return t diff --git a/src/ply/lex.py b/src/ply/lex.py new file mode 100644 index 000000000..bc9ed3414 --- /dev/null +++ b/src/ply/lex.py @@ -0,0 +1,1099 @@ +# ----------------------------------------------------------------------------- +# ply: lex.py +# +# Copyright (C) 2001-2019 +# David M. Beazley (Dabeaz LLC) +# All rights reserved. +# +# Latest version: https://github.com/dabeaz/ply +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# * Neither the name of David Beazley or Dabeaz LLC may be used to +# endorse or promote products derived from this software without +# specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# ----------------------------------------------------------------------------- + +__version__ = '3.11' +__tabversion__ = '3.10' + +import re +import sys +import types +import copy +import os +import inspect + +# This tuple contains known string types +try: + # Python 2.6 + StringTypes = (types.StringType, types.UnicodeType) +except AttributeError: + # Python 3.0 + StringTypes = (str, bytes) + +# This regular expression is used to match valid token names +_is_identifier = re.compile(r'^[a-zA-Z0-9_]+$') + +# Exception thrown when invalid token encountered and no default error +# handler is defined. +class LexError(Exception): + def __init__(self, message, s): + self.args = (message,) + self.text = s + + +# Token class. This class is used to represent the tokens produced. +class LexToken(object): + def __str__(self): + return 'LexToken(%s,%r,%d,%d)' % (self.type, self.value, self.lineno, self.lexpos) + + def __repr__(self): + return str(self) + + +# This object is a stand-in for a logging object created by the +# logging module. + +class PlyLogger(object): + def __init__(self, f): + self.f = f + + def critical(self, msg, *args, **kwargs): + self.f.write((msg % args) + '\n') + + def warning(self, msg, *args, **kwargs): + self.f.write('WARNING: ' + (msg % args) + '\n') + + def error(self, msg, *args, **kwargs): + self.f.write('ERROR: ' + (msg % args) + '\n') + + info = critical + debug = critical + + +# Null logger is used when no output is generated. Does nothing. +class NullLogger(object): + def __getattribute__(self, name): + return self + + def __call__(self, *args, **kwargs): + return self + + +# ----------------------------------------------------------------------------- +# === Lexing Engine === +# +# The following Lexer class implements the lexer runtime. There are only +# a few public methods and attributes: +# +# input() - Store a new string in the lexer +# token() - Get the next token +# clone() - Clone the lexer +# +# lineno - Current line number +# lexpos - Current position in the input string +# ----------------------------------------------------------------------------- + +class Lexer: + def __init__(self): + self.lexre = None # Master regular expression. This is a list of + # tuples (re, findex) where re is a compiled + # regular expression and findex is a list + # mapping regex group numbers to rules + self.lexretext = None # Current regular expression strings + self.lexstatere = {} # Dictionary mapping lexer states to master regexs + self.lexstateretext = {} # Dictionary mapping lexer states to regex strings + self.lexstaterenames = {} # Dictionary mapping lexer states to symbol names + self.lexstate = 'INITIAL' # Current lexer state + self.lexstatestack = [] # Stack of lexer states + self.lexstateinfo = None # State information + self.lexstateignore = {} # Dictionary of ignored characters for each state + self.lexstateerrorf = {} # Dictionary of error functions for each state + self.lexstateeoff = {} # Dictionary of eof functions for each state + self.lexreflags = 0 # Optional re compile flags + self.lexdata = None # Actual input data (as a string) + self.lexpos = 0 # Current position in input text + self.lexlen = 0 # Length of the input text + self.lexerrorf = None # Error rule (if any) + self.lexeoff = None # EOF rule (if any) + self.lextokens = None # List of valid tokens + self.lexignore = '' # Ignored characters + self.lexliterals = '' # Literal characters that can be passed through + self.lexmodule = None # Module + self.lineno = 1 # Current line number + self.lexoptimize = False # Optimized mode + + def clone(self, object=None): + c = copy.copy(self) + + # If the object parameter has been supplied, it means we are attaching the + # lexer to a new object. In this case, we have to rebind all methods in + # the lexstatere and lexstateerrorf tables. + + if object: + newtab = {} + for key, ritem in self.lexstatere.items(): + newre = [] + for cre, findex in ritem: + newfindex = [] + for f in findex: + if not f or not f[0]: + newfindex.append(f) + continue + newfindex.append((getattr(object, f[0].__name__), f[1])) + newre.append((cre, newfindex)) + newtab[key] = newre + c.lexstatere = newtab + c.lexstateerrorf = {} + for key, ef in self.lexstateerrorf.items(): + c.lexstateerrorf[key] = getattr(object, ef.__name__) + c.lexmodule = object + return c + + # ------------------------------------------------------------ + # writetab() - Write lexer information to a table file + # ------------------------------------------------------------ + def writetab(self, lextab, outputdir=''): + if isinstance(lextab, types.ModuleType): + raise IOError("Won't overwrite existing lextab module") + basetabmodule = lextab.split('.')[-1] + filename = os.path.join(outputdir, basetabmodule) + '.py' + with open(filename, 'w') as tf: + tf.write('# %s.py. This file automatically created by PLY (version %s). Don\'t edit!\n' % (basetabmodule, __version__)) + tf.write('_tabversion = %s\n' % repr(__tabversion__)) + tf.write('_lextokens = set(%s)\n' % repr(tuple(sorted(self.lextokens)))) + tf.write('_lexreflags = %s\n' % repr(int(self.lexreflags))) + tf.write('_lexliterals = %s\n' % repr(self.lexliterals)) + tf.write('_lexstateinfo = %s\n' % repr(self.lexstateinfo)) + + # Rewrite the lexstatere table, replacing function objects with function names + tabre = {} + for statename, lre in self.lexstatere.items(): + titem = [] + for (pat, func), retext, renames in zip(lre, self.lexstateretext[statename], self.lexstaterenames[statename]): + titem.append((retext, _funcs_to_names(func, renames))) + tabre[statename] = titem + + tf.write('_lexstatere = %s\n' % repr(tabre)) + tf.write('_lexstateignore = %s\n' % repr(self.lexstateignore)) + + taberr = {} + for statename, ef in self.lexstateerrorf.items(): + taberr[statename] = ef.__name__ if ef else None + tf.write('_lexstateerrorf = %s\n' % repr(taberr)) + + tabeof = {} + for statename, ef in self.lexstateeoff.items(): + tabeof[statename] = ef.__name__ if ef else None + tf.write('_lexstateeoff = %s\n' % repr(tabeof)) + + # ------------------------------------------------------------ + # readtab() - Read lexer information from a tab file + # ------------------------------------------------------------ + def readtab(self, tabfile, fdict): + if isinstance(tabfile, types.ModuleType): + lextab = tabfile + else: + exec('import %s' % tabfile) + lextab = sys.modules[tabfile] + + if getattr(lextab, '_tabversion', '0.0') != __tabversion__: + raise ImportError('Inconsistent PLY version') + + self.lextokens = lextab._lextokens + self.lexreflags = lextab._lexreflags + self.lexliterals = lextab._lexliterals + self.lextokens_all = self.lextokens | set(self.lexliterals) + self.lexstateinfo = lextab._lexstateinfo + self.lexstateignore = lextab._lexstateignore + self.lexstatere = {} + self.lexstateretext = {} + for statename, lre in lextab._lexstatere.items(): + titem = [] + txtitem = [] + for pat, func_name in lre: + titem.append((re.compile(pat, lextab._lexreflags), _names_to_funcs(func_name, fdict))) + + self.lexstatere[statename] = titem + self.lexstateretext[statename] = txtitem + + self.lexstateerrorf = {} + for statename, ef in lextab._lexstateerrorf.items(): + self.lexstateerrorf[statename] = fdict[ef] + + self.lexstateeoff = {} + for statename, ef in lextab._lexstateeoff.items(): + self.lexstateeoff[statename] = fdict[ef] + + self.begin('INITIAL') + + # ------------------------------------------------------------ + # input() - Push a new string into the lexer + # ------------------------------------------------------------ + def input(self, s): + # Pull off the first character to see if s looks like a string + c = s[:1] + if not isinstance(c, StringTypes): + raise ValueError('Expected a string') + self.lexdata = s + self.lexpos = 0 + self.lexlen = len(s) + + # ------------------------------------------------------------ + # begin() - Changes the lexing state + # ------------------------------------------------------------ + def begin(self, state): + if state not in self.lexstatere: + raise ValueError('Undefined state') + self.lexre = self.lexstatere[state] + self.lexretext = self.lexstateretext[state] + self.lexignore = self.lexstateignore.get(state, '') + self.lexerrorf = self.lexstateerrorf.get(state, None) + self.lexeoff = self.lexstateeoff.get(state, None) + self.lexstate = state + + # ------------------------------------------------------------ + # push_state() - Changes the lexing state and saves old on stack + # ------------------------------------------------------------ + def push_state(self, state): + self.lexstatestack.append(self.lexstate) + self.begin(state) + + # ------------------------------------------------------------ + # pop_state() - Restores the previous state + # ------------------------------------------------------------ + def pop_state(self): + self.begin(self.lexstatestack.pop()) + + # ------------------------------------------------------------ + # current_state() - Returns the current lexing state + # ------------------------------------------------------------ + def current_state(self): + return self.lexstate + + # ------------------------------------------------------------ + # skip() - Skip ahead n characters + # ------------------------------------------------------------ + def skip(self, n): + self.lexpos += n + + # ------------------------------------------------------------ + # opttoken() - Return the next token from the Lexer + # + # Note: This function has been carefully implemented to be as fast + # as possible. Don't make changes unless you really know what + # you are doing + # ------------------------------------------------------------ + def token(self): + # Make local copies of frequently referenced attributes + lexpos = self.lexpos + lexlen = self.lexlen + lexignore = self.lexignore + lexdata = self.lexdata + + while lexpos < lexlen: + # This code provides some short-circuit code for whitespace, tabs, and other ignored characters + if lexdata[lexpos] in lexignore: + lexpos += 1 + continue + + # Look for a regular expression match + for lexre, lexindexfunc in self.lexre: + m = lexre.match(lexdata, lexpos) + if not m: + continue + + # Create a token for return + tok = LexToken() + tok.value = m.group() + tok.lineno = self.lineno + tok.lexpos = lexpos + + i = m.lastindex + func, tok.type = lexindexfunc[i] + + if not func: + # If no token type was set, it's an ignored token + if tok.type: + self.lexpos = m.end() + return tok + else: + lexpos = m.end() + break + + lexpos = m.end() + + # If token is processed by a function, call it + + tok.lexer = self # Set additional attributes useful in token rules + self.lexmatch = m + self.lexpos = lexpos + + newtok = func(tok) + + # Every function must return a token, if nothing, we just move to next token + if not newtok: + lexpos = self.lexpos # This is here in case user has updated lexpos. + lexignore = self.lexignore # This is here in case there was a state change + break + + # Verify type of the token. If not in the token map, raise an error + if not self.lexoptimize: + if newtok.type not in self.lextokens_all: + raise LexError("%s:%d: Rule '%s' returned an unknown token type '%s'" % ( + func.__code__.co_filename, func.__code__.co_firstlineno, + func.__name__, newtok.type), lexdata[lexpos:]) + + return newtok + else: + # No match, see if in literals + if lexdata[lexpos] in self.lexliterals: + tok = LexToken() + tok.value = lexdata[lexpos] + tok.lineno = self.lineno + tok.type = tok.value + tok.lexpos = lexpos + self.lexpos = lexpos + 1 + return tok + + # No match. Call t_error() if defined. + if self.lexerrorf: + tok = LexToken() + tok.value = self.lexdata[lexpos:] + tok.lineno = self.lineno + tok.type = 'error' + tok.lexer = self + tok.lexpos = lexpos + self.lexpos = lexpos + newtok = self.lexerrorf(tok) + if lexpos == self.lexpos: + # Error method didn't change text position at all. This is an error. + raise LexError("Scanning error. Illegal character '%s'" % (lexdata[lexpos]), lexdata[lexpos:]) + lexpos = self.lexpos + if not newtok: + continue + return newtok + + self.lexpos = lexpos + raise LexError("Illegal character '%s' at index %d" % (lexdata[lexpos], lexpos), lexdata[lexpos:]) + + if self.lexeoff: + tok = LexToken() + tok.type = 'eof' + tok.value = '' + tok.lineno = self.lineno + tok.lexpos = lexpos + tok.lexer = self + self.lexpos = lexpos + newtok = self.lexeoff(tok) + return newtok + + self.lexpos = lexpos + 1 + if self.lexdata is None: + raise RuntimeError('No input string given with input()') + return None + + # Iterator interface + def __iter__(self): + return self + + def next(self): + t = self.token() + if t is None: + raise StopIteration + return t + + __next__ = next + +# ----------------------------------------------------------------------------- +# ==== Lex Builder === +# +# The functions and classes below are used to collect lexing information +# and build a Lexer object from it. +# ----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- +# _get_regex(func) +# +# Returns the regular expression assigned to a function either as a doc string +# or as a .regex attribute attached by the @TOKEN decorator. +# ----------------------------------------------------------------------------- +def _get_regex(func): + return getattr(func, 'regex', func.__doc__) + +# ----------------------------------------------------------------------------- +# get_caller_module_dict() +# +# This function returns a dictionary containing all of the symbols defined within +# a caller further down the call stack. This is used to get the environment +# associated with the yacc() call if none was provided. +# ----------------------------------------------------------------------------- +def get_caller_module_dict(levels): + f = sys._getframe(levels) + ldict = f.f_globals.copy() + if f.f_globals != f.f_locals: + ldict.update(f.f_locals) + return ldict + +# ----------------------------------------------------------------------------- +# _funcs_to_names() +# +# Given a list of regular expression functions, this converts it to a list +# suitable for output to a table file +# ----------------------------------------------------------------------------- +def _funcs_to_names(funclist, namelist): + result = [] + for f, name in zip(funclist, namelist): + if f and f[0]: + result.append((name, f[1])) + else: + result.append(f) + return result + +# ----------------------------------------------------------------------------- +# _names_to_funcs() +# +# Given a list of regular expression function names, this converts it back to +# functions. +# ----------------------------------------------------------------------------- +def _names_to_funcs(namelist, fdict): + result = [] + for n in namelist: + if n and n[0]: + result.append((fdict[n[0]], n[1])) + else: + result.append(n) + return result + +# ----------------------------------------------------------------------------- +# _form_master_re() +# +# This function takes a list of all of the regex components and attempts to +# form the master regular expression. Given limitations in the Python re +# module, it may be necessary to break the master regex into separate expressions. +# ----------------------------------------------------------------------------- +def _form_master_re(relist, reflags, ldict, toknames): + if not relist: + return [] + regex = '|'.join(relist) + try: + lexre = re.compile(regex, reflags) + + # Build the index to function map for the matching engine + lexindexfunc = [None] * (max(lexre.groupindex.values()) + 1) + lexindexnames = lexindexfunc[:] + + for f, i in lexre.groupindex.items(): + handle = ldict.get(f, None) + if type(handle) in (types.FunctionType, types.MethodType): + lexindexfunc[i] = (handle, toknames[f]) + lexindexnames[i] = f + elif handle is not None: + lexindexnames[i] = f + if f.find('ignore_') > 0: + lexindexfunc[i] = (None, None) + else: + lexindexfunc[i] = (None, toknames[f]) + + return [(lexre, lexindexfunc)], [regex], [lexindexnames] + except Exception: + m = int(len(relist)/2) + if m == 0: + m = 1 + llist, lre, lnames = _form_master_re(relist[:m], reflags, ldict, toknames) + rlist, rre, rnames = _form_master_re(relist[m:], reflags, ldict, toknames) + return (llist+rlist), (lre+rre), (lnames+rnames) + +# ----------------------------------------------------------------------------- +# def _statetoken(s,names) +# +# Given a declaration name s of the form "t_" and a dictionary whose keys are +# state names, this function returns a tuple (states,tokenname) where states +# is a tuple of state names and tokenname is the name of the token. For example, +# calling this with s = "t_foo_bar_SPAM" might return (('foo','bar'),'SPAM') +# ----------------------------------------------------------------------------- +def _statetoken(s, names): + parts = s.split('_') + for i, part in enumerate(parts[1:], 1): + if part not in names and part != 'ANY': + break + + if i > 1: + states = tuple(parts[1:i]) + else: + states = ('INITIAL',) + + if 'ANY' in states: + states = tuple(names) + + tokenname = '_'.join(parts[i:]) + return (states, tokenname) + + +# ----------------------------------------------------------------------------- +# LexerReflect() +# +# This class represents information needed to build a lexer as extracted from a +# user's input file. +# ----------------------------------------------------------------------------- +class LexerReflect(object): + def __init__(self, ldict, log=None, reflags=0): + self.ldict = ldict + self.error_func = None + self.tokens = [] + self.reflags = reflags + self.stateinfo = {'INITIAL': 'inclusive'} + self.modules = set() + self.error = False + self.log = PlyLogger(sys.stderr) if log is None else log + + # Get all of the basic information + def get_all(self): + self.get_tokens() + self.get_literals() + self.get_states() + self.get_rules() + + # Validate all of the information + def validate_all(self): + self.validate_tokens() + self.validate_literals() + self.validate_rules() + return self.error + + # Get the tokens map + def get_tokens(self): + tokens = self.ldict.get('tokens', None) + if not tokens: + self.log.error('No token list is defined') + self.error = True + return + + if not isinstance(tokens, (list, tuple)): + self.log.error('tokens must be a list or tuple') + self.error = True + return + + if not tokens: + self.log.error('tokens is empty') + self.error = True + return + + self.tokens = tokens + + # Validate the tokens + def validate_tokens(self): + terminals = {} + for n in self.tokens: + if not _is_identifier.match(n): + self.log.error("Bad token name '%s'", n) + self.error = True + if n in terminals: + self.log.warning("Token '%s' multiply defined", n) + terminals[n] = 1 + + # Get the literals specifier + def get_literals(self): + self.literals = self.ldict.get('literals', '') + if not self.literals: + self.literals = '' + + # Validate literals + def validate_literals(self): + try: + for c in self.literals: + if not isinstance(c, StringTypes) or len(c) > 1: + self.log.error('Invalid literal %s. Must be a single character', repr(c)) + self.error = True + + except TypeError: + self.log.error('Invalid literals specification. literals must be a sequence of characters') + self.error = True + + def get_states(self): + self.states = self.ldict.get('states', None) + # Build statemap + if self.states: + if not isinstance(self.states, (tuple, list)): + self.log.error('states must be defined as a tuple or list') + self.error = True + else: + for s in self.states: + if not isinstance(s, tuple) or len(s) != 2: + self.log.error("Invalid state specifier %s. Must be a tuple (statename,'exclusive|inclusive')", repr(s)) + self.error = True + continue + name, statetype = s + if not isinstance(name, StringTypes): + self.log.error('State name %s must be a string', repr(name)) + self.error = True + continue + if not (statetype == 'inclusive' or statetype == 'exclusive'): + self.log.error("State type for state %s must be 'inclusive' or 'exclusive'", name) + self.error = True + continue + if name in self.stateinfo: + self.log.error("State '%s' already defined", name) + self.error = True + continue + self.stateinfo[name] = statetype + + # Get all of the symbols with a t_ prefix and sort them into various + # categories (functions, strings, error functions, and ignore characters) + + def get_rules(self): + tsymbols = [f for f in self.ldict if f[:2] == 't_'] + + # Now build up a list of functions and a list of strings + self.toknames = {} # Mapping of symbols to token names + self.funcsym = {} # Symbols defined as functions + self.strsym = {} # Symbols defined as strings + self.ignore = {} # Ignore strings by state + self.errorf = {} # Error functions by state + self.eoff = {} # EOF functions by state + + for s in self.stateinfo: + self.funcsym[s] = [] + self.strsym[s] = [] + + if len(tsymbols) == 0: + self.log.error('No rules of the form t_rulename are defined') + self.error = True + return + + for f in tsymbols: + t = self.ldict[f] + states, tokname = _statetoken(f, self.stateinfo) + self.toknames[f] = tokname + + if hasattr(t, '__call__'): + if tokname == 'error': + for s in states: + self.errorf[s] = t + elif tokname == 'eof': + for s in states: + self.eoff[s] = t + elif tokname == 'ignore': + line = t.__code__.co_firstlineno + file = t.__code__.co_filename + self.log.error("%s:%d: Rule '%s' must be defined as a string", file, line, t.__name__) + self.error = True + else: + for s in states: + self.funcsym[s].append((f, t)) + elif isinstance(t, StringTypes): + if tokname == 'ignore': + for s in states: + self.ignore[s] = t + if '\\' in t: + self.log.warning("%s contains a literal backslash '\\'", f) + + elif tokname == 'error': + self.log.error("Rule '%s' must be defined as a function", f) + self.error = True + else: + for s in states: + self.strsym[s].append((f, t)) + else: + self.log.error('%s not defined as a function or string', f) + self.error = True + + # Sort the functions by line number + for f in self.funcsym.values(): + f.sort(key=lambda x: x[1].__code__.co_firstlineno) + + # Sort the strings by regular expression length + for s in self.strsym.values(): + s.sort(key=lambda x: len(x[1]), reverse=True) + + # Validate all of the t_rules collected + def validate_rules(self): + for state in self.stateinfo: + # Validate all rules defined by functions + + for fname, f in self.funcsym[state]: + line = f.__code__.co_firstlineno + file = f.__code__.co_filename + module = inspect.getmodule(f) + self.modules.add(module) + + tokname = self.toknames[fname] + if isinstance(f, types.MethodType): + reqargs = 2 + else: + reqargs = 1 + nargs = f.__code__.co_argcount + if nargs > reqargs: + self.log.error("%s:%d: Rule '%s' has too many arguments", file, line, f.__name__) + self.error = True + continue + + if nargs < reqargs: + self.log.error("%s:%d: Rule '%s' requires an argument", file, line, f.__name__) + self.error = True + continue + + if not _get_regex(f): + self.log.error("%s:%d: No regular expression defined for rule '%s'", file, line, f.__name__) + self.error = True + continue + + try: + c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), self.reflags) + if c.match(''): + self.log.error("%s:%d: Regular expression for rule '%s' matches empty string", file, line, f.__name__) + self.error = True + except re.error as e: + self.log.error("%s:%d: Invalid regular expression for rule '%s'. %s", file, line, f.__name__, e) + if '#' in _get_regex(f): + self.log.error("%s:%d. Make sure '#' in rule '%s' is escaped with '\\#'", file, line, f.__name__) + self.error = True + + # Validate all rules defined by strings + for name, r in self.strsym[state]: + tokname = self.toknames[name] + if tokname == 'error': + self.log.error("Rule '%s' must be defined as a function", name) + self.error = True + continue + + if tokname not in self.tokens and tokname.find('ignore_') < 0: + self.log.error("Rule '%s' defined for an unspecified token %s", name, tokname) + self.error = True + continue + + try: + c = re.compile('(?P<%s>%s)' % (name, r), self.reflags) + if (c.match('')): + self.log.error("Regular expression for rule '%s' matches empty string", name) + self.error = True + except re.error as e: + self.log.error("Invalid regular expression for rule '%s'. %s", name, e) + if '#' in r: + self.log.error("Make sure '#' in rule '%s' is escaped with '\\#'", name) + self.error = True + + if not self.funcsym[state] and not self.strsym[state]: + self.log.error("No rules defined for state '%s'", state) + self.error = True + + # Validate the error function + efunc = self.errorf.get(state, None) + if efunc: + f = efunc + line = f.__code__.co_firstlineno + file = f.__code__.co_filename + module = inspect.getmodule(f) + self.modules.add(module) + + if isinstance(f, types.MethodType): + reqargs = 2 + else: + reqargs = 1 + nargs = f.__code__.co_argcount + if nargs > reqargs: + self.log.error("%s:%d: Rule '%s' has too many arguments", file, line, f.__name__) + self.error = True + + if nargs < reqargs: + self.log.error("%s:%d: Rule '%s' requires an argument", file, line, f.__name__) + self.error = True + + for module in self.modules: + self.validate_module(module) + + # ----------------------------------------------------------------------------- + # validate_module() + # + # This checks to see if there are duplicated t_rulename() functions or strings + # in the parser input file. This is done using a simple regular expression + # match on each line in the source code of the given module. + # ----------------------------------------------------------------------------- + + def validate_module(self, module): + try: + lines, linen = inspect.getsourcelines(module) + except IOError: + return + + fre = re.compile(r'\s*def\s+(t_[a-zA-Z_0-9]*)\(') + sre = re.compile(r'\s*(t_[a-zA-Z_0-9]*)\s*=') + + counthash = {} + linen += 1 + for line in lines: + m = fre.match(line) + if not m: + m = sre.match(line) + if m: + name = m.group(1) + prev = counthash.get(name) + if not prev: + counthash[name] = linen + else: + filename = inspect.getsourcefile(module) + self.log.error('%s:%d: Rule %s redefined. Previously defined on line %d', filename, linen, name, prev) + self.error = True + linen += 1 + +# ----------------------------------------------------------------------------- +# lex(module) +# +# Build all of the regular expression rules from definitions in the supplied module +# ----------------------------------------------------------------------------- +def lex(module=None, object=None, debug=False, optimize=False, lextab='lextab', + reflags=int(re.VERBOSE), nowarn=False, outputdir=None, debuglog=None, errorlog=None): + + if lextab is None: + lextab = 'lextab' + + global lexer + + ldict = None + stateinfo = {'INITIAL': 'inclusive'} + lexobj = Lexer() + lexobj.lexoptimize = optimize + global token, input + + if errorlog is None: + errorlog = PlyLogger(sys.stderr) + + if debug: + if debuglog is None: + debuglog = PlyLogger(sys.stderr) + + # Get the module dictionary used for the lexer + if object: + module = object + + # Get the module dictionary used for the parser + if module: + _items = [(k, getattr(module, k)) for k in dir(module)] + ldict = dict(_items) + # If no __file__ attribute is available, try to obtain it from the __module__ instead + if '__file__' not in ldict: + ldict['__file__'] = sys.modules[ldict['__module__']].__file__ + else: + ldict = get_caller_module_dict(2) + + # Determine if the module is package of a package or not. + # If so, fix the tabmodule setting so that tables load correctly + pkg = ldict.get('__package__') + if pkg and isinstance(lextab, str): + if '.' not in lextab: + lextab = pkg + '.' + lextab + + # Collect parser information from the dictionary + linfo = LexerReflect(ldict, log=errorlog, reflags=reflags) + linfo.get_all() + if not optimize: + if linfo.validate_all(): + raise SyntaxError("Can't build lexer") + + if optimize and lextab: + try: + lexobj.readtab(lextab, ldict) + token = lexobj.token + input = lexobj.input + lexer = lexobj + return lexobj + + except ImportError: + pass + + # Dump some basic debugging information + if debug: + debuglog.info('lex: tokens = %r', linfo.tokens) + debuglog.info('lex: literals = %r', linfo.literals) + debuglog.info('lex: states = %r', linfo.stateinfo) + + # Build a dictionary of valid token names + lexobj.lextokens = set() + for n in linfo.tokens: + lexobj.lextokens.add(n) + + # Get literals specification + if isinstance(linfo.literals, (list, tuple)): + lexobj.lexliterals = type(linfo.literals[0])().join(linfo.literals) + else: + lexobj.lexliterals = linfo.literals + + lexobj.lextokens_all = lexobj.lextokens | set(lexobj.lexliterals) + + # Get the stateinfo dictionary + stateinfo = linfo.stateinfo + + regexs = {} + # Build the master regular expressions + for state in stateinfo: + regex_list = [] + + # Add rules defined by functions first + for fname, f in linfo.funcsym[state]: + regex_list.append('(?P<%s>%s)' % (fname, _get_regex(f))) + if debug: + debuglog.info("lex: Adding rule %s -> '%s' (state '%s')", fname, _get_regex(f), state) + + # Now add all of the simple rules + for name, r in linfo.strsym[state]: + regex_list.append('(?P<%s>%s)' % (name, r)) + if debug: + debuglog.info("lex: Adding rule %s -> '%s' (state '%s')", name, r, state) + + regexs[state] = regex_list + + # Build the master regular expressions + + if debug: + debuglog.info('lex: ==== MASTER REGEXS FOLLOW ====') + + for state in regexs: + lexre, re_text, re_names = _form_master_re(regexs[state], reflags, ldict, linfo.toknames) + lexobj.lexstatere[state] = lexre + lexobj.lexstateretext[state] = re_text + lexobj.lexstaterenames[state] = re_names + if debug: + for i, text in enumerate(re_text): + debuglog.info("lex: state '%s' : regex[%d] = '%s'", state, i, text) + + # For inclusive states, we need to add the regular expressions from the INITIAL state + for state, stype in stateinfo.items(): + if state != 'INITIAL' and stype == 'inclusive': + lexobj.lexstatere[state].extend(lexobj.lexstatere['INITIAL']) + lexobj.lexstateretext[state].extend(lexobj.lexstateretext['INITIAL']) + lexobj.lexstaterenames[state].extend(lexobj.lexstaterenames['INITIAL']) + + lexobj.lexstateinfo = stateinfo + lexobj.lexre = lexobj.lexstatere['INITIAL'] + lexobj.lexretext = lexobj.lexstateretext['INITIAL'] + lexobj.lexreflags = reflags + + # Set up ignore variables + lexobj.lexstateignore = linfo.ignore + lexobj.lexignore = lexobj.lexstateignore.get('INITIAL', '') + + # Set up error functions + lexobj.lexstateerrorf = linfo.errorf + lexobj.lexerrorf = linfo.errorf.get('INITIAL', None) + if not lexobj.lexerrorf: + errorlog.warning('No t_error rule is defined') + + # Set up eof functions + lexobj.lexstateeoff = linfo.eoff + lexobj.lexeoff = linfo.eoff.get('INITIAL', None) + + # Check state information for ignore and error rules + for s, stype in stateinfo.items(): + if stype == 'exclusive': + if s not in linfo.errorf: + errorlog.warning("No error rule is defined for exclusive state '%s'", s) + if s not in linfo.ignore and lexobj.lexignore: + errorlog.warning("No ignore rule is defined for exclusive state '%s'", s) + elif stype == 'inclusive': + if s not in linfo.errorf: + linfo.errorf[s] = linfo.errorf.get('INITIAL', None) + if s not in linfo.ignore: + linfo.ignore[s] = linfo.ignore.get('INITIAL', '') + + # Create global versions of the token() and input() functions + token = lexobj.token + input = lexobj.input + lexer = lexobj + + # If in optimize mode, we write the lextab + if lextab and optimize: + if outputdir is None: + # If no output directory is set, the location of the output files + # is determined according to the following rules: + # - If lextab specifies a package, files go into that package directory + # - Otherwise, files go in the same directory as the specifying module + if isinstance(lextab, types.ModuleType): + srcfile = lextab.__file__ + else: + if '.' not in lextab: + srcfile = ldict['__file__'] + else: + parts = lextab.split('.') + pkgname = '.'.join(parts[:-1]) + exec('import %s' % pkgname) + srcfile = getattr(sys.modules[pkgname], '__file__', '') + outputdir = os.path.dirname(srcfile) + try: + lexobj.writetab(lextab, outputdir) + if lextab in sys.modules: + del sys.modules[lextab] + except IOError as e: + errorlog.warning("Couldn't write lextab module %r. %s" % (lextab, e)) + + return lexobj + +# ----------------------------------------------------------------------------- +# runmain() +# +# This runs the lexer as a main program +# ----------------------------------------------------------------------------- + +def runmain(lexer=None, data=None): + if not data: + try: + filename = sys.argv[1] + with open(filename) as f: + data = f.read() + except IndexError: + sys.stdout.write('Reading from standard input (type EOF to end):\n') + data = sys.stdin.read() + + if lexer: + _input = lexer.input + else: + _input = input + _input(data) + if lexer: + _token = lexer.token + else: + _token = token + + while True: + tok = _token() + if not tok: + break + sys.stdout.write('(%s,%r,%d,%d)\n' % (tok.type, tok.value, tok.lineno, tok.lexpos)) + +# ----------------------------------------------------------------------------- +# @TOKEN(regex) +# +# This decorator function can be used to set the regex expression on a function +# when its docstring might need to be set in an alternative way +# ----------------------------------------------------------------------------- + +def TOKEN(r): + def set_regex(f): + if hasattr(r, '__call__'): + f.regex = _get_regex(r) + else: + f.regex = r + return f + return set_regex + +# Alternative spelling of the TOKEN decorator +Token = TOKEN diff --git a/src/ply/yacc.py b/src/ply/yacc.py new file mode 100644 index 000000000..98a4fac75 --- /dev/null +++ b/src/ply/yacc.py @@ -0,0 +1,3504 @@ +# ----------------------------------------------------------------------------- +# ply: yacc.py +# +# Copyright (C) 2001-2019 +# David M. Beazley (Dabeaz LLC) +# All rights reserved. +# +# Latest version: https://github.com/dabeaz/ply +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# * Neither the name of David Beazley or Dabeaz LLC may be used to +# endorse or promote products derived from this software without +# specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# ----------------------------------------------------------------------------- +# +# This implements an LR parser that is constructed from grammar rules defined +# as Python functions. The grammar is specified by supplying the BNF inside +# Python documentation strings. The inspiration for this technique was borrowed +# from John Aycock's Spark parsing system. PLY might be viewed as cross between +# Spark and the GNU bison utility. +# +# The current implementation is only somewhat object-oriented. The +# LR parser itself is defined in terms of an object (which allows multiple +# parsers to co-exist). However, most of the variables used during table +# construction are defined in terms of global variables. Users shouldn't +# notice unless they are trying to define multiple parsers at the same +# time using threads (in which case they should have their head examined). +# +# This implementation supports both SLR and LALR(1) parsing. LALR(1) +# support was originally implemented by Elias Ioup (ezioup@alumni.uchicago.edu), +# using the algorithm found in Aho, Sethi, and Ullman "Compilers: Principles, +# Techniques, and Tools" (The Dragon Book). LALR(1) has since been replaced +# by the more efficient DeRemer and Pennello algorithm. +# +# :::::::: WARNING ::::::: +# +# Construction of LR parsing tables is fairly complicated and expensive. +# To make this module run fast, a *LOT* of work has been put into +# optimization---often at the expensive of readability and what might +# consider to be good Python "coding style." Modify the code at your +# own risk! +# ---------------------------------------------------------------------------- + +import re +import types +import sys +import os.path +import inspect +import warnings + +__version__ = '3.11' +__tabversion__ = '3.10' + +#----------------------------------------------------------------------------- +# === User configurable parameters === +# +# Change these to modify the default behavior of yacc (if you wish) +#----------------------------------------------------------------------------- + +yaccdebug = True # Debugging mode. If set, yacc generates a + # a 'parser.out' file in the current directory + +debug_file = 'parser.out' # Default name of the debugging file +tab_module = 'parsetab' # Default name of the table module +default_lr = 'LALR' # Default LR table generation method + +error_count = 3 # Number of symbols that must be shifted to leave recovery mode + +yaccdevel = False # Set to True if developing yacc. This turns off optimized + # implementations of certain functions. + +resultlimit = 40 # Size limit of results when running in debug mode. + +pickle_protocol = 0 # Protocol to use when writing pickle files + +# String type-checking compatibility +if sys.version_info[0] < 3: + string_types = basestring +else: + string_types = str + +MAXINT = sys.maxsize + +# This object is a stand-in for a logging object created by the +# logging module. PLY will use this by default to create things +# such as the parser.out file. If a user wants more detailed +# information, they can create their own logging object and pass +# it into PLY. + +class PlyLogger(object): + def __init__(self, f): + self.f = f + + def debug(self, msg, *args, **kwargs): + self.f.write((msg % args) + '\n') + + info = debug + + def warning(self, msg, *args, **kwargs): + self.f.write('WARNING: ' + (msg % args) + '\n') + + def error(self, msg, *args, **kwargs): + self.f.write('ERROR: ' + (msg % args) + '\n') + + critical = debug + +# Null logger is used when no output is generated. Does nothing. +class NullLogger(object): + def __getattribute__(self, name): + return self + + def __call__(self, *args, **kwargs): + return self + +# Exception raised for yacc-related errors +class YaccError(Exception): + pass + +# Format the result message that the parser produces when running in debug mode. +def format_result(r): + repr_str = repr(r) + if '\n' in repr_str: + repr_str = repr(repr_str) + if len(repr_str) > resultlimit: + repr_str = repr_str[:resultlimit] + ' ...' + result = '<%s @ 0x%x> (%s)' % (type(r).__name__, id(r), repr_str) + return result + +# Format stack entries when the parser is running in debug mode +def format_stack_entry(r): + repr_str = repr(r) + if '\n' in repr_str: + repr_str = repr(repr_str) + if len(repr_str) < 16: + return repr_str + else: + return '<%s @ 0x%x>' % (type(r).__name__, id(r)) + +# Panic mode error recovery support. This feature is being reworked--much of the +# code here is to offer a deprecation/backwards compatible transition + +_errok = None +_token = None +_restart = None +_warnmsg = '''PLY: Don't use global functions errok(), token(), and restart() in p_error(). +Instead, invoke the methods on the associated parser instance: + + def p_error(p): + ... + # Use parser.errok(), parser.token(), parser.restart() + ... + + parser = yacc.yacc() +''' + +def errok(): + warnings.warn(_warnmsg) + return _errok() + +def restart(): + warnings.warn(_warnmsg) + return _restart() + +def token(): + warnings.warn(_warnmsg) + return _token() + +# Utility function to call the p_error() function with some deprecation hacks +def call_errorfunc(errorfunc, token, parser): + global _errok, _token, _restart + _errok = parser.errok + _token = parser.token + _restart = parser.restart + r = errorfunc(token) + try: + del _errok, _token, _restart + except NameError: + pass + return r + +#----------------------------------------------------------------------------- +# === LR Parsing Engine === +# +# The following classes are used for the LR parser itself. These are not +# used during table construction and are independent of the actual LR +# table generation algorithm +#----------------------------------------------------------------------------- + +# This class is used to hold non-terminal grammar symbols during parsing. +# It normally has the following attributes set: +# .type = Grammar symbol type +# .value = Symbol value +# .lineno = Starting line number +# .endlineno = Ending line number (optional, set automatically) +# .lexpos = Starting lex position +# .endlexpos = Ending lex position (optional, set automatically) + +class YaccSymbol: + def __str__(self): + return self.type + + def __repr__(self): + return str(self) + +# This class is a wrapper around the objects actually passed to each +# grammar rule. Index lookup and assignment actually assign the +# .value attribute of the underlying YaccSymbol object. +# The lineno() method returns the line number of a given +# item (or 0 if not defined). The linespan() method returns +# a tuple of (startline,endline) representing the range of lines +# for a symbol. The lexspan() method returns a tuple (lexpos,endlexpos) +# representing the range of positional information for a symbol. + +class YaccProduction: + def __init__(self, s, stack=None): + self.slice = s + self.stack = stack + self.lexer = None + self.parser = None + + def __getitem__(self, n): + if isinstance(n, slice): + return [s.value for s in self.slice[n]] + elif n >= 0: + return self.slice[n].value + else: + return self.stack[n].value + + def __setitem__(self, n, v): + self.slice[n].value = v + + def __getslice__(self, i, j): + return [s.value for s in self.slice[i:j]] + + def __len__(self): + return len(self.slice) + + def lineno(self, n): + return getattr(self.slice[n], 'lineno', 0) + + def set_lineno(self, n, lineno): + self.slice[n].lineno = lineno + + def linespan(self, n): + startline = getattr(self.slice[n], 'lineno', 0) + endline = getattr(self.slice[n], 'endlineno', startline) + return startline, endline + + def lexpos(self, n): + return getattr(self.slice[n], 'lexpos', 0) + + def set_lexpos(self, n, lexpos): + self.slice[n].lexpos = lexpos + + def lexspan(self, n): + startpos = getattr(self.slice[n], 'lexpos', 0) + endpos = getattr(self.slice[n], 'endlexpos', startpos) + return startpos, endpos + + def error(self): + raise SyntaxError + +# ----------------------------------------------------------------------------- +# == LRParser == +# +# The LR Parsing engine. +# ----------------------------------------------------------------------------- + +class LRParser: + def __init__(self, lrtab, errorf): + self.productions = lrtab.lr_productions + self.action = lrtab.lr_action + self.goto = lrtab.lr_goto + self.errorfunc = errorf + self.set_defaulted_states() + self.errorok = True + + def errok(self): + self.errorok = True + + def restart(self): + del self.statestack[:] + del self.symstack[:] + sym = YaccSymbol() + sym.type = '$end' + self.symstack.append(sym) + self.statestack.append(0) + + # Defaulted state support. + # This method identifies parser states where there is only one possible reduction action. + # For such states, the parser can make a choose to make a rule reduction without consuming + # the next look-ahead token. This delayed invocation of the tokenizer can be useful in + # certain kinds of advanced parsing situations where the lexer and parser interact with + # each other or change states (i.e., manipulation of scope, lexer states, etc.). + # + # See: http://www.gnu.org/software/bison/manual/html_node/Default-Reductions.html#Default-Reductions + def set_defaulted_states(self): + self.defaulted_states = {} + for state, actions in self.action.items(): + rules = list(actions.values()) + if len(rules) == 1 and rules[0] < 0: + self.defaulted_states[state] = rules[0] + + def disable_defaulted_states(self): + self.defaulted_states = {} + + def parse(self, input=None, lexer=None, debug=False, tracking=False, tokenfunc=None): + if debug or yaccdevel: + if isinstance(debug, int): + debug = PlyLogger(sys.stderr) + return self.parsedebug(input, lexer, debug, tracking, tokenfunc) + elif tracking: + return self.parseopt(input, lexer, debug, tracking, tokenfunc) + else: + return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc) + + + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + # parsedebug(). + # + # This is the debugging enabled version of parse(). All changes made to the + # parsing engine should be made here. Optimized versions of this function + # are automatically created by the ply/ygen.py script. This script cuts out + # sections enclosed in markers such as this: + # + # #--! DEBUG + # statements + # #--! DEBUG + # + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + def parsedebug(self, input=None, lexer=None, debug=False, tracking=False, tokenfunc=None): + #--! parsedebug-start + lookahead = None # Current lookahead symbol + lookaheadstack = [] # Stack of lookahead symbols + actions = self.action # Local reference to action table (to avoid lookup on self.) + goto = self.goto # Local reference to goto table (to avoid lookup on self.) + prod = self.productions # Local reference to production list (to avoid lookup on self.) + defaulted_states = self.defaulted_states # Local reference to defaulted states + pslice = YaccProduction(None) # Production object passed to grammar rules + errorcount = 0 # Used during error recovery + + #--! DEBUG + debug.info('PLY: PARSE DEBUG START') + #--! DEBUG + + # If no lexer was given, we will try to use the lex module + if not lexer: + from . import lex + lexer = lex.lexer + + # Set up the lexer and parser objects on pslice + pslice.lexer = lexer + pslice.parser = self + + # If input was supplied, pass to lexer + if input is not None: + lexer.input(input) + + if tokenfunc is None: + # Tokenize function + get_token = lexer.token + else: + get_token = tokenfunc + + # Set the parser() token method (sometimes used in error recovery) + self.token = get_token + + # Set up the state and symbol stacks + + statestack = [] # Stack of parsing states + self.statestack = statestack + symstack = [] # Stack of grammar symbols + self.symstack = symstack + + pslice.stack = symstack # Put in the production + errtoken = None # Err token + + # The start state is assumed to be (0,$end) + + statestack.append(0) + sym = YaccSymbol() + sym.type = '$end' + symstack.append(sym) + state = 0 + while True: + # Get the next symbol on the input. If a lookahead symbol + # is already set, we just use that. Otherwise, we'll pull + # the next token off of the lookaheadstack or from the lexer + + #--! DEBUG + debug.debug('') + debug.debug('State : %s', state) + #--! DEBUG + + if state not in defaulted_states: + if not lookahead: + if not lookaheadstack: + lookahead = get_token() # Get the next token + else: + lookahead = lookaheadstack.pop() + if not lookahead: + lookahead = YaccSymbol() + lookahead.type = '$end' + + # Check the action table + ltype = lookahead.type + t = actions[state].get(ltype) + else: + t = defaulted_states[state] + #--! DEBUG + debug.debug('Defaulted state %s: Reduce using %d', state, -t) + #--! DEBUG + + #--! DEBUG + debug.debug('Stack : %s', + ('%s . %s' % (' '.join([xx.type for xx in symstack][1:]), str(lookahead))).lstrip()) + #--! DEBUG + + if t is not None: + if t > 0: + # shift a symbol on the stack + statestack.append(t) + state = t + + #--! DEBUG + debug.debug('Action : Shift and goto state %s', t) + #--! DEBUG + + symstack.append(lookahead) + lookahead = None + + # Decrease error count on successful shift + if errorcount: + errorcount -= 1 + continue + + if t < 0: + # reduce a symbol on the stack, emit a production + p = prod[-t] + pname = p.name + plen = p.len + + # Get production function + sym = YaccSymbol() + sym.type = pname # Production name + sym.value = None + + #--! DEBUG + if plen: + debug.info('Action : Reduce rule [%s] with %s and goto state %d', p.str, + '['+','.join([format_stack_entry(_v.value) for _v in symstack[-plen:]])+']', + goto[statestack[-1-plen]][pname]) + else: + debug.info('Action : Reduce rule [%s] with %s and goto state %d', p.str, [], + goto[statestack[-1]][pname]) + + #--! DEBUG + + if plen: + targ = symstack[-plen-1:] + targ[0] = sym + + #--! TRACKING + if tracking: + t1 = targ[1] + sym.lineno = t1.lineno + sym.lexpos = t1.lexpos + t1 = targ[-1] + sym.endlineno = getattr(t1, 'endlineno', t1.lineno) + sym.endlexpos = getattr(t1, 'endlexpos', t1.lexpos) + #--! TRACKING + + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + # The code enclosed in this section is duplicated + # below as a performance optimization. Make sure + # changes get made in both locations. + + pslice.slice = targ + + try: + # Call the grammar rule with our special slice object + del symstack[-plen:] + self.state = state + p.callable(pslice) + del statestack[-plen:] + #--! DEBUG + debug.info('Result : %s', format_result(pslice[0])) + #--! DEBUG + symstack.append(sym) + state = goto[statestack[-1]][pname] + statestack.append(state) + except SyntaxError: + # If an error was set. Enter error recovery state + lookaheadstack.append(lookahead) # Save the current lookahead token + symstack.extend(targ[1:-1]) # Put the production slice back on the stack + statestack.pop() # Pop back one state (before the reduce) + state = statestack[-1] + sym.type = 'error' + sym.value = 'error' + lookahead = sym + errorcount = error_count + self.errorok = False + + continue + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + else: + + #--! TRACKING + if tracking: + sym.lineno = lexer.lineno + sym.lexpos = lexer.lexpos + #--! TRACKING + + targ = [sym] + + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + # The code enclosed in this section is duplicated + # above as a performance optimization. Make sure + # changes get made in both locations. + + pslice.slice = targ + + try: + # Call the grammar rule with our special slice object + self.state = state + p.callable(pslice) + #--! DEBUG + debug.info('Result : %s', format_result(pslice[0])) + #--! DEBUG + symstack.append(sym) + state = goto[statestack[-1]][pname] + statestack.append(state) + except SyntaxError: + # If an error was set. Enter error recovery state + lookaheadstack.append(lookahead) # Save the current lookahead token + statestack.pop() # Pop back one state (before the reduce) + state = statestack[-1] + sym.type = 'error' + sym.value = 'error' + lookahead = sym + errorcount = error_count + self.errorok = False + + continue + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + if t == 0: + n = symstack[-1] + result = getattr(n, 'value', None) + #--! DEBUG + debug.info('Done : Returning %s', format_result(result)) + debug.info('PLY: PARSE DEBUG END') + #--! DEBUG + return result + + if t is None: + + #--! DEBUG + debug.error('Error : %s', + ('%s . %s' % (' '.join([xx.type for xx in symstack][1:]), str(lookahead))).lstrip()) + #--! DEBUG + + # We have some kind of parsing error here. To handle + # this, we are going to push the current token onto + # the tokenstack and replace it with an 'error' token. + # If there are any synchronization rules, they may + # catch it. + # + # In addition to pushing the error token, we call call + # the user defined p_error() function if this is the + # first syntax error. This function is only called if + # errorcount == 0. + if errorcount == 0 or self.errorok: + errorcount = error_count + self.errorok = False + errtoken = lookahead + if errtoken.type == '$end': + errtoken = None # End of file! + if self.errorfunc: + if errtoken and not hasattr(errtoken, 'lexer'): + errtoken.lexer = lexer + self.state = state + tok = call_errorfunc(self.errorfunc, errtoken, self) + if self.errorok: + # User must have done some kind of panic + # mode recovery on their own. The + # returned token is the next lookahead + lookahead = tok + errtoken = None + continue + else: + if errtoken: + if hasattr(errtoken, 'lineno'): + lineno = lookahead.lineno + else: + lineno = 0 + if lineno: + sys.stderr.write('yacc: Syntax error at line %d, token=%s\n' % (lineno, errtoken.type)) + else: + sys.stderr.write('yacc: Syntax error, token=%s' % errtoken.type) + else: + sys.stderr.write('yacc: Parse error in input. EOF\n') + return + + else: + errorcount = error_count + + # case 1: the statestack only has 1 entry on it. If we're in this state, the + # entire parse has been rolled back and we're completely hosed. The token is + # discarded and we just keep going. + + if len(statestack) <= 1 and lookahead.type != '$end': + lookahead = None + errtoken = None + state = 0 + # Nuke the pushback stack + del lookaheadstack[:] + continue + + # case 2: the statestack has a couple of entries on it, but we're + # at the end of the file. nuke the top entry and generate an error token + + # Start nuking entries on the stack + if lookahead.type == '$end': + # Whoa. We're really hosed here. Bail out + return + + if lookahead.type != 'error': + sym = symstack[-1] + if sym.type == 'error': + # Hmmm. Error is on top of stack, we'll just nuke input + # symbol and continue + #--! TRACKING + if tracking: + sym.endlineno = getattr(lookahead, 'lineno', sym.lineno) + sym.endlexpos = getattr(lookahead, 'lexpos', sym.lexpos) + #--! TRACKING + lookahead = None + continue + + # Create the error symbol for the first time and make it the new lookahead symbol + t = YaccSymbol() + t.type = 'error' + + if hasattr(lookahead, 'lineno'): + t.lineno = t.endlineno = lookahead.lineno + if hasattr(lookahead, 'lexpos'): + t.lexpos = t.endlexpos = lookahead.lexpos + t.value = lookahead + lookaheadstack.append(lookahead) + lookahead = t + else: + sym = symstack.pop() + #--! TRACKING + if tracking: + lookahead.lineno = sym.lineno + lookahead.lexpos = sym.lexpos + #--! TRACKING + statestack.pop() + state = statestack[-1] + + continue + + # Call an error function here + raise RuntimeError('yacc: internal parser error!!!\n') + + #--! parsedebug-end + + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + # parseopt(). + # + # Optimized version of parse() method. DO NOT EDIT THIS CODE DIRECTLY! + # This code is automatically generated by the ply/ygen.py script. Make + # changes to the parsedebug() method instead. + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + def parseopt(self, input=None, lexer=None, debug=False, tracking=False, tokenfunc=None): + #--! parseopt-start + lookahead = None # Current lookahead symbol + lookaheadstack = [] # Stack of lookahead symbols + actions = self.action # Local reference to action table (to avoid lookup on self.) + goto = self.goto # Local reference to goto table (to avoid lookup on self.) + prod = self.productions # Local reference to production list (to avoid lookup on self.) + defaulted_states = self.defaulted_states # Local reference to defaulted states + pslice = YaccProduction(None) # Production object passed to grammar rules + errorcount = 0 # Used during error recovery + + + # If no lexer was given, we will try to use the lex module + if not lexer: + from . import lex + lexer = lex.lexer + + # Set up the lexer and parser objects on pslice + pslice.lexer = lexer + pslice.parser = self + + # If input was supplied, pass to lexer + if input is not None: + lexer.input(input) + + if tokenfunc is None: + # Tokenize function + get_token = lexer.token + else: + get_token = tokenfunc + + # Set the parser() token method (sometimes used in error recovery) + self.token = get_token + + # Set up the state and symbol stacks + + statestack = [] # Stack of parsing states + self.statestack = statestack + symstack = [] # Stack of grammar symbols + self.symstack = symstack + + pslice.stack = symstack # Put in the production + errtoken = None # Err token + + # The start state is assumed to be (0,$end) + + statestack.append(0) + sym = YaccSymbol() + sym.type = '$end' + symstack.append(sym) + state = 0 + while True: + # Get the next symbol on the input. If a lookahead symbol + # is already set, we just use that. Otherwise, we'll pull + # the next token off of the lookaheadstack or from the lexer + + + if state not in defaulted_states: + if not lookahead: + if not lookaheadstack: + lookahead = get_token() # Get the next token + else: + lookahead = lookaheadstack.pop() + if not lookahead: + lookahead = YaccSymbol() + lookahead.type = '$end' + + # Check the action table + ltype = lookahead.type + t = actions[state].get(ltype) + else: + t = defaulted_states[state] + + + if t is not None: + if t > 0: + # shift a symbol on the stack + statestack.append(t) + state = t + + + symstack.append(lookahead) + lookahead = None + + # Decrease error count on successful shift + if errorcount: + errorcount -= 1 + continue + + if t < 0: + # reduce a symbol on the stack, emit a production + p = prod[-t] + pname = p.name + plen = p.len + + # Get production function + sym = YaccSymbol() + sym.type = pname # Production name + sym.value = None + + + if plen: + targ = symstack[-plen-1:] + targ[0] = sym + + #--! TRACKING + if tracking: + t1 = targ[1] + sym.lineno = t1.lineno + sym.lexpos = t1.lexpos + t1 = targ[-1] + sym.endlineno = getattr(t1, 'endlineno', t1.lineno) + sym.endlexpos = getattr(t1, 'endlexpos', t1.lexpos) + #--! TRACKING + + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + # The code enclosed in this section is duplicated + # below as a performance optimization. Make sure + # changes get made in both locations. + + pslice.slice = targ + + try: + # Call the grammar rule with our special slice object + del symstack[-plen:] + self.state = state + p.callable(pslice) + del statestack[-plen:] + symstack.append(sym) + state = goto[statestack[-1]][pname] + statestack.append(state) + except SyntaxError: + # If an error was set. Enter error recovery state + lookaheadstack.append(lookahead) # Save the current lookahead token + symstack.extend(targ[1:-1]) # Put the production slice back on the stack + statestack.pop() # Pop back one state (before the reduce) + state = statestack[-1] + sym.type = 'error' + sym.value = 'error' + lookahead = sym + errorcount = error_count + self.errorok = False + + continue + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + else: + + #--! TRACKING + if tracking: + sym.lineno = lexer.lineno + sym.lexpos = lexer.lexpos + #--! TRACKING + + targ = [sym] + + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + # The code enclosed in this section is duplicated + # above as a performance optimization. Make sure + # changes get made in both locations. + + pslice.slice = targ + + try: + # Call the grammar rule with our special slice object + self.state = state + p.callable(pslice) + symstack.append(sym) + state = goto[statestack[-1]][pname] + statestack.append(state) + except SyntaxError: + # If an error was set. Enter error recovery state + lookaheadstack.append(lookahead) # Save the current lookahead token + statestack.pop() # Pop back one state (before the reduce) + state = statestack[-1] + sym.type = 'error' + sym.value = 'error' + lookahead = sym + errorcount = error_count + self.errorok = False + + continue + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + if t == 0: + n = symstack[-1] + result = getattr(n, 'value', None) + return result + + if t is None: + + + # We have some kind of parsing error here. To handle + # this, we are going to push the current token onto + # the tokenstack and replace it with an 'error' token. + # If there are any synchronization rules, they may + # catch it. + # + # In addition to pushing the error token, we call call + # the user defined p_error() function if this is the + # first syntax error. This function is only called if + # errorcount == 0. + if errorcount == 0 or self.errorok: + errorcount = error_count + self.errorok = False + errtoken = lookahead + if errtoken.type == '$end': + errtoken = None # End of file! + if self.errorfunc: + if errtoken and not hasattr(errtoken, 'lexer'): + errtoken.lexer = lexer + self.state = state + tok = call_errorfunc(self.errorfunc, errtoken, self) + if self.errorok: + # User must have done some kind of panic + # mode recovery on their own. The + # returned token is the next lookahead + lookahead = tok + errtoken = None + continue + else: + if errtoken: + if hasattr(errtoken, 'lineno'): + lineno = lookahead.lineno + else: + lineno = 0 + if lineno: + sys.stderr.write('yacc: Syntax error at line %d, token=%s\n' % (lineno, errtoken.type)) + else: + sys.stderr.write('yacc: Syntax error, token=%s' % errtoken.type) + else: + sys.stderr.write('yacc: Parse error in input. EOF\n') + return + + else: + errorcount = error_count + + # case 1: the statestack only has 1 entry on it. If we're in this state, the + # entire parse has been rolled back and we're completely hosed. The token is + # discarded and we just keep going. + + if len(statestack) <= 1 and lookahead.type != '$end': + lookahead = None + errtoken = None + state = 0 + # Nuke the pushback stack + del lookaheadstack[:] + continue + + # case 2: the statestack has a couple of entries on it, but we're + # at the end of the file. nuke the top entry and generate an error token + + # Start nuking entries on the stack + if lookahead.type == '$end': + # Whoa. We're really hosed here. Bail out + return + + if lookahead.type != 'error': + sym = symstack[-1] + if sym.type == 'error': + # Hmmm. Error is on top of stack, we'll just nuke input + # symbol and continue + #--! TRACKING + if tracking: + sym.endlineno = getattr(lookahead, 'lineno', sym.lineno) + sym.endlexpos = getattr(lookahead, 'lexpos', sym.lexpos) + #--! TRACKING + lookahead = None + continue + + # Create the error symbol for the first time and make it the new lookahead symbol + t = YaccSymbol() + t.type = 'error' + + if hasattr(lookahead, 'lineno'): + t.lineno = t.endlineno = lookahead.lineno + if hasattr(lookahead, 'lexpos'): + t.lexpos = t.endlexpos = lookahead.lexpos + t.value = lookahead + lookaheadstack.append(lookahead) + lookahead = t + else: + sym = symstack.pop() + #--! TRACKING + if tracking: + lookahead.lineno = sym.lineno + lookahead.lexpos = sym.lexpos + #--! TRACKING + statestack.pop() + state = statestack[-1] + + continue + + # Call an error function here + raise RuntimeError('yacc: internal parser error!!!\n') + + #--! parseopt-end + + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + # parseopt_notrack(). + # + # Optimized version of parseopt() with line number tracking removed. + # DO NOT EDIT THIS CODE DIRECTLY. This code is automatically generated + # by the ply/ygen.py script. Make changes to the parsedebug() method instead. + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + def parseopt_notrack(self, input=None, lexer=None, debug=False, tracking=False, tokenfunc=None): + #--! parseopt-notrack-start + lookahead = None # Current lookahead symbol + lookaheadstack = [] # Stack of lookahead symbols + actions = self.action # Local reference to action table (to avoid lookup on self.) + goto = self.goto # Local reference to goto table (to avoid lookup on self.) + prod = self.productions # Local reference to production list (to avoid lookup on self.) + defaulted_states = self.defaulted_states # Local reference to defaulted states + pslice = YaccProduction(None) # Production object passed to grammar rules + errorcount = 0 # Used during error recovery + + + # If no lexer was given, we will try to use the lex module + if not lexer: + from . import lex + lexer = lex.lexer + + # Set up the lexer and parser objects on pslice + pslice.lexer = lexer + pslice.parser = self + + # If input was supplied, pass to lexer + if input is not None: + lexer.input(input) + + if tokenfunc is None: + # Tokenize function + get_token = lexer.token + else: + get_token = tokenfunc + + # Set the parser() token method (sometimes used in error recovery) + self.token = get_token + + # Set up the state and symbol stacks + + statestack = [] # Stack of parsing states + self.statestack = statestack + symstack = [] # Stack of grammar symbols + self.symstack = symstack + + pslice.stack = symstack # Put in the production + errtoken = None # Err token + + # The start state is assumed to be (0,$end) + + statestack.append(0) + sym = YaccSymbol() + sym.type = '$end' + symstack.append(sym) + state = 0 + while True: + # Get the next symbol on the input. If a lookahead symbol + # is already set, we just use that. Otherwise, we'll pull + # the next token off of the lookaheadstack or from the lexer + + + if state not in defaulted_states: + if not lookahead: + if not lookaheadstack: + lookahead = get_token() # Get the next token + else: + lookahead = lookaheadstack.pop() + if not lookahead: + lookahead = YaccSymbol() + lookahead.type = '$end' + + # Check the action table + ltype = lookahead.type + t = actions[state].get(ltype) + else: + t = defaulted_states[state] + + + if t is not None: + if t > 0: + # shift a symbol on the stack + statestack.append(t) + state = t + + + symstack.append(lookahead) + lookahead = None + + # Decrease error count on successful shift + if errorcount: + errorcount -= 1 + continue + + if t < 0: + # reduce a symbol on the stack, emit a production + p = prod[-t] + pname = p.name + plen = p.len + + # Get production function + sym = YaccSymbol() + sym.type = pname # Production name + sym.value = None + + + if plen: + targ = symstack[-plen-1:] + targ[0] = sym + + + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + # The code enclosed in this section is duplicated + # below as a performance optimization. Make sure + # changes get made in both locations. + + pslice.slice = targ + + try: + # Call the grammar rule with our special slice object + del symstack[-plen:] + self.state = state + p.callable(pslice) + del statestack[-plen:] + symstack.append(sym) + state = goto[statestack[-1]][pname] + statestack.append(state) + except SyntaxError: + # If an error was set. Enter error recovery state + lookaheadstack.append(lookahead) # Save the current lookahead token + symstack.extend(targ[1:-1]) # Put the production slice back on the stack + statestack.pop() # Pop back one state (before the reduce) + state = statestack[-1] + sym.type = 'error' + sym.value = 'error' + lookahead = sym + errorcount = error_count + self.errorok = False + + continue + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + else: + + + targ = [sym] + + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + # The code enclosed in this section is duplicated + # above as a performance optimization. Make sure + # changes get made in both locations. + + pslice.slice = targ + + try: + # Call the grammar rule with our special slice object + self.state = state + p.callable(pslice) + symstack.append(sym) + state = goto[statestack[-1]][pname] + statestack.append(state) + except SyntaxError: + # If an error was set. Enter error recovery state + lookaheadstack.append(lookahead) # Save the current lookahead token + statestack.pop() # Pop back one state (before the reduce) + state = statestack[-1] + sym.type = 'error' + sym.value = 'error' + lookahead = sym + errorcount = error_count + self.errorok = False + + continue + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + if t == 0: + n = symstack[-1] + result = getattr(n, 'value', None) + return result + + if t is None: + + + # We have some kind of parsing error here. To handle + # this, we are going to push the current token onto + # the tokenstack and replace it with an 'error' token. + # If there are any synchronization rules, they may + # catch it. + # + # In addition to pushing the error token, we call call + # the user defined p_error() function if this is the + # first syntax error. This function is only called if + # errorcount == 0. + if errorcount == 0 or self.errorok: + errorcount = error_count + self.errorok = False + errtoken = lookahead + if errtoken.type == '$end': + errtoken = None # End of file! + if self.errorfunc: + if errtoken and not hasattr(errtoken, 'lexer'): + errtoken.lexer = lexer + self.state = state + tok = call_errorfunc(self.errorfunc, errtoken, self) + if self.errorok: + # User must have done some kind of panic + # mode recovery on their own. The + # returned token is the next lookahead + lookahead = tok + errtoken = None + continue + else: + if errtoken: + if hasattr(errtoken, 'lineno'): + lineno = lookahead.lineno + else: + lineno = 0 + if lineno: + sys.stderr.write('yacc: Syntax error at line %d, token=%s\n' % (lineno, errtoken.type)) + else: + sys.stderr.write('yacc: Syntax error, token=%s' % errtoken.type) + else: + sys.stderr.write('yacc: Parse error in input. EOF\n') + return + + else: + errorcount = error_count + + # case 1: the statestack only has 1 entry on it. If we're in this state, the + # entire parse has been rolled back and we're completely hosed. The token is + # discarded and we just keep going. + + if len(statestack) <= 1 and lookahead.type != '$end': + lookahead = None + errtoken = None + state = 0 + # Nuke the pushback stack + del lookaheadstack[:] + continue + + # case 2: the statestack has a couple of entries on it, but we're + # at the end of the file. nuke the top entry and generate an error token + + # Start nuking entries on the stack + if lookahead.type == '$end': + # Whoa. We're really hosed here. Bail out + return + + if lookahead.type != 'error': + sym = symstack[-1] + if sym.type == 'error': + # Hmmm. Error is on top of stack, we'll just nuke input + # symbol and continue + lookahead = None + continue + + # Create the error symbol for the first time and make it the new lookahead symbol + t = YaccSymbol() + t.type = 'error' + + if hasattr(lookahead, 'lineno'): + t.lineno = t.endlineno = lookahead.lineno + if hasattr(lookahead, 'lexpos'): + t.lexpos = t.endlexpos = lookahead.lexpos + t.value = lookahead + lookaheadstack.append(lookahead) + lookahead = t + else: + sym = symstack.pop() + statestack.pop() + state = statestack[-1] + + continue + + # Call an error function here + raise RuntimeError('yacc: internal parser error!!!\n') + + #--! parseopt-notrack-end + +# ----------------------------------------------------------------------------- +# === Grammar Representation === +# +# The following functions, classes, and variables are used to represent and +# manipulate the rules that make up a grammar. +# ----------------------------------------------------------------------------- + +# regex matching identifiers +_is_identifier = re.compile(r'^[a-zA-Z0-9_-]+$') + +# ----------------------------------------------------------------------------- +# class Production: +# +# This class stores the raw information about a single production or grammar rule. +# A grammar rule refers to a specification such as this: +# +# expr : expr PLUS term +# +# Here are the basic attributes defined on all productions +# +# name - Name of the production. For example 'expr' +# prod - A list of symbols on the right side ['expr','PLUS','term'] +# prec - Production precedence level +# number - Production number. +# func - Function that executes on reduce +# file - File where production function is defined +# lineno - Line number where production function is defined +# +# The following attributes are defined or optional. +# +# len - Length of the production (number of symbols on right hand side) +# usyms - Set of unique symbols found in the production +# ----------------------------------------------------------------------------- + +class Production(object): + reduced = 0 + def __init__(self, number, name, prod, precedence=('right', 0), func=None, file='', line=0): + self.name = name + self.prod = tuple(prod) + self.number = number + self.func = func + self.callable = None + self.file = file + self.line = line + self.prec = precedence + + # Internal settings used during table construction + + self.len = len(self.prod) # Length of the production + + # Create a list of unique production symbols used in the production + self.usyms = [] + for s in self.prod: + if s not in self.usyms: + self.usyms.append(s) + + # List of all LR items for the production + self.lr_items = [] + self.lr_next = None + + # Create a string representation + if self.prod: + self.str = '%s -> %s' % (self.name, ' '.join(self.prod)) + else: + self.str = '%s -> ' % self.name + + def __str__(self): + return self.str + + def __repr__(self): + return 'Production(' + str(self) + ')' + + def __len__(self): + return len(self.prod) + + def __nonzero__(self): + return 1 + + def __getitem__(self, index): + return self.prod[index] + + # Return the nth lr_item from the production (or None if at the end) + def lr_item(self, n): + if n > len(self.prod): + return None + p = LRItem(self, n) + # Precompute the list of productions immediately following. + try: + p.lr_after = self.Prodnames[p.prod[n+1]] + except (IndexError, KeyError): + p.lr_after = [] + try: + p.lr_before = p.prod[n-1] + except IndexError: + p.lr_before = None + return p + + # Bind the production function name to a callable + def bind(self, pdict): + if self.func: + self.callable = pdict[self.func] + +# This class serves as a minimal standin for Production objects when +# reading table data from files. It only contains information +# actually used by the LR parsing engine, plus some additional +# debugging information. +class MiniProduction(object): + def __init__(self, str, name, len, func, file, line): + self.name = name + self.len = len + self.func = func + self.callable = None + self.file = file + self.line = line + self.str = str + + def __str__(self): + return self.str + + def __repr__(self): + return 'MiniProduction(%s)' % self.str + + # Bind the production function name to a callable + def bind(self, pdict): + if self.func: + self.callable = pdict[self.func] + + +# ----------------------------------------------------------------------------- +# class LRItem +# +# This class represents a specific stage of parsing a production rule. For +# example: +# +# expr : expr . PLUS term +# +# In the above, the "." represents the current location of the parse. Here +# basic attributes: +# +# name - Name of the production. For example 'expr' +# prod - A list of symbols on the right side ['expr','.', 'PLUS','term'] +# number - Production number. +# +# lr_next Next LR item. Example, if we are ' expr -> expr . PLUS term' +# then lr_next refers to 'expr -> expr PLUS . term' +# lr_index - LR item index (location of the ".") in the prod list. +# lookaheads - LALR lookahead symbols for this item +# len - Length of the production (number of symbols on right hand side) +# lr_after - List of all productions that immediately follow +# lr_before - Grammar symbol immediately before +# ----------------------------------------------------------------------------- + +class LRItem(object): + def __init__(self, p, n): + self.name = p.name + self.prod = list(p.prod) + self.number = p.number + self.lr_index = n + self.lookaheads = {} + self.prod.insert(n, '.') + self.prod = tuple(self.prod) + self.len = len(self.prod) + self.usyms = p.usyms + + def __str__(self): + if self.prod: + s = '%s -> %s' % (self.name, ' '.join(self.prod)) + else: + s = '%s -> ' % self.name + return s + + def __repr__(self): + return 'LRItem(' + str(self) + ')' + +# ----------------------------------------------------------------------------- +# rightmost_terminal() +# +# Return the rightmost terminal from a list of symbols. Used in add_production() +# ----------------------------------------------------------------------------- +def rightmost_terminal(symbols, terminals): + i = len(symbols) - 1 + while i >= 0: + if symbols[i] in terminals: + return symbols[i] + i -= 1 + return None + +# ----------------------------------------------------------------------------- +# === GRAMMAR CLASS === +# +# The following class represents the contents of the specified grammar along +# with various computed properties such as first sets, follow sets, LR items, etc. +# This data is used for critical parts of the table generation process later. +# ----------------------------------------------------------------------------- + +class GrammarError(YaccError): + pass + +class Grammar(object): + def __init__(self, terminals): + self.Productions = [None] # A list of all of the productions. The first + # entry is always reserved for the purpose of + # building an augmented grammar + + self.Prodnames = {} # A dictionary mapping the names of nonterminals to a list of all + # productions of that nonterminal. + + self.Prodmap = {} # A dictionary that is only used to detect duplicate + # productions. + + self.Terminals = {} # A dictionary mapping the names of terminal symbols to a + # list of the rules where they are used. + + for term in terminals: + self.Terminals[term] = [] + + self.Terminals['error'] = [] + + self.Nonterminals = {} # A dictionary mapping names of nonterminals to a list + # of rule numbers where they are used. + + self.First = {} # A dictionary of precomputed FIRST(x) symbols + + self.Follow = {} # A dictionary of precomputed FOLLOW(x) symbols + + self.Precedence = {} # Precedence rules for each terminal. Contains tuples of the + # form ('right',level) or ('nonassoc', level) or ('left',level) + + self.UsedPrecedence = set() # Precedence rules that were actually used by the grammer. + # This is only used to provide error checking and to generate + # a warning about unused precedence rules. + + self.Start = None # Starting symbol for the grammar + + + def __len__(self): + return len(self.Productions) + + def __getitem__(self, index): + return self.Productions[index] + + # ----------------------------------------------------------------------------- + # set_precedence() + # + # Sets the precedence for a given terminal. assoc is the associativity such as + # 'left','right', or 'nonassoc'. level is a numeric level. + # + # ----------------------------------------------------------------------------- + + def set_precedence(self, term, assoc, level): + assert self.Productions == [None], 'Must call set_precedence() before add_production()' + if term in self.Precedence: + raise GrammarError('Precedence already specified for terminal %r' % term) + if assoc not in ['left', 'right', 'nonassoc']: + raise GrammarError("Associativity must be one of 'left','right', or 'nonassoc'") + self.Precedence[term] = (assoc, level) + + # ----------------------------------------------------------------------------- + # add_production() + # + # Given an action function, this function assembles a production rule and + # computes its precedence level. + # + # The production rule is supplied as a list of symbols. For example, + # a rule such as 'expr : expr PLUS term' has a production name of 'expr' and + # symbols ['expr','PLUS','term']. + # + # Precedence is determined by the precedence of the right-most non-terminal + # or the precedence of a terminal specified by %prec. + # + # A variety of error checks are performed to make sure production symbols + # are valid and that %prec is used correctly. + # ----------------------------------------------------------------------------- + + def add_production(self, prodname, syms, func=None, file='', line=0): + + if prodname in self.Terminals: + raise GrammarError('%s:%d: Illegal rule name %r. Already defined as a token' % (file, line, prodname)) + if prodname == 'error': + raise GrammarError('%s:%d: Illegal rule name %r. error is a reserved word' % (file, line, prodname)) + if not _is_identifier.match(prodname): + raise GrammarError('%s:%d: Illegal rule name %r' % (file, line, prodname)) + + # Look for literal tokens + for n, s in enumerate(syms): + if s[0] in "'\"": + try: + c = eval(s) + if (len(c) > 1): + raise GrammarError('%s:%d: Literal token %s in rule %r may only be a single character' % + (file, line, s, prodname)) + if c not in self.Terminals: + self.Terminals[c] = [] + syms[n] = c + continue + except SyntaxError: + pass + if not _is_identifier.match(s) and s != '%prec': + raise GrammarError('%s:%d: Illegal name %r in rule %r' % (file, line, s, prodname)) + + # Determine the precedence level + if '%prec' in syms: + if syms[-1] == '%prec': + raise GrammarError('%s:%d: Syntax error. Nothing follows %%prec' % (file, line)) + if syms[-2] != '%prec': + raise GrammarError('%s:%d: Syntax error. %%prec can only appear at the end of a grammar rule' % + (file, line)) + precname = syms[-1] + prodprec = self.Precedence.get(precname) + if not prodprec: + raise GrammarError('%s:%d: Nothing known about the precedence of %r' % (file, line, precname)) + else: + self.UsedPrecedence.add(precname) + del syms[-2:] # Drop %prec from the rule + else: + # If no %prec, precedence is determined by the rightmost terminal symbol + precname = rightmost_terminal(syms, self.Terminals) + prodprec = self.Precedence.get(precname, ('right', 0)) + + # See if the rule is already in the rulemap + map = '%s -> %s' % (prodname, syms) + if map in self.Prodmap: + m = self.Prodmap[map] + raise GrammarError('%s:%d: Duplicate rule %s. ' % (file, line, m) + + 'Previous definition at %s:%d' % (m.file, m.line)) + + # From this point on, everything is valid. Create a new Production instance + pnumber = len(self.Productions) + if prodname not in self.Nonterminals: + self.Nonterminals[prodname] = [] + + # Add the production number to Terminals and Nonterminals + for t in syms: + if t in self.Terminals: + self.Terminals[t].append(pnumber) + else: + if t not in self.Nonterminals: + self.Nonterminals[t] = [] + self.Nonterminals[t].append(pnumber) + + # Create a production and add it to the list of productions + p = Production(pnumber, prodname, syms, prodprec, func, file, line) + self.Productions.append(p) + self.Prodmap[map] = p + + # Add to the global productions list + try: + self.Prodnames[prodname].append(p) + except KeyError: + self.Prodnames[prodname] = [p] + + # ----------------------------------------------------------------------------- + # set_start() + # + # Sets the starting symbol and creates the augmented grammar. Production + # rule 0 is S' -> start where start is the start symbol. + # ----------------------------------------------------------------------------- + + def set_start(self, start=None): + if not start: + start = self.Productions[1].name + if start not in self.Nonterminals: + raise GrammarError('start symbol %s undefined' % start) + self.Productions[0] = Production(0, "S'", [start]) + self.Nonterminals[start].append(0) + self.Start = start + + # ----------------------------------------------------------------------------- + # find_unreachable() + # + # Find all of the nonterminal symbols that can't be reached from the starting + # symbol. Returns a list of nonterminals that can't be reached. + # ----------------------------------------------------------------------------- + + def find_unreachable(self): + + # Mark all symbols that are reachable from a symbol s + def mark_reachable_from(s): + if s in reachable: + return + reachable.add(s) + for p in self.Prodnames.get(s, []): + for r in p.prod: + mark_reachable_from(r) + + reachable = set() + mark_reachable_from(self.Productions[0].prod[0]) + return [s for s in self.Nonterminals if s not in reachable] + + # ----------------------------------------------------------------------------- + # infinite_cycles() + # + # This function looks at the various parsing rules and tries to detect + # infinite recursion cycles (grammar rules where there is no possible way + # to derive a string of only terminals). + # ----------------------------------------------------------------------------- + + def infinite_cycles(self): + terminates = {} + + # Terminals: + for t in self.Terminals: + terminates[t] = True + + terminates['$end'] = True + + # Nonterminals: + + # Initialize to false: + for n in self.Nonterminals: + terminates[n] = False + + # Then propagate termination until no change: + while True: + some_change = False + for (n, pl) in self.Prodnames.items(): + # Nonterminal n terminates iff any of its productions terminates. + for p in pl: + # Production p terminates iff all of its rhs symbols terminate. + for s in p.prod: + if not terminates[s]: + # The symbol s does not terminate, + # so production p does not terminate. + p_terminates = False + break + else: + # didn't break from the loop, + # so every symbol s terminates + # so production p terminates. + p_terminates = True + + if p_terminates: + # symbol n terminates! + if not terminates[n]: + terminates[n] = True + some_change = True + # Don't need to consider any more productions for this n. + break + + if not some_change: + break + + infinite = [] + for (s, term) in terminates.items(): + if not term: + if s not in self.Prodnames and s not in self.Terminals and s != 'error': + # s is used-but-not-defined, and we've already warned of that, + # so it would be overkill to say that it's also non-terminating. + pass + else: + infinite.append(s) + + return infinite + + # ----------------------------------------------------------------------------- + # undefined_symbols() + # + # Find all symbols that were used the grammar, but not defined as tokens or + # grammar rules. Returns a list of tuples (sym, prod) where sym in the symbol + # and prod is the production where the symbol was used. + # ----------------------------------------------------------------------------- + def undefined_symbols(self): + result = [] + for p in self.Productions: + if not p: + continue + + for s in p.prod: + if s not in self.Prodnames and s not in self.Terminals and s != 'error': + result.append((s, p)) + return result + + # ----------------------------------------------------------------------------- + # unused_terminals() + # + # Find all terminals that were defined, but not used by the grammar. Returns + # a list of all symbols. + # ----------------------------------------------------------------------------- + def unused_terminals(self): + unused_tok = [] + for s, v in self.Terminals.items(): + if s != 'error' and not v: + unused_tok.append(s) + + return unused_tok + + # ------------------------------------------------------------------------------ + # unused_rules() + # + # Find all grammar rules that were defined, but not used (maybe not reachable) + # Returns a list of productions. + # ------------------------------------------------------------------------------ + + def unused_rules(self): + unused_prod = [] + for s, v in self.Nonterminals.items(): + if not v: + p = self.Prodnames[s][0] + unused_prod.append(p) + return unused_prod + + # ----------------------------------------------------------------------------- + # unused_precedence() + # + # Returns a list of tuples (term,precedence) corresponding to precedence + # rules that were never used by the grammar. term is the name of the terminal + # on which precedence was applied and precedence is a string such as 'left' or + # 'right' corresponding to the type of precedence. + # ----------------------------------------------------------------------------- + + def unused_precedence(self): + unused = [] + for termname in self.Precedence: + if not (termname in self.Terminals or termname in self.UsedPrecedence): + unused.append((termname, self.Precedence[termname][0])) + + return unused + + # ------------------------------------------------------------------------- + # _first() + # + # Compute the value of FIRST1(beta) where beta is a tuple of symbols. + # + # During execution of compute_first1, the result may be incomplete. + # Afterward (e.g., when called from compute_follow()), it will be complete. + # ------------------------------------------------------------------------- + def _first(self, beta): + + # We are computing First(x1,x2,x3,...,xn) + result = [] + for x in beta: + x_produces_empty = False + + # Add all the non- symbols of First[x] to the result. + for f in self.First[x]: + if f == '': + x_produces_empty = True + else: + if f not in result: + result.append(f) + + if x_produces_empty: + # We have to consider the next x in beta, + # i.e. stay in the loop. + pass + else: + # We don't have to consider any further symbols in beta. + break + else: + # There was no 'break' from the loop, + # so x_produces_empty was true for all x in beta, + # so beta produces empty as well. + result.append('') + + return result + + # ------------------------------------------------------------------------- + # compute_first() + # + # Compute the value of FIRST1(X) for all symbols + # ------------------------------------------------------------------------- + def compute_first(self): + if self.First: + return self.First + + # Terminals: + for t in self.Terminals: + self.First[t] = [t] + + self.First['$end'] = ['$end'] + + # Nonterminals: + + # Initialize to the empty set: + for n in self.Nonterminals: + self.First[n] = [] + + # Then propagate symbols until no change: + while True: + some_change = False + for n in self.Nonterminals: + for p in self.Prodnames[n]: + for f in self._first(p.prod): + if f not in self.First[n]: + self.First[n].append(f) + some_change = True + if not some_change: + break + + return self.First + + # --------------------------------------------------------------------- + # compute_follow() + # + # Computes all of the follow sets for every non-terminal symbol. The + # follow set is the set of all symbols that might follow a given + # non-terminal. See the Dragon book, 2nd Ed. p. 189. + # --------------------------------------------------------------------- + def compute_follow(self, start=None): + # If already computed, return the result + if self.Follow: + return self.Follow + + # If first sets not computed yet, do that first. + if not self.First: + self.compute_first() + + # Add '$end' to the follow list of the start symbol + for k in self.Nonterminals: + self.Follow[k] = [] + + if not start: + start = self.Productions[1].name + + self.Follow[start] = ['$end'] + + while True: + didadd = False + for p in self.Productions[1:]: + # Here is the production set + for i, B in enumerate(p.prod): + if B in self.Nonterminals: + # Okay. We got a non-terminal in a production + fst = self._first(p.prod[i+1:]) + hasempty = False + for f in fst: + if f != '' and f not in self.Follow[B]: + self.Follow[B].append(f) + didadd = True + if f == '': + hasempty = True + if hasempty or i == (len(p.prod)-1): + # Add elements of follow(a) to follow(b) + for f in self.Follow[p.name]: + if f not in self.Follow[B]: + self.Follow[B].append(f) + didadd = True + if not didadd: + break + return self.Follow + + + # ----------------------------------------------------------------------------- + # build_lritems() + # + # This function walks the list of productions and builds a complete set of the + # LR items. The LR items are stored in two ways: First, they are uniquely + # numbered and placed in the list _lritems. Second, a linked list of LR items + # is built for each production. For example: + # + # E -> E PLUS E + # + # Creates the list + # + # [E -> . E PLUS E, E -> E . PLUS E, E -> E PLUS . E, E -> E PLUS E . ] + # ----------------------------------------------------------------------------- + + def build_lritems(self): + for p in self.Productions: + lastlri = p + i = 0 + lr_items = [] + while True: + if i > len(p): + lri = None + else: + lri = LRItem(p, i) + # Precompute the list of productions immediately following + try: + lri.lr_after = self.Prodnames[lri.prod[i+1]] + except (IndexError, KeyError): + lri.lr_after = [] + try: + lri.lr_before = lri.prod[i-1] + except IndexError: + lri.lr_before = None + + lastlri.lr_next = lri + if not lri: + break + lr_items.append(lri) + lastlri = lri + i += 1 + p.lr_items = lr_items + +# ----------------------------------------------------------------------------- +# == Class LRTable == +# +# This basic class represents a basic table of LR parsing information. +# Methods for generating the tables are not defined here. They are defined +# in the derived class LRGeneratedTable. +# ----------------------------------------------------------------------------- + +class VersionError(YaccError): + pass + +class LRTable(object): + def __init__(self): + self.lr_action = None + self.lr_goto = None + self.lr_productions = None + self.lr_method = None + + def read_table(self, module): + if isinstance(module, types.ModuleType): + parsetab = module + else: + exec('import %s' % module) + parsetab = sys.modules[module] + + if parsetab._tabversion != __tabversion__: + raise VersionError('yacc table file version is out of date') + + self.lr_action = parsetab._lr_action + self.lr_goto = parsetab._lr_goto + + self.lr_productions = [] + for p in parsetab._lr_productions: + self.lr_productions.append(MiniProduction(*p)) + + self.lr_method = parsetab._lr_method + return parsetab._lr_signature + + def read_pickle(self, filename): + try: + import cPickle as pickle + except ImportError: + import pickle + + if not os.path.exists(filename): + raise ImportError + + in_f = open(filename, 'rb') + + tabversion = pickle.load(in_f) + if tabversion != __tabversion__: + raise VersionError('yacc table file version is out of date') + self.lr_method = pickle.load(in_f) + signature = pickle.load(in_f) + self.lr_action = pickle.load(in_f) + self.lr_goto = pickle.load(in_f) + productions = pickle.load(in_f) + + self.lr_productions = [] + for p in productions: + self.lr_productions.append(MiniProduction(*p)) + + in_f.close() + return signature + + # Bind all production function names to callable objects in pdict + def bind_callables(self, pdict): + for p in self.lr_productions: + p.bind(pdict) + + +# ----------------------------------------------------------------------------- +# === LR Generator === +# +# The following classes and functions are used to generate LR parsing tables on +# a grammar. +# ----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- +# digraph() +# traverse() +# +# The following two functions are used to compute set valued functions +# of the form: +# +# F(x) = F'(x) U U{F(y) | x R y} +# +# This is used to compute the values of Read() sets as well as FOLLOW sets +# in LALR(1) generation. +# +# Inputs: X - An input set +# R - A relation +# FP - Set-valued function +# ------------------------------------------------------------------------------ + +def digraph(X, R, FP): + N = {} + for x in X: + N[x] = 0 + stack = [] + F = {} + for x in X: + if N[x] == 0: + traverse(x, N, stack, F, X, R, FP) + return F + +def traverse(x, N, stack, F, X, R, FP): + stack.append(x) + d = len(stack) + N[x] = d + F[x] = FP(x) # F(X) <- F'(x) + + rel = R(x) # Get y's related to x + for y in rel: + if N[y] == 0: + traverse(y, N, stack, F, X, R, FP) + N[x] = min(N[x], N[y]) + for a in F.get(y, []): + if a not in F[x]: + F[x].append(a) + if N[x] == d: + N[stack[-1]] = MAXINT + F[stack[-1]] = F[x] + element = stack.pop() + while element != x: + N[stack[-1]] = MAXINT + F[stack[-1]] = F[x] + element = stack.pop() + +class LALRError(YaccError): + pass + +# ----------------------------------------------------------------------------- +# == LRGeneratedTable == +# +# This class implements the LR table generation algorithm. There are no +# public methods except for write() +# ----------------------------------------------------------------------------- + +class LRGeneratedTable(LRTable): + def __init__(self, grammar, method='LALR', log=None): + if method not in ['SLR', 'LALR']: + raise LALRError('Unsupported method %s' % method) + + self.grammar = grammar + self.lr_method = method + + # Set up the logger + if not log: + log = NullLogger() + self.log = log + + # Internal attributes + self.lr_action = {} # Action table + self.lr_goto = {} # Goto table + self.lr_productions = grammar.Productions # Copy of grammar Production array + self.lr_goto_cache = {} # Cache of computed gotos + self.lr0_cidhash = {} # Cache of closures + + self._add_count = 0 # Internal counter used to detect cycles + + # Diagnostic information filled in by the table generator + self.sr_conflict = 0 + self.rr_conflict = 0 + self.conflicts = [] # List of conflicts + + self.sr_conflicts = [] + self.rr_conflicts = [] + + # Build the tables + self.grammar.build_lritems() + self.grammar.compute_first() + self.grammar.compute_follow() + self.lr_parse_table() + + # Compute the LR(0) closure operation on I, where I is a set of LR(0) items. + + def lr0_closure(self, I): + self._add_count += 1 + + # Add everything in I to J + J = I[:] + didadd = True + while didadd: + didadd = False + for j in J: + for x in j.lr_after: + if getattr(x, 'lr0_added', 0) == self._add_count: + continue + # Add B --> .G to J + J.append(x.lr_next) + x.lr0_added = self._add_count + didadd = True + + return J + + # Compute the LR(0) goto function goto(I,X) where I is a set + # of LR(0) items and X is a grammar symbol. This function is written + # in a way that guarantees uniqueness of the generated goto sets + # (i.e. the same goto set will never be returned as two different Python + # objects). With uniqueness, we can later do fast set comparisons using + # id(obj) instead of element-wise comparison. + + def lr0_goto(self, I, x): + # First we look for a previously cached entry + g = self.lr_goto_cache.get((id(I), x)) + if g: + return g + + # Now we generate the goto set in a way that guarantees uniqueness + # of the result + + s = self.lr_goto_cache.get(x) + if not s: + s = {} + self.lr_goto_cache[x] = s + + gs = [] + for p in I: + n = p.lr_next + if n and n.lr_before == x: + s1 = s.get(id(n)) + if not s1: + s1 = {} + s[id(n)] = s1 + gs.append(n) + s = s1 + g = s.get('$end') + if not g: + if gs: + g = self.lr0_closure(gs) + s['$end'] = g + else: + s['$end'] = gs + self.lr_goto_cache[(id(I), x)] = g + return g + + # Compute the LR(0) sets of item function + def lr0_items(self): + C = [self.lr0_closure([self.grammar.Productions[0].lr_next])] + i = 0 + for I in C: + self.lr0_cidhash[id(I)] = i + i += 1 + + # Loop over the items in C and each grammar symbols + i = 0 + while i < len(C): + I = C[i] + i += 1 + + # Collect all of the symbols that could possibly be in the goto(I,X) sets + asyms = {} + for ii in I: + for s in ii.usyms: + asyms[s] = None + + for x in asyms: + g = self.lr0_goto(I, x) + if not g or id(g) in self.lr0_cidhash: + continue + self.lr0_cidhash[id(g)] = len(C) + C.append(g) + + return C + + # ----------------------------------------------------------------------------- + # ==== LALR(1) Parsing ==== + # + # LALR(1) parsing is almost exactly the same as SLR except that instead of + # relying upon Follow() sets when performing reductions, a more selective + # lookahead set that incorporates the state of the LR(0) machine is utilized. + # Thus, we mainly just have to focus on calculating the lookahead sets. + # + # The method used here is due to DeRemer and Pennelo (1982). + # + # DeRemer, F. L., and T. J. Pennelo: "Efficient Computation of LALR(1) + # Lookahead Sets", ACM Transactions on Programming Languages and Systems, + # Vol. 4, No. 4, Oct. 1982, pp. 615-649 + # + # Further details can also be found in: + # + # J. Tremblay and P. Sorenson, "The Theory and Practice of Compiler Writing", + # McGraw-Hill Book Company, (1985). + # + # ----------------------------------------------------------------------------- + + # ----------------------------------------------------------------------------- + # compute_nullable_nonterminals() + # + # Creates a dictionary containing all of the non-terminals that might produce + # an empty production. + # ----------------------------------------------------------------------------- + + def compute_nullable_nonterminals(self): + nullable = set() + num_nullable = 0 + while True: + for p in self.grammar.Productions[1:]: + if p.len == 0: + nullable.add(p.name) + continue + for t in p.prod: + if t not in nullable: + break + else: + nullable.add(p.name) + if len(nullable) == num_nullable: + break + num_nullable = len(nullable) + return nullable + + # ----------------------------------------------------------------------------- + # find_nonterminal_trans(C) + # + # Given a set of LR(0) items, this functions finds all of the non-terminal + # transitions. These are transitions in which a dot appears immediately before + # a non-terminal. Returns a list of tuples of the form (state,N) where state + # is the state number and N is the nonterminal symbol. + # + # The input C is the set of LR(0) items. + # ----------------------------------------------------------------------------- + + def find_nonterminal_transitions(self, C): + trans = [] + for stateno, state in enumerate(C): + for p in state: + if p.lr_index < p.len - 1: + t = (stateno, p.prod[p.lr_index+1]) + if t[1] in self.grammar.Nonterminals: + if t not in trans: + trans.append(t) + return trans + + # ----------------------------------------------------------------------------- + # dr_relation() + # + # Computes the DR(p,A) relationships for non-terminal transitions. The input + # is a tuple (state,N) where state is a number and N is a nonterminal symbol. + # + # Returns a list of terminals. + # ----------------------------------------------------------------------------- + + def dr_relation(self, C, trans, nullable): + state, N = trans + terms = [] + + g = self.lr0_goto(C[state], N) + for p in g: + if p.lr_index < p.len - 1: + a = p.prod[p.lr_index+1] + if a in self.grammar.Terminals: + if a not in terms: + terms.append(a) + + # This extra bit is to handle the start state + if state == 0 and N == self.grammar.Productions[0].prod[0]: + terms.append('$end') + + return terms + + # ----------------------------------------------------------------------------- + # reads_relation() + # + # Computes the READS() relation (p,A) READS (t,C). + # ----------------------------------------------------------------------------- + + def reads_relation(self, C, trans, empty): + # Look for empty transitions + rel = [] + state, N = trans + + g = self.lr0_goto(C[state], N) + j = self.lr0_cidhash.get(id(g), -1) + for p in g: + if p.lr_index < p.len - 1: + a = p.prod[p.lr_index + 1] + if a in empty: + rel.append((j, a)) + + return rel + + # ----------------------------------------------------------------------------- + # compute_lookback_includes() + # + # Determines the lookback and includes relations + # + # LOOKBACK: + # + # This relation is determined by running the LR(0) state machine forward. + # For example, starting with a production "N : . A B C", we run it forward + # to obtain "N : A B C ." We then build a relationship between this final + # state and the starting state. These relationships are stored in a dictionary + # lookdict. + # + # INCLUDES: + # + # Computes the INCLUDE() relation (p,A) INCLUDES (p',B). + # + # This relation is used to determine non-terminal transitions that occur + # inside of other non-terminal transition states. (p,A) INCLUDES (p', B) + # if the following holds: + # + # B -> LAT, where T -> epsilon and p' -L-> p + # + # L is essentially a prefix (which may be empty), T is a suffix that must be + # able to derive an empty string. State p' must lead to state p with the string L. + # + # ----------------------------------------------------------------------------- + + def compute_lookback_includes(self, C, trans, nullable): + lookdict = {} # Dictionary of lookback relations + includedict = {} # Dictionary of include relations + + # Make a dictionary of non-terminal transitions + dtrans = {} + for t in trans: + dtrans[t] = 1 + + # Loop over all transitions and compute lookbacks and includes + for state, N in trans: + lookb = [] + includes = [] + for p in C[state]: + if p.name != N: + continue + + # Okay, we have a name match. We now follow the production all the way + # through the state machine until we get the . on the right hand side + + lr_index = p.lr_index + j = state + while lr_index < p.len - 1: + lr_index = lr_index + 1 + t = p.prod[lr_index] + + # Check to see if this symbol and state are a non-terminal transition + if (j, t) in dtrans: + # Yes. Okay, there is some chance that this is an includes relation + # the only way to know for certain is whether the rest of the + # production derives empty + + li = lr_index + 1 + while li < p.len: + if p.prod[li] in self.grammar.Terminals: + break # No forget it + if p.prod[li] not in nullable: + break + li = li + 1 + else: + # Appears to be a relation between (j,t) and (state,N) + includes.append((j, t)) + + g = self.lr0_goto(C[j], t) # Go to next set + j = self.lr0_cidhash.get(id(g), -1) # Go to next state + + # When we get here, j is the final state, now we have to locate the production + for r in C[j]: + if r.name != p.name: + continue + if r.len != p.len: + continue + i = 0 + # This look is comparing a production ". A B C" with "A B C ." + while i < r.lr_index: + if r.prod[i] != p.prod[i+1]: + break + i = i + 1 + else: + lookb.append((j, r)) + for i in includes: + if i not in includedict: + includedict[i] = [] + includedict[i].append((state, N)) + lookdict[(state, N)] = lookb + + return lookdict, includedict + + # ----------------------------------------------------------------------------- + # compute_read_sets() + # + # Given a set of LR(0) items, this function computes the read sets. + # + # Inputs: C = Set of LR(0) items + # ntrans = Set of nonterminal transitions + # nullable = Set of empty transitions + # + # Returns a set containing the read sets + # ----------------------------------------------------------------------------- + + def compute_read_sets(self, C, ntrans, nullable): + FP = lambda x: self.dr_relation(C, x, nullable) + R = lambda x: self.reads_relation(C, x, nullable) + F = digraph(ntrans, R, FP) + return F + + # ----------------------------------------------------------------------------- + # compute_follow_sets() + # + # Given a set of LR(0) items, a set of non-terminal transitions, a readset, + # and an include set, this function computes the follow sets + # + # Follow(p,A) = Read(p,A) U U {Follow(p',B) | (p,A) INCLUDES (p',B)} + # + # Inputs: + # ntrans = Set of nonterminal transitions + # readsets = Readset (previously computed) + # inclsets = Include sets (previously computed) + # + # Returns a set containing the follow sets + # ----------------------------------------------------------------------------- + + def compute_follow_sets(self, ntrans, readsets, inclsets): + FP = lambda x: readsets[x] + R = lambda x: inclsets.get(x, []) + F = digraph(ntrans, R, FP) + return F + + # ----------------------------------------------------------------------------- + # add_lookaheads() + # + # Attaches the lookahead symbols to grammar rules. + # + # Inputs: lookbacks - Set of lookback relations + # followset - Computed follow set + # + # This function directly attaches the lookaheads to productions contained + # in the lookbacks set + # ----------------------------------------------------------------------------- + + def add_lookaheads(self, lookbacks, followset): + for trans, lb in lookbacks.items(): + # Loop over productions in lookback + for state, p in lb: + if state not in p.lookaheads: + p.lookaheads[state] = [] + f = followset.get(trans, []) + for a in f: + if a not in p.lookaheads[state]: + p.lookaheads[state].append(a) + + # ----------------------------------------------------------------------------- + # add_lalr_lookaheads() + # + # This function does all of the work of adding lookahead information for use + # with LALR parsing + # ----------------------------------------------------------------------------- + + def add_lalr_lookaheads(self, C): + # Determine all of the nullable nonterminals + nullable = self.compute_nullable_nonterminals() + + # Find all non-terminal transitions + trans = self.find_nonterminal_transitions(C) + + # Compute read sets + readsets = self.compute_read_sets(C, trans, nullable) + + # Compute lookback/includes relations + lookd, included = self.compute_lookback_includes(C, trans, nullable) + + # Compute LALR FOLLOW sets + followsets = self.compute_follow_sets(trans, readsets, included) + + # Add all of the lookaheads + self.add_lookaheads(lookd, followsets) + + # ----------------------------------------------------------------------------- + # lr_parse_table() + # + # This function constructs the parse tables for SLR or LALR + # ----------------------------------------------------------------------------- + def lr_parse_table(self): + Productions = self.grammar.Productions + Precedence = self.grammar.Precedence + goto = self.lr_goto # Goto array + action = self.lr_action # Action array + log = self.log # Logger for output + + actionp = {} # Action production array (temporary) + + log.info('Parsing method: %s', self.lr_method) + + # Step 1: Construct C = { I0, I1, ... IN}, collection of LR(0) items + # This determines the number of states + + C = self.lr0_items() + + if self.lr_method == 'LALR': + self.add_lalr_lookaheads(C) + + # Build the parser table, state by state + st = 0 + for I in C: + # Loop over each production in I + actlist = [] # List of actions + st_action = {} + st_actionp = {} + st_goto = {} + log.info('') + log.info('state %d', st) + log.info('') + for p in I: + log.info(' (%d) %s', p.number, p) + log.info('') + + for p in I: + if p.len == p.lr_index + 1: + if p.name == "S'": + # Start symbol. Accept! + st_action['$end'] = 0 + st_actionp['$end'] = p + else: + # We are at the end of a production. Reduce! + if self.lr_method == 'LALR': + laheads = p.lookaheads[st] + else: + laheads = self.grammar.Follow[p.name] + for a in laheads: + actlist.append((a, p, 'reduce using rule %d (%s)' % (p.number, p))) + r = st_action.get(a) + if r is not None: + # Whoa. Have a shift/reduce or reduce/reduce conflict + if r > 0: + # Need to decide on shift or reduce here + # By default we favor shifting. Need to add + # some precedence rules here. + + # Shift precedence comes from the token + sprec, slevel = Precedence.get(a, ('right', 0)) + + # Reduce precedence comes from rule being reduced (p) + rprec, rlevel = Productions[p.number].prec + + if (slevel < rlevel) or ((slevel == rlevel) and (rprec == 'left')): + # We really need to reduce here. + st_action[a] = -p.number + st_actionp[a] = p + if not slevel and not rlevel: + log.info(' ! shift/reduce conflict for %s resolved as reduce', a) + self.sr_conflicts.append((st, a, 'reduce')) + Productions[p.number].reduced += 1 + elif (slevel == rlevel) and (rprec == 'nonassoc'): + st_action[a] = None + else: + # Hmmm. Guess we'll keep the shift + if not rlevel: + log.info(' ! shift/reduce conflict for %s resolved as shift', a) + self.sr_conflicts.append((st, a, 'shift')) + elif r < 0: + # Reduce/reduce conflict. In this case, we favor the rule + # that was defined first in the grammar file + oldp = Productions[-r] + pp = Productions[p.number] + if oldp.line > pp.line: + st_action[a] = -p.number + st_actionp[a] = p + chosenp, rejectp = pp, oldp + Productions[p.number].reduced += 1 + Productions[oldp.number].reduced -= 1 + else: + chosenp, rejectp = oldp, pp + self.rr_conflicts.append((st, chosenp, rejectp)) + log.info(' ! reduce/reduce conflict for %s resolved using rule %d (%s)', + a, st_actionp[a].number, st_actionp[a]) + else: + raise LALRError('Unknown conflict in state %d' % st) + else: + st_action[a] = -p.number + st_actionp[a] = p + Productions[p.number].reduced += 1 + else: + i = p.lr_index + a = p.prod[i+1] # Get symbol right after the "." + if a in self.grammar.Terminals: + g = self.lr0_goto(I, a) + j = self.lr0_cidhash.get(id(g), -1) + if j >= 0: + # We are in a shift state + actlist.append((a, p, 'shift and go to state %d' % j)) + r = st_action.get(a) + if r is not None: + # Whoa have a shift/reduce or shift/shift conflict + if r > 0: + if r != j: + raise LALRError('Shift/shift conflict in state %d' % st) + elif r < 0: + # Do a precedence check. + # - if precedence of reduce rule is higher, we reduce. + # - if precedence of reduce is same and left assoc, we reduce. + # - otherwise we shift + + # Shift precedence comes from the token + sprec, slevel = Precedence.get(a, ('right', 0)) + + # Reduce precedence comes from the rule that could have been reduced + rprec, rlevel = Productions[st_actionp[a].number].prec + + if (slevel > rlevel) or ((slevel == rlevel) and (rprec == 'right')): + # We decide to shift here... highest precedence to shift + Productions[st_actionp[a].number].reduced -= 1 + st_action[a] = j + st_actionp[a] = p + if not rlevel: + log.info(' ! shift/reduce conflict for %s resolved as shift', a) + self.sr_conflicts.append((st, a, 'shift')) + elif (slevel == rlevel) and (rprec == 'nonassoc'): + st_action[a] = None + else: + # Hmmm. Guess we'll keep the reduce + if not slevel and not rlevel: + log.info(' ! shift/reduce conflict for %s resolved as reduce', a) + self.sr_conflicts.append((st, a, 'reduce')) + + else: + raise LALRError('Unknown conflict in state %d' % st) + else: + st_action[a] = j + st_actionp[a] = p + + # Print the actions associated with each terminal + _actprint = {} + for a, p, m in actlist: + if a in st_action: + if p is st_actionp[a]: + log.info(' %-15s %s', a, m) + _actprint[(a, m)] = 1 + log.info('') + # Print the actions that were not used. (debugging) + not_used = 0 + for a, p, m in actlist: + if a in st_action: + if p is not st_actionp[a]: + if not (a, m) in _actprint: + log.debug(' ! %-15s [ %s ]', a, m) + not_used = 1 + _actprint[(a, m)] = 1 + if not_used: + log.debug('') + + # Construct the goto table for this state + + nkeys = {} + for ii in I: + for s in ii.usyms: + if s in self.grammar.Nonterminals: + nkeys[s] = None + for n in nkeys: + g = self.lr0_goto(I, n) + j = self.lr0_cidhash.get(id(g), -1) + if j >= 0: + st_goto[n] = j + log.info(' %-30s shift and go to state %d', n, j) + + action[st] = st_action + actionp[st] = st_actionp + goto[st] = st_goto + st += 1 + + # ----------------------------------------------------------------------------- + # write() + # + # This function writes the LR parsing tables to a file + # ----------------------------------------------------------------------------- + + def write_table(self, tabmodule, outputdir='', signature=''): + if isinstance(tabmodule, types.ModuleType): + raise IOError("Won't overwrite existing tabmodule") + + basemodulename = tabmodule.split('.')[-1] + filename = os.path.join(outputdir, basemodulename) + '.py' + try: + f = open(filename, 'w') + + f.write(''' +# %s +# This file is automatically generated. Do not edit. +# pylint: disable=W,C,R +_tabversion = %r + +_lr_method = %r + +_lr_signature = %r + ''' % (os.path.basename(filename), __tabversion__, self.lr_method, signature)) + + # Change smaller to 0 to go back to original tables + smaller = 1 + + # Factor out names to try and make smaller + if smaller: + items = {} + + for s, nd in self.lr_action.items(): + for name, v in nd.items(): + i = items.get(name) + if not i: + i = ([], []) + items[name] = i + i[0].append(s) + i[1].append(v) + + f.write('\n_lr_action_items = {') + for k, v in items.items(): + f.write('%r:([' % k) + for i in v[0]: + f.write('%r,' % i) + f.write('],[') + for i in v[1]: + f.write('%r,' % i) + + f.write(']),') + f.write('}\n') + + f.write(''' +_lr_action = {} +for _k, _v in _lr_action_items.items(): + for _x,_y in zip(_v[0],_v[1]): + if not _x in _lr_action: _lr_action[_x] = {} + _lr_action[_x][_k] = _y +del _lr_action_items +''') + + else: + f.write('\n_lr_action = { ') + for k, v in self.lr_action.items(): + f.write('(%r,%r):%r,' % (k[0], k[1], v)) + f.write('}\n') + + if smaller: + # Factor out names to try and make smaller + items = {} + + for s, nd in self.lr_goto.items(): + for name, v in nd.items(): + i = items.get(name) + if not i: + i = ([], []) + items[name] = i + i[0].append(s) + i[1].append(v) + + f.write('\n_lr_goto_items = {') + for k, v in items.items(): + f.write('%r:([' % k) + for i in v[0]: + f.write('%r,' % i) + f.write('],[') + for i in v[1]: + f.write('%r,' % i) + + f.write(']),') + f.write('}\n') + + f.write(''' +_lr_goto = {} +for _k, _v in _lr_goto_items.items(): + for _x, _y in zip(_v[0], _v[1]): + if not _x in _lr_goto: _lr_goto[_x] = {} + _lr_goto[_x][_k] = _y +del _lr_goto_items +''') + else: + f.write('\n_lr_goto = { ') + for k, v in self.lr_goto.items(): + f.write('(%r,%r):%r,' % (k[0], k[1], v)) + f.write('}\n') + + # Write production table + f.write('_lr_productions = [\n') + for p in self.lr_productions: + if p.func: + f.write(' (%r,%r,%d,%r,%r,%d),\n' % (p.str, p.name, p.len, + p.func, os.path.basename(p.file), p.line)) + else: + f.write(' (%r,%r,%d,None,None,None),\n' % (str(p), p.name, p.len)) + f.write(']\n') + f.close() + + except IOError as e: + raise + + + # ----------------------------------------------------------------------------- + # pickle_table() + # + # This function pickles the LR parsing tables to a supplied file object + # ----------------------------------------------------------------------------- + + def pickle_table(self, filename, signature=''): + try: + import cPickle as pickle + except ImportError: + import pickle + with open(filename, 'wb') as outf: + pickle.dump(__tabversion__, outf, pickle_protocol) + pickle.dump(self.lr_method, outf, pickle_protocol) + pickle.dump(signature, outf, pickle_protocol) + pickle.dump(self.lr_action, outf, pickle_protocol) + pickle.dump(self.lr_goto, outf, pickle_protocol) + + outp = [] + for p in self.lr_productions: + if p.func: + outp.append((p.str, p.name, p.len, p.func, os.path.basename(p.file), p.line)) + else: + outp.append((str(p), p.name, p.len, None, None, None)) + pickle.dump(outp, outf, pickle_protocol) + +# ----------------------------------------------------------------------------- +# === INTROSPECTION === +# +# The following functions and classes are used to implement the PLY +# introspection features followed by the yacc() function itself. +# ----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- +# get_caller_module_dict() +# +# This function returns a dictionary containing all of the symbols defined within +# a caller further down the call stack. This is used to get the environment +# associated with the yacc() call if none was provided. +# ----------------------------------------------------------------------------- + +def get_caller_module_dict(levels): + f = sys._getframe(levels) + ldict = f.f_globals.copy() + if f.f_globals != f.f_locals: + ldict.update(f.f_locals) + return ldict + +# ----------------------------------------------------------------------------- +# parse_grammar() +# +# This takes a raw grammar rule string and parses it into production data +# ----------------------------------------------------------------------------- +def parse_grammar(doc, file, line): + grammar = [] + # Split the doc string into lines + pstrings = doc.splitlines() + lastp = None + dline = line + for ps in pstrings: + dline += 1 + p = ps.split() + if not p: + continue + try: + if p[0] == '|': + # This is a continuation of a previous rule + if not lastp: + raise SyntaxError("%s:%d: Misplaced '|'" % (file, dline)) + prodname = lastp + syms = p[1:] + else: + prodname = p[0] + lastp = prodname + syms = p[2:] + assign = p[1] + if assign != ':' and assign != '::=': + raise SyntaxError("%s:%d: Syntax error. Expected ':'" % (file, dline)) + + grammar.append((file, dline, prodname, syms)) + except SyntaxError: + raise + except Exception: + raise SyntaxError('%s:%d: Syntax error in rule %r' % (file, dline, ps.strip())) + + return grammar + +# ----------------------------------------------------------------------------- +# ParserReflect() +# +# This class represents information extracted for building a parser including +# start symbol, error function, tokens, precedence list, action functions, +# etc. +# ----------------------------------------------------------------------------- +class ParserReflect(object): + def __init__(self, pdict, log=None): + self.pdict = pdict + self.start = None + self.error_func = None + self.tokens = None + self.modules = set() + self.grammar = [] + self.error = False + + if log is None: + self.log = PlyLogger(sys.stderr) + else: + self.log = log + + # Get all of the basic information + def get_all(self): + self.get_start() + self.get_error_func() + self.get_tokens() + self.get_precedence() + self.get_pfunctions() + + # Validate all of the information + def validate_all(self): + self.validate_start() + self.validate_error_func() + self.validate_tokens() + self.validate_precedence() + self.validate_pfunctions() + self.validate_modules() + return self.error + + # Compute a signature over the grammar + def signature(self): + parts = [] + try: + if self.start: + parts.append(self.start) + if self.prec: + parts.append(''.join([''.join(p) for p in self.prec])) + if self.tokens: + parts.append(' '.join(self.tokens)) + for f in self.pfuncs: + if f[3]: + parts.append(f[3]) + except (TypeError, ValueError): + pass + return ''.join(parts) + + # ----------------------------------------------------------------------------- + # validate_modules() + # + # This method checks to see if there are duplicated p_rulename() functions + # in the parser module file. Without this function, it is really easy for + # users to make mistakes by cutting and pasting code fragments (and it's a real + # bugger to try and figure out why the resulting parser doesn't work). Therefore, + # we just do a little regular expression pattern matching of def statements + # to try and detect duplicates. + # ----------------------------------------------------------------------------- + + def validate_modules(self): + # Match def p_funcname( + fre = re.compile(r'\s*def\s+(p_[a-zA-Z_0-9]*)\(') + + for module in self.modules: + try: + lines, linen = inspect.getsourcelines(module) + except IOError: + continue + + counthash = {} + for linen, line in enumerate(lines): + linen += 1 + m = fre.match(line) + if m: + name = m.group(1) + prev = counthash.get(name) + if not prev: + counthash[name] = linen + else: + filename = inspect.getsourcefile(module) + self.log.warning('%s:%d: Function %s redefined. Previously defined on line %d', + filename, linen, name, prev) + + # Get the start symbol + def get_start(self): + self.start = self.pdict.get('start') + + # Validate the start symbol + def validate_start(self): + if self.start is not None: + if not isinstance(self.start, string_types): + self.log.error("'start' must be a string") + + # Look for error handler + def get_error_func(self): + self.error_func = self.pdict.get('p_error') + + # Validate the error function + def validate_error_func(self): + if self.error_func: + if isinstance(self.error_func, types.FunctionType): + ismethod = 0 + elif isinstance(self.error_func, types.MethodType): + ismethod = 1 + else: + self.log.error("'p_error' defined, but is not a function or method") + self.error = True + return + + eline = self.error_func.__code__.co_firstlineno + efile = self.error_func.__code__.co_filename + module = inspect.getmodule(self.error_func) + self.modules.add(module) + + argcount = self.error_func.__code__.co_argcount - ismethod + if argcount != 1: + self.log.error('%s:%d: p_error() requires 1 argument', efile, eline) + self.error = True + + # Get the tokens map + def get_tokens(self): + tokens = self.pdict.get('tokens') + if not tokens: + self.log.error('No token list is defined') + self.error = True + return + + if not isinstance(tokens, (list, tuple)): + self.log.error('tokens must be a list or tuple') + self.error = True + return + + if not tokens: + self.log.error('tokens is empty') + self.error = True + return + + self.tokens = sorted(tokens) + + # Validate the tokens + def validate_tokens(self): + # Validate the tokens. + if 'error' in self.tokens: + self.log.error("Illegal token name 'error'. Is a reserved word") + self.error = True + return + + terminals = set() + for n in self.tokens: + if n in terminals: + self.log.warning('Token %r multiply defined', n) + terminals.add(n) + + # Get the precedence map (if any) + def get_precedence(self): + self.prec = self.pdict.get('precedence') + + # Validate and parse the precedence map + def validate_precedence(self): + preclist = [] + if self.prec: + if not isinstance(self.prec, (list, tuple)): + self.log.error('precedence must be a list or tuple') + self.error = True + return + for level, p in enumerate(self.prec): + if not isinstance(p, (list, tuple)): + self.log.error('Bad precedence table') + self.error = True + return + + if len(p) < 2: + self.log.error('Malformed precedence entry %s. Must be (assoc, term, ..., term)', p) + self.error = True + return + assoc = p[0] + if not isinstance(assoc, string_types): + self.log.error('precedence associativity must be a string') + self.error = True + return + for term in p[1:]: + if not isinstance(term, string_types): + self.log.error('precedence items must be strings') + self.error = True + return + preclist.append((term, assoc, level+1)) + self.preclist = preclist + + # Get all p_functions from the grammar + def get_pfunctions(self): + p_functions = [] + for name, item in self.pdict.items(): + if not name.startswith('p_') or name == 'p_error': + continue + if isinstance(item, (types.FunctionType, types.MethodType)): + line = getattr(item, 'co_firstlineno', item.__code__.co_firstlineno) + module = inspect.getmodule(item) + p_functions.append((line, module, name, item.__doc__)) + + # Sort all of the actions by line number; make sure to stringify + # modules to make them sortable, since `line` may not uniquely sort all + # p functions + p_functions.sort(key=lambda p_function: ( + p_function[0], + str(p_function[1]), + p_function[2], + p_function[3])) + self.pfuncs = p_functions + + # Validate all of the p_functions + def validate_pfunctions(self): + grammar = [] + # Check for non-empty symbols + if len(self.pfuncs) == 0: + self.log.error('no rules of the form p_rulename are defined') + self.error = True + return + + for line, module, name, doc in self.pfuncs: + file = inspect.getsourcefile(module) + func = self.pdict[name] + if isinstance(func, types.MethodType): + reqargs = 2 + else: + reqargs = 1 + if func.__code__.co_argcount > reqargs: + self.log.error('%s:%d: Rule %r has too many arguments', file, line, func.__name__) + self.error = True + elif func.__code__.co_argcount < reqargs: + self.log.error('%s:%d: Rule %r requires an argument', file, line, func.__name__) + self.error = True + elif not func.__doc__: + self.log.warning('%s:%d: No documentation string specified in function %r (ignored)', + file, line, func.__name__) + else: + try: + parsed_g = parse_grammar(doc, file, line) + for g in parsed_g: + grammar.append((name, g)) + except SyntaxError as e: + self.log.error(str(e)) + self.error = True + + # Looks like a valid grammar rule + # Mark the file in which defined. + self.modules.add(module) + + # Secondary validation step that looks for p_ definitions that are not functions + # or functions that look like they might be grammar rules. + + for n, v in self.pdict.items(): + if n.startswith('p_') and isinstance(v, (types.FunctionType, types.MethodType)): + continue + if n.startswith('t_'): + continue + if n.startswith('p_') and n != 'p_error': + self.log.warning('%r not defined as a function', n) + if ((isinstance(v, types.FunctionType) and v.__code__.co_argcount == 1) or + (isinstance(v, types.MethodType) and v.__func__.__code__.co_argcount == 2)): + if v.__doc__: + try: + doc = v.__doc__.split(' ') + if doc[1] == ':': + self.log.warning('%s:%d: Possible grammar rule %r defined without p_ prefix', + v.__code__.co_filename, v.__code__.co_firstlineno, n) + except IndexError: + pass + + self.grammar = grammar + +# ----------------------------------------------------------------------------- +# yacc(module) +# +# Build a parser +# ----------------------------------------------------------------------------- + +def yacc(method='LALR', debug=yaccdebug, module=None, tabmodule=tab_module, start=None, + check_recursion=True, optimize=False, write_tables=True, debugfile=debug_file, + outputdir=None, debuglog=None, errorlog=None, picklefile=None): + + if tabmodule is None: + tabmodule = tab_module + + # Reference to the parsing method of the last built parser + global parse + + # If pickling is enabled, table files are not created + if picklefile: + write_tables = 0 + + if errorlog is None: + errorlog = PlyLogger(sys.stderr) + + # Get the module dictionary used for the parser + if module: + _items = [(k, getattr(module, k)) for k in dir(module)] + pdict = dict(_items) + # If no __file__ or __package__ attributes are available, try to obtain them + # from the __module__ instead + if '__file__' not in pdict: + pdict['__file__'] = sys.modules[pdict['__module__']].__file__ + if '__package__' not in pdict and '__module__' in pdict: + if hasattr(sys.modules[pdict['__module__']], '__package__'): + pdict['__package__'] = sys.modules[pdict['__module__']].__package__ + else: + pdict = get_caller_module_dict(2) + + if outputdir is None: + # If no output directory is set, the location of the output files + # is determined according to the following rules: + # - If tabmodule specifies a package, files go into that package directory + # - Otherwise, files go in the same directory as the specifying module + if isinstance(tabmodule, types.ModuleType): + srcfile = tabmodule.__file__ + else: + if '.' not in tabmodule: + srcfile = pdict['__file__'] + else: + parts = tabmodule.split('.') + pkgname = '.'.join(parts[:-1]) + exec('import %s' % pkgname) + srcfile = getattr(sys.modules[pkgname], '__file__', '') + outputdir = os.path.dirname(srcfile) + + # Determine if the module is package of a package or not. + # If so, fix the tabmodule setting so that tables load correctly + pkg = pdict.get('__package__') + if pkg and isinstance(tabmodule, str): + if '.' not in tabmodule: + tabmodule = pkg + '.' + tabmodule + + + + # Set start symbol if it's specified directly using an argument + if start is not None: + pdict['start'] = start + + # Collect parser information from the dictionary + pinfo = ParserReflect(pdict, log=errorlog) + pinfo.get_all() + + if pinfo.error: + raise YaccError('Unable to build parser') + + # Check signature against table files (if any) + signature = pinfo.signature() + + # Read the tables + try: + lr = LRTable() + if picklefile: + read_signature = lr.read_pickle(picklefile) + else: + read_signature = lr.read_table(tabmodule) + if optimize or (read_signature == signature): + try: + lr.bind_callables(pinfo.pdict) + parser = LRParser(lr, pinfo.error_func) + parse = parser.parse + return parser + except Exception as e: + errorlog.warning('There was a problem loading the table file: %r', e) + except VersionError as e: + errorlog.warning(str(e)) + except ImportError: + pass + + if debuglog is None: + if debug: + try: + debuglog = PlyLogger(open(os.path.join(outputdir, debugfile), 'w')) + except IOError as e: + errorlog.warning("Couldn't open %r. %s" % (debugfile, e)) + debuglog = NullLogger() + else: + debuglog = NullLogger() + + debuglog.info('Created by PLY version %s (http://www.dabeaz.com/ply)', __version__) + + errors = False + + # Validate the parser information + if pinfo.validate_all(): + raise YaccError('Unable to build parser') + + if not pinfo.error_func: + errorlog.warning('no p_error() function is defined') + + # Create a grammar object + grammar = Grammar(pinfo.tokens) + + # Set precedence level for terminals + for term, assoc, level in pinfo.preclist: + try: + grammar.set_precedence(term, assoc, level) + except GrammarError as e: + errorlog.warning('%s', e) + + # Add productions to the grammar + for funcname, gram in pinfo.grammar: + file, line, prodname, syms = gram + try: + grammar.add_production(prodname, syms, funcname, file, line) + except GrammarError as e: + errorlog.error('%s', e) + errors = True + + # Set the grammar start symbols + try: + if start is None: + grammar.set_start(pinfo.start) + else: + grammar.set_start(start) + except GrammarError as e: + errorlog.error(str(e)) + errors = True + + if errors: + raise YaccError('Unable to build parser') + + # Verify the grammar structure + undefined_symbols = grammar.undefined_symbols() + for sym, prod in undefined_symbols: + errorlog.error('%s:%d: Symbol %r used, but not defined as a token or a rule', prod.file, prod.line, sym) + errors = True + + unused_terminals = grammar.unused_terminals() + if unused_terminals: + debuglog.info('') + debuglog.info('Unused terminals:') + debuglog.info('') + for term in unused_terminals: + errorlog.warning('Token %r defined, but not used', term) + debuglog.info(' %s', term) + + # Print out all productions to the debug log + if debug: + debuglog.info('') + debuglog.info('Grammar') + debuglog.info('') + for n, p in enumerate(grammar.Productions): + debuglog.info('Rule %-5d %s', n, p) + + # Find unused non-terminals + unused_rules = grammar.unused_rules() + for prod in unused_rules: + errorlog.warning('%s:%d: Rule %r defined, but not used', prod.file, prod.line, prod.name) + + if len(unused_terminals) == 1: + errorlog.warning('There is 1 unused token') + if len(unused_terminals) > 1: + errorlog.warning('There are %d unused tokens', len(unused_terminals)) + + if len(unused_rules) == 1: + errorlog.warning('There is 1 unused rule') + if len(unused_rules) > 1: + errorlog.warning('There are %d unused rules', len(unused_rules)) + + if debug: + debuglog.info('') + debuglog.info('Terminals, with rules where they appear') + debuglog.info('') + terms = list(grammar.Terminals) + terms.sort() + for term in terms: + debuglog.info('%-20s : %s', term, ' '.join([str(s) for s in grammar.Terminals[term]])) + + debuglog.info('') + debuglog.info('Nonterminals, with rules where they appear') + debuglog.info('') + nonterms = list(grammar.Nonterminals) + nonterms.sort() + for nonterm in nonterms: + debuglog.info('%-20s : %s', nonterm, ' '.join([str(s) for s in grammar.Nonterminals[nonterm]])) + debuglog.info('') + + if check_recursion: + unreachable = grammar.find_unreachable() + for u in unreachable: + errorlog.warning('Symbol %r is unreachable', u) + + infinite = grammar.infinite_cycles() + for inf in infinite: + errorlog.error('Infinite recursion detected for symbol %r', inf) + errors = True + + unused_prec = grammar.unused_precedence() + for term, assoc in unused_prec: + errorlog.error('Precedence rule %r defined for unknown symbol %r', assoc, term) + errors = True + + if errors: + raise YaccError('Unable to build parser') + + # Run the LRGeneratedTable on the grammar + # if debug: + # errorlog.debug('Generating %s tables', method) + + lr = LRGeneratedTable(grammar, method, debuglog) + + if debug: + num_sr = len(lr.sr_conflicts) + + # # Report shift/reduce and reduce/reduce conflicts + # if num_sr == 1: + # errorlog.warning('1 shift/reduce conflict') + # elif num_sr > 1: + # errorlog.warning('%d shift/reduce conflicts', num_sr) + + # num_rr = len(lr.rr_conflicts) + # if num_rr == 1: + # errorlog.warning('1 reduce/reduce conflict') + # elif num_rr > 1: + # errorlog.warning('%d reduce/reduce conflicts', num_rr) + + # Write out conflicts to the output file + if debug and (lr.sr_conflicts or lr.rr_conflicts): + debuglog.warning('') + debuglog.warning('Conflicts:') + debuglog.warning('') + + for state, tok, resolution in lr.sr_conflicts: + debuglog.warning('shift/reduce conflict for %s in state %d resolved as %s', tok, state, resolution) + + already_reported = set() + for state, rule, rejected in lr.rr_conflicts: + if (state, id(rule), id(rejected)) in already_reported: + continue + debuglog.warning('reduce/reduce conflict in state %d resolved using rule (%s)', state, rule) + debuglog.warning('rejected rule (%s) in state %d', rejected, state) + errorlog.warning('reduce/reduce conflict in state %d resolved using rule (%s)', state, rule) + errorlog.warning('rejected rule (%s) in state %d', rejected, state) + already_reported.add((state, id(rule), id(rejected))) + + warned_never = [] + for state, rule, rejected in lr.rr_conflicts: + if not rejected.reduced and (rejected not in warned_never): + debuglog.warning('Rule (%s) is never reduced', rejected) + errorlog.warning('Rule (%s) is never reduced', rejected) + warned_never.append(rejected) + + # Write the table file if requested + if write_tables: + try: + lr.write_table(tabmodule, outputdir, signature) + if tabmodule in sys.modules: + del sys.modules[tabmodule] + except IOError as e: + errorlog.warning("Couldn't create %r. %s" % (tabmodule, e)) + + # Write a pickled version of the tables + if picklefile: + try: + lr.pickle_table(picklefile, signature) + except IOError as e: + errorlog.warning("Couldn't create %r. %s" % (picklefile, e)) + + # Build the parser + lr.bind_callables(pinfo.pdict) + parser = LRParser(lr, pinfo.error_func) + + parse = parser.parse + return parser diff --git a/src/ply/ygen.py b/src/ply/ygen.py new file mode 100644 index 000000000..03b93180a --- /dev/null +++ b/src/ply/ygen.py @@ -0,0 +1,69 @@ +# ply: ygen.py +# +# This is a support program that auto-generates different versions of the YACC parsing +# function with different features removed for the purposes of performance. +# +# Users should edit the method LRParser.parsedebug() in yacc.py. The source code +# for that method is then used to create the other methods. See the comments in +# yacc.py for further details. + +import os.path +import shutil + +def get_source_range(lines, tag): + srclines = enumerate(lines) + start_tag = '#--! %s-start' % tag + end_tag = '#--! %s-end' % tag + + for start_index, line in srclines: + if line.strip().startswith(start_tag): + break + + for end_index, line in srclines: + if line.strip().endswith(end_tag): + break + + return (start_index + 1, end_index) + +def filter_section(lines, tag): + filtered_lines = [] + include = True + tag_text = '#--! %s' % tag + for line in lines: + if line.strip().startswith(tag_text): + include = not include + elif include: + filtered_lines.append(line) + return filtered_lines + +def main(): + dirname = os.path.dirname(__file__) + shutil.copy2(os.path.join(dirname, 'yacc.py'), os.path.join(dirname, 'yacc.py.bak')) + with open(os.path.join(dirname, 'yacc.py'), 'r') as f: + lines = f.readlines() + + parse_start, parse_end = get_source_range(lines, 'parsedebug') + parseopt_start, parseopt_end = get_source_range(lines, 'parseopt') + parseopt_notrack_start, parseopt_notrack_end = get_source_range(lines, 'parseopt-notrack') + + # Get the original source + orig_lines = lines[parse_start:parse_end] + + # Filter the DEBUG sections out + parseopt_lines = filter_section(orig_lines, 'DEBUG') + + # Filter the TRACKING sections out + parseopt_notrack_lines = filter_section(parseopt_lines, 'TRACKING') + + # Replace the parser source sections with updated versions + lines[parseopt_notrack_start:parseopt_notrack_end] = parseopt_notrack_lines + lines[parseopt_start:parseopt_end] = parseopt_lines + + lines = [line.rstrip()+'\n' for line in lines] + with open(os.path.join(dirname, 'yacc.py'), 'w') as f: + f.writelines(lines) + + print('Updated yacc.py') + +if __name__ == '__main__': + main() diff --git a/src/semantics.py b/src/semantics.py index b6d98f964..ca4558d74 100644 --- a/src/semantics.py +++ b/src/semantics.py @@ -56,7 +56,7 @@ def visit(self, node): print(SemanticError(node.line, node.index, "Redefinition of basic class {}.".format(node.type))) elif self.types.is_defined(node.type): self.errors = True - print(SemanticError(node.line, node.index, "Classes may not be redefined")) + print(SemanticError(node.line, node.index-2, "Classes may not be redefined")) elif node.inherits in ["Int", "String", "Bool"]: self.errors = True print(SemanticError(node.line, node.index2, "Class {} cannot inherit class {}.".format(node.type, node.inherits))) From 430bb770c482f6c625fe240c5edf63ba7cced375 Mon Sep 17 00:00:00 2001 From: Pablo A Fuentes <91356359+pfuentes2021@users.noreply.github.com> Date: Sat, 25 Sep 2021 21:13:54 -0400 Subject: [PATCH 4/9] Add files via upload --- src/main.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.py b/src/main.py index 9569254fb..0c3e8d116 100644 --- a/src/main.py +++ b/src/main.py @@ -12,13 +12,13 @@ def main(): if len(files) == 0: print(CompilerError(0, 0, "No file is given to coolc compiler.")) - return + exit(1) # Check all files have the *.cl extension. for file in files: if not str(file).endswith(".cl"): print(CompilerError(0, 0, "Cool program files must end with a .cl extension.")) - return + exit(1) input = "" @@ -29,23 +29,23 @@ def main(): input += file.read() except (IOError, FileNotFoundError): print(CompilerError(0, 0, "Error! File \"{0}\" was not found".format(file))) - return + exit(1) #Lexical and Syntax Analysis lexer = MyLexer(input) lexer.build() if lexer.check(): - exit() + exit(1) parser = MyParser(lexer) parser.build() ast = parser.parse(input) if parser.errors: - exit() + exit(1) #Semantic and Types Analysis st = SemanticsAndTypes(ast) if not st.check(): - exit() + exit(1) #Code Generation ctcil = CodeToCIL(st.types) From 659a52859975938d044ab603e27072cfdf43831a Mon Sep 17 00:00:00 2001 From: Pablo A Fuentes <91356359+pfuentes2021@users.noreply.github.com> Date: Mon, 27 Sep 2021 10:07:20 -0400 Subject: [PATCH 5/9] ultima prueba --- src/check_types.py | 4 ++-- src/cool_ast.py | 16 ++++++++-------- src/main.py | 33 ++++++++++++--------------------- src/my_parser.py | 12 ++++++------ 4 files changed, 28 insertions(+), 37 deletions(-) diff --git a/src/check_types.py b/src/check_types.py index 607648df1..e96c47b8b 100644 --- a/src/check_types.py +++ b/src/check_types.py @@ -126,11 +126,11 @@ def visit(self, node, list): self.visit(node.variable, "case") if node.variable.type in list: self.errors = True - print(SemanticError(node.line, node.index, "Duplicate branch {} in case statement.".format(node.variable.type.name))) + print(SemanticError(node.line, node.index2, "Duplicate branch {} in case statement.".format(node.variable.type.name))) aux = self.visit(node.expr) if aux == None: self.errors = True - print(SemanticError(node.line, node.index, "The expresion is None")) + print(SemanticError(node.line, node.index2, "The expresion is None")) else: node.type_expr = aux return node.type_expr diff --git a/src/cool_ast.py b/src/cool_ast.py index 18f15f866..c63d3fde0 100644 --- a/src/cool_ast.py +++ b/src/cool_ast.py @@ -34,7 +34,7 @@ class UtilNode(Node): pass class DeclarationNode(UtilNode): - def __init__(self, id, type, expr, line, index, index2, index3): + def __init__(self, id, type, expr, line, index, index2=0, index3=0): UtilNode.__init__(self) self.id = id self.type = type @@ -58,7 +58,7 @@ def __init__(self, id, params, type_ret, body, line=0, index=0, index2=0): self.info = None class AssignNode(AtomicNode): - def __init__(self, id, expr, line, index, index2): + def __init__(self, id, expr, line, index=0, index2=0): AtomicNode.__init__(self) self.id = id self.expr = expr @@ -68,7 +68,7 @@ def __init__(self, id, expr, line, index, index2): self.var_info = None class WhileNode(AtomicNode): - def __init__(self, conditional, expr, line, index, index2): + def __init__(self, conditional, expr, line, index, index2=0): AtomicNode.__init__(self) self.conditional = conditional self.expr = expr @@ -77,7 +77,7 @@ def __init__(self, conditional, expr, line, index, index2): self.index2 = index2 class IfNode(AtomicNode): - def __init__(self, conditional, expr_then, expr_else, line, index): + def __init__(self, conditional, expr_then, expr_else, line, index=0): AtomicNode.__init__(self) self.conditional = conditional self.expr_then = expr_then @@ -102,7 +102,7 @@ def __init__(self, expr, case_list, line, index): self.index = index class CaseItemNode(AtomicNode): - def __init__(self, variable, expr, line, index, index2): + def __init__(self, variable, expr, line, index, index2=0): AtomicNode.__init__(self) self.variable = variable self.expr = expr @@ -131,7 +131,7 @@ def __init__(self, variable, id_method, params, line=0, index=0, index2=0): self.type_method = None class DispatchParentInstanceNode(ExpressionNode): - def __init__(self, variable, id_parent, id_method, params, line, index, index2, index3): + def __init__(self, variable, id_parent, id_method, params, line, index, index2=0, index3=0): ExpressionNode.__init__(self) self.variable = variable self.id_parent = id_parent @@ -150,7 +150,7 @@ def __init__(self, expr_list, line, index): self.index = index class BinaryOperatorNode(ExpressionNode): - def __init__(self, left, right, line, index, index2): + def __init__(self, left, right, line, index, index2=0): ExpressionNode.__init__(self) self.left = left self.right = right @@ -171,7 +171,7 @@ class DivNode(BinaryOperatorNode): pass class UnaryOperator(ExpressionNode): - def __init__(self, expr, line, index, index2): + def __init__(self, expr, line, index, index2=0): ExpressionNode.__init__(self) self.expr = expr self.line = line diff --git a/src/main.py b/src/main.py index 0c3e8d116..fa857fd58 100644 --- a/src/main.py +++ b/src/main.py @@ -7,29 +7,20 @@ from code_gen import CodeGen def main(): - files = sys.argv[1:] - #files = ["C:\\Users\\PabloAdrianFuentes\\Desktop\\cool-compiler-2021-master2\\tests\\parser\\assignment2.cl"] - - if len(files) == 0: - print(CompilerError(0, 0, "No file is given to coolc compiler.")) - exit(1) - # Check all files have the *.cl extension. - for file in files: - if not str(file).endswith(".cl"): + input_file = sys.argv[1] + + if not str(input_file).endswith(".cl"): print(CompilerError(0, 0, "Cool program files must end with a .cl extension.")) exit(1) input = "" - - # Read all files source codes and store it in memory. - for file in files: - try: - with open(file, encoding="utf-8") as file: - input += file.read() - except (IOError, FileNotFoundError): - print(CompilerError(0, 0, "Error! File \"{0}\" was not found".format(file))) - exit(1) + try: + with open(input_file, encoding="utf-8") as file: + input += file.read() + except (IOError, FileNotFoundError): + print(CompilerError(0, 0, "Error! File \"{}\" was not found".format(input_file))) + exit(1) #Lexical and Syntax Analysis lexer = MyLexer(input) @@ -53,9 +44,9 @@ def main(): cg = CodeGen() cg.visit(cil, st.types) - f = open(files[0][:-3] + ".mips", 'w') - f.writelines(cg.output) - f.close() + with open(input_file[0:-3] + ".mips", 'w') as file: + file.writelines(cg.output) + file.close() if __name__ == '__main__': main() \ No newline at end of file diff --git a/src/my_parser.py b/src/my_parser.py index 8474b1327..e46ee522c 100644 --- a/src/my_parser.py +++ b/src/my_parser.py @@ -16,10 +16,10 @@ def build(self, **kwargs): self.parser = yacc.yacc(module=self, **kwargs) def parse(self, code): - try: - return self.parser.parse(code) - except: - return None + #try: + return self.parser.parse(code) + #except: + # return None #Precedence rules precedence = ( @@ -155,13 +155,13 @@ def p_case_expresion(self, parse): def p_case_list(self, parse): '''case_list : declare_method ACTION expr SEMICOLON case_list_a''' - parse[0] = [ast.CaseItemNode(parse[1], parse[3], parse[1].line, parse[1].index2)] + parse[5] + parse[0] = [ast.CaseItemNode(parse[1], parse[3], parse[1].line, parse[1].index, parse[1].index2)] + parse[5] def p_case_list_a(self, parse): '''case_list_a : declare_method ACTION expr SEMICOLON case_list_a | empty''' if len(parse) > 2: - parse[0] = [ast.CaseItemNode(parse[1], parse[3], parse[1].line, parse[1].index2)] + parse[5] + parse[0] = [ast.CaseItemNode(parse[1], parse[3], parse[1].line, parse[1].index, parse[1].index2)] + parse[5] else: parse[0] = [] From fda9d8fcaa6f5aa8000113efb04a9414a2de0ecc Mon Sep 17 00:00:00 2001 From: Pablo A Fuentes <91356359+pfuentes2021@users.noreply.github.com> Date: Mon, 27 Sep 2021 10:07:56 -0400 Subject: [PATCH 6/9] informe --- doc/Informe.pdf | Bin 0 -> 145631 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/Informe.pdf diff --git a/doc/Informe.pdf b/doc/Informe.pdf new file mode 100644 index 0000000000000000000000000000000000000000..385836023fe491f046c7406f5c064aa312f57073 GIT binary patch literal 145631 zcmdqIbyQr-wl|6d_fBwkx2AD-cekL8yE{P=0tA=fuE7E!KyY`r1a}A;+~qadXWz5; zz304p@A$s){&=jhSXFD)l$uiA>o=>ZRV1XC*;%;Jkg2~y{?L%w$=JvoO>NMS1q4_% zyq&;Dkhd-S27^vu^Ov_iGw8_*p*pQot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col3 z=YUCZzz`fTBnJ$|0pk!Gz?^T27dQtVa1J~Gziig!zyr>K2N0o~bvf_==4i7V2Oe+^ zJft?-4240ZHpL_aBE^9RAh&5;AjUUi9C%1^;336<2N0*5`{Td^!C^iS8@T~7iQvEk z!GQ;Y0}liT9taLR5FB_QIPgGl-~p^af8`6z2WI2D4~3yn8{c1~6a>BT9YjhYHtIs5 z5Dap|8Ueh%Qb26{Wj%mOL13s2>%lsP*{~h}no=9rl64I8T@2aT7!fT9HoV-xhWKS0 zL_z-7_r9;Yn~{y(*9`zL35|jBavwXUtbU%C``fMnYzqG$#(_0#2o9jHHi6f(15G>2 S^;^Jeo9sqNNn!r5``-a}bY^n^ literal 0 HcmV?d00001 From 93f4fa937a2464e7ae35d9256adca52c104cc5fc Mon Sep 17 00:00:00 2001 From: Pablo A Fuentes <91356359+pfuentes2021@users.noreply.github.com> Date: Mon, 27 Sep 2021 15:42:56 -0400 Subject: [PATCH 7/9] Add files via upload --- src/coolc.sh | 2 +- src/main.py | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/coolc.sh b/src/coolc.sh index 8001a7f0d..43d23058f 100755 --- a/src/coolc.sh +++ b/src/coolc.sh @@ -11,4 +11,4 @@ echo "Copyright (c) 2021 School of Math and Computer Science, University of Hava # Llamar al compilador # echo "Compiling $INPUT_FILE into $OUTPUT_FILE" -python3 main.py $INPUT_FILE \ No newline at end of file +python main.py ${INPUT_FILE} ${OUTPUT_FILE} \ No newline at end of file diff --git a/src/main.py b/src/main.py index fa857fd58..313d03388 100644 --- a/src/main.py +++ b/src/main.py @@ -6,21 +6,17 @@ from code_to_cil import CodeToCIL from code_gen import CodeGen -def main(): input_file = sys.argv[1] - if not str(input_file).endswith(".cl"): - print(CompilerError(0, 0, "Cool program files must end with a .cl extension.")) - exit(1) + # if not str(input_file).endswith(".cl"): + # print(CompilerError(0, 0, "Cool program files must end with a .cl extension.")) + # exit(1) input = "" - try: with open(input_file, encoding="utf-8") as file: - input += file.read() - except (IOError, FileNotFoundError): - print(CompilerError(0, 0, "Error! File \"{}\" was not found".format(input_file))) - exit(1) + input = file.read() + #Lexical and Syntax Analysis lexer = MyLexer(input) @@ -47,6 +43,4 @@ def main(): with open(input_file[0:-3] + ".mips", 'w') as file: file.writelines(cg.output) file.close() - -if __name__ == '__main__': - main() \ No newline at end of file + \ No newline at end of file From 5b692a44bbcb4fde40b082cd66aac6a0ff4b7811 Mon Sep 17 00:00:00 2001 From: Pablo A Fuentes <91356359+pfuentes2021@users.noreply.github.com> Date: Mon, 27 Sep 2021 15:45:17 -0400 Subject: [PATCH 8/9] Add files via upload --- src/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.py b/src/main.py index 313d03388..793822c03 100644 --- a/src/main.py +++ b/src/main.py @@ -6,7 +6,6 @@ from code_to_cil import CodeToCIL from code_gen import CodeGen - input_file = sys.argv[1] # if not str(input_file).endswith(".cl"): @@ -14,8 +13,8 @@ # exit(1) input = "" - with open(input_file, encoding="utf-8") as file: - input = file.read() + with open(input_file, encoding="utf-8") as file: + input = file.read() #Lexical and Syntax Analysis From 9e6b36a7d6d00f8845978ca0de31321bc9e0bc5f Mon Sep 17 00:00:00 2001 From: Pablo A Fuentes <91356359+pfuentes2021@users.noreply.github.com> Date: Mon, 27 Sep 2021 16:41:28 -0400 Subject: [PATCH 9/9] Add files via upload --- src/main.py | 54 ++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/main.py b/src/main.py index 793822c03..79a5b4b99 100644 --- a/src/main.py +++ b/src/main.py @@ -6,40 +6,40 @@ from code_to_cil import CodeToCIL from code_gen import CodeGen - input_file = sys.argv[1] + +input_file = sys.argv[1] # if not str(input_file).endswith(".cl"): # print(CompilerError(0, 0, "Cool program files must end with a .cl extension.")) # exit(1) - input = "" - with open(input_file, encoding="utf-8") as file: - input = file.read() +input = "" +with open(input_file, encoding="utf-8") as file: + input = file.read() - #Lexical and Syntax Analysis - lexer = MyLexer(input) - lexer.build() - if lexer.check(): - exit(1) - parser = MyParser(lexer) - parser.build() - ast = parser.parse(input) - if parser.errors: - exit(1) +#Lexical and Syntax Analysis +lexer = MyLexer(input) +lexer.build() +if lexer.check(): + exit(1) +parser = MyParser(lexer) +parser.build() +ast = parser.parse(input) +if parser.errors: + exit(1) - #Semantic and Types Analysis - st = SemanticsAndTypes(ast) - if not st.check(): - exit(1) +#Semantic and Types Analysis +st = SemanticsAndTypes(ast) +if not st.check(): + exit(1) - #Code Generation - ctcil = CodeToCIL(st.types) - cil = ctcil.visit(ast) - cg = CodeGen() - cg.visit(cil, st.types) +#Code Generation +ctcil = CodeToCIL(st.types) +cil = ctcil.visit(ast) +cg = CodeGen() +cg.visit(cil, st.types) - with open(input_file[0:-3] + ".mips", 'w') as file: - file.writelines(cg.output) - file.close() - \ No newline at end of file +with open(input_file[0:-3] + ".mips", 'w') as file: + file.writelines(cg.output) + file.close()