aboutsummaryrefslogtreecommitdiff
path: root/compilador/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'compilador/parser.py')
-rw-r--r--compilador/parser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/compilador/parser.py b/compilador/parser.py
index 951b517..f75f817 100644
--- a/compilador/parser.py
+++ b/compilador/parser.py
@@ -24,6 +24,7 @@ class Selector(Enum):
class Parser:
def __init__(self, input_file: str):
+ self.input_file = input_file
self.arbol = Arbol()
self.pila_selector = [
[Selector.NINGUNO, []] # selector, recolector
@@ -41,7 +42,7 @@ class Parser:
r = self.procesar(t)
if r == Control.ERROR: return 1
- print(str(self.arbol))
+ self.arbol.render(self.input_file + '.gv')
return 0
def procesar (self, t: LexToken):