diff --git a/.gitignore b/.gitignore
index 4acafde18..3dfe8c4b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -408,3 +408,5 @@ dmypy.json
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
+node_modules
+/2
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 000000000..13566b81b
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/.idea/.gitignore b/.idea/.idea/.gitignore
new file mode 100644
index 000000000..73f69e095
--- /dev/null
+++ b/.idea/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/.idea/.idea/.idea.iml b/.idea/.idea/.idea.iml
new file mode 100644
index 000000000..d0876a78d
--- /dev/null
+++ b/.idea/.idea/.idea.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea/inspectionProfiles/Project_Default.xml b/.idea/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 000000000..ea07b7d32
--- /dev/null
+++ b/.idea/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea/inspectionProfiles/profiles_settings.xml b/.idea/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 000000000..105ce2da2
--- /dev/null
+++ b/.idea/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea/misc.xml b/.idea/.idea/misc.xml
new file mode 100644
index 000000000..d1e22ecb8
--- /dev/null
+++ b/.idea/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea/modules.xml b/.idea/.idea/modules.xml
new file mode 100644
index 000000000..08f54a6d3
--- /dev/null
+++ b/.idea/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/cool-compiler-2021.iml b/.idea/cool-compiler-2021.iml
new file mode 100644
index 000000000..308e5e062
--- /dev/null
+++ b/.idea/cool-compiler-2021.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 000000000..ea07b7d32
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 000000000..105ce2da2
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/main.py b/.idea/main.py
new file mode 100644
index 000000000..2b1173faa
--- /dev/null
+++ b/.idea/main.py
@@ -0,0 +1,16 @@
+# This is a sample Python script.
+
+# Press Ctrl+F5 to execute it or replace it with your code.
+# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
+
+
+def print_hi(name):
+ # Use a breakpoint in the code line below to debug your script.
+ print(f'Hi, {name}') # Press F9 to toggle the breakpoint.
+
+
+# Press the green button in the gutter to run the script.
+if __name__ == '__main__':
+ print_hi('PyCharm')
+
+# See PyCharm help at https://www.jetbrains.com/help/pycharm/
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 000000000..b3f665d63
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 000000000..b174ac29c
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 000000000..94a25f7f4
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 000000000..2c391c601
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,14 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Python: Module",
+ "type": "python",
+ "request": "launch",
+ "module": "src"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Pipfile b/Pipfile
new file mode 100644
index 000000000..c78fabba6
--- /dev/null
+++ b/Pipfile
@@ -0,0 +1,14 @@
+[[source]]
+url = "https://pypi.org/simple"
+verify_ssl = true
+name = "pypi"
+
+[packages]
+pytest = "*"
+pytest-ordering = "*"
+ply = "*"
+
+[dev-packages]
+
+[requires]
+python_version = "3.8"
diff --git a/Pipfile.lock b/Pipfile.lock
new file mode 100644
index 000000000..f2d2ca3da
--- /dev/null
+++ b/Pipfile.lock
@@ -0,0 +1,101 @@
+{
+ "_meta": {
+ "hash": {
+ "sha256": "43725ac1dca09ce12c76d47fe2eec1e6306e83acbf5e8b5e427f76bcb4acdd95"
+ },
+ "pipfile-spec": 6,
+ "requires": {
+ "python_version": "3.8"
+ },
+ "sources": [
+ {
+ "name": "pypi",
+ "url": "https://pypi.org/simple",
+ "verify_ssl": true
+ }
+ ]
+ },
+ "default": {
+ "attrs": {
+ "hashes": [
+ "sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6",
+ "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700"
+ ],
+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
+ "version": "==20.3.0"
+ },
+ "iniconfig": {
+ "hashes": [
+ "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3",
+ "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"
+ ],
+ "version": "==1.1.1"
+ },
+ "packaging": {
+ "hashes": [
+ "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5",
+ "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"
+ ],
+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
+ "version": "==20.9"
+ },
+ "pluggy": {
+ "hashes": [
+ "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0",
+ "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"
+ ],
+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
+ "version": "==0.13.1"
+ },
+ "ply": {
+ "hashes": [
+ "sha256:00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3",
+ "sha256:096f9b8350b65ebd2fd1346b12452efe5b9607f7482813ffca50c22722a807ce"
+ ],
+ "index": "pypi",
+ "version": "==3.11"
+ },
+ "py": {
+ "hashes": [
+ "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3",
+ "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"
+ ],
+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
+ "version": "==1.10.0"
+ },
+ "pyparsing": {
+ "hashes": [
+ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1",
+ "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"
+ ],
+ "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'",
+ "version": "==2.4.7"
+ },
+ "pytest": {
+ "hashes": [
+ "sha256:9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd578936bf63d7f9",
+ "sha256:b574b57423e818210672e07ca1fa90aaf194a4f63f3ab909a2c67ebb22913839"
+ ],
+ "index": "pypi",
+ "version": "==6.2.2"
+ },
+ "pytest-ordering": {
+ "hashes": [
+ "sha256:27fba3fc265f5d0f8597e7557885662c1bdc1969497cd58aff6ed21c3b617de2",
+ "sha256:3f314a178dbeb6777509548727dc69edf22d6d9a2867bf2d310ab85c403380b6",
+ "sha256:561ad653626bb171da78e682f6d39ac33bb13b3e272d406cd555adb6b006bda6"
+ ],
+ "index": "pypi",
+ "version": "==0.6"
+ },
+ "toml": {
+ "hashes": [
+ "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b",
+ "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"
+ ],
+ "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'",
+ "version": "==0.10.2"
+ }
+ },
+ "develop": {}
+}
diff --git a/doc/report.md b/doc/report.md
new file mode 100644
index 000000000..0f07fcf04
--- /dev/null
+++ b/doc/report.md
@@ -0,0 +1,265 @@
+# Compilador de Cool
+
+- José Carlos Hernández Piñera C411
+- Yan Carlos González Blanco C411
+- Henry Estévez Gómez C411
+
+
+
+## Temario
+
+1. Detalles técnicos
+ - Dependencias del proycto.
+ - Estructura y organización del proyecto.
+ - Cómo ejecutarlo.
+2. Documentación acerca del desarrollo y funcionamiento del proyecto
+ - Análisis sintáctico
+ - Lexer
+ - Parser
+ - Análisis semántico
+ - Generación de código
+ - Código intermedio (CIL)
+ - Código MIPS
+3. Principales problemas técnicos.
+
+
+
+### 1. Detalles técnicos
+
+ Para el uso del compilador se hace necesarion tener instalado Python 3.7 o superior. De manera general se emplean pocos paquetes de terceros, de cualquier forma se muestran a continuación los detalles relacionados con estos y para que se usan dentro del compilador.
+
+- ply: es una implementación enteramente en Pyhton de las herramientas de análisis _lex_ y _yacc_, que facilitan el desarrollo del lexer y el parser, brindando un cómodo y aceptado manejo de los mismos.
+- pytest y pytest-ordering: se usan para llevar a cabo los tests automáticos de cada una de las fases por la que transita el compilador.
+
+ De igual manera dentro del archivo _requirements.txt_ se encuentran recogidas todas las dependencias del proyecto, además de que se ofrece la posibilidad de utilizar un entorno virutal, por medio de _pipenv_, para garantizar que el ambiente en que se pruebe posteriormente el compilador sea exactamente el mismo en el que se desarrolló y por tanto evitar problemas de incongruencia de paquetes y módulos.
+
+Si se quisiera instalar directamente los paquetes sin hacer uso de pipenv el comando sería:
+
+```bash
+pip3 install -r requirements.txt
+```
+
+Ahora usando pipenv empleamos:
+
+```bash
+~$ pipevn shell
+~$ pipenv install --ignore-pipefile
+```
+
+Notemos que ambos comandos se ejecutan en una terminal ubicada en la raiz del proyecto.
+
+ El archivo principal del proyecto es _main.py_, se encuentra ubicado en la carpeta _src_, este recibe como argumento dos ficheros: uno de entrada que debe tener la extensión .cl (que cuenta con el código de Cool) y otro de salida donde se devuelve el código generado en Mips.
+
+ El compilador también se puede ejecutar haciendo uso del fichero _coolc.sh_, ubicado también dentro del directorio _src_.
+
+ Una vez que se ejecute el compilador ,el fichero generado con el código de MIPS, se ubicará en la misma carpeta, con el nombre _mips_code.asm_, esto se realizará siempre que no se pase fichero de salida a la hora de llamar al _main_, puesto que este segundo parámentro no es obligatorio para nosotros.
+
+ Estructura y organización de los directorios del proyecto a partir de la carpeta _src_:
+
+```bash
+.
+├── cool
+│ ├── code.cl
+│ ├── codegen
+│ │ ├── cilgen.py
+│ │ ├── cil_visitor.py
+│ │ ├── codegen.py
+│ │ ├── __init__.py
+│ │ ├── __main__.py
+│ │ ├── mipsgen.py
+│ │ ├── mips_visitor.py
+│ │ └── utils
+│ │ ├── ast_cil.py
+│ │ ├── __init__.py
+│ │ ├── __main__.py
+│ │ ├── print_ast.py
+│ │ └── tools.py
+│ ├── __init__.py
+│ ├── lexer
+│ │ ├── __init__.py
+│ │ ├── lexer.py
+│ │ └── __main__.py
+│ ├── __main__.py
+│ ├── parser
+│ │ ├── __init__.py
+│ │ ├── __main__.py
+│ │ ├── output
+│ │ │ ├── debug.txt
+│ │ │ ├── parselog.txt
+│ │ │ └── parsetab.py
+│ │ └── parser.py
+│ ├── semantic
+│ │ ├── collectVariables.py
+│ │ ├── helpers.py
+│ │ ├── __init__.py
+│ │ ├── __main__.py
+│ │ ├── semantic.py
+│ │ ├── typeBuilder.py
+│ │ ├── typeChecker.py
+│ │ ├── typeCollector.py
+│ │ └── types.py
+│ └── utils
+│ ├── ast.py
+│ ├── errors.py
+│ ├── helpers.py
+│ ├── __init__.py
+│ ├── logger.py
+│ ├── __main__.py
+│ ├── tokens.py
+│ └── visitor.py
+├── coolc.sh
+├── main.py
+├── makefile
+├── mips-code.asm
+├── Readme.md
+```
+
+
+
+### 2. Documentación acerca del desarrollo y funcionamiento del proyecto
+
+El compilador de forma general, se encuentra dividido en 3 grandes fases o grupos:
+
+- Análisis sintáctico: comprende desde la comprobación del código fuente escrito en _COOL_ hasta su representación en el árbol de derivación, incluye todos los aspectos relacionados con la definición de la gramática, así como la construcción del lexer y el parser.
+- Análisis semántico: se basa en la revisión de los aspectos aceptados en la fase anterior, mediante la validación de que todos los predicados semánticos definidos previamente se cumplan.
+- Generación de código: luego de cada uno de los chequeos aplicados en las fases anteriores, se construye un código intermedio para la posterior transformación a código _MIPS_.
+
+Se intentará detallar lo mejor posible cada una de estas fases a lo largo del informe.
+
+#### Análisis sintáctico:
+
+ Como se mencionó en la sección anterior para el desarrollo del compilador se uso _ply_, paquete que incluye soporte al parser _LALR(1)_, así como las herramientas para el análisis léxico de validación de entrada y el reporte de errores.
+
+ El análisis sintáctico se encuentra separado en dos fases: en una se realiza el análisis léxico y en la otra el proceso de parsing.
+
+**Análisis léxico:**
+
+ Esta fase en encarga del procesamiento del código fuente escrito en _Cool_, mediante la creación de _tokens_, que no son más que secuencias de caracteres que tienen un significado para el programa. Todos los espacios en blanco, campos de línea (\n), tabuladores (\t) y demás caracteres sin importancia son removidos también durante esta fase.
+
+ Dicho de otra forma, el lexer no es otra cosa que el proceso de transformación de una secuencia de caracteres (strings) en una secuencia de tokens.
+
+ Un token está representado por la siguiente clase:
+
+```python
+class Token:
+ def __init__(self, lex: str, type_: str, lineno: int, pos: int):
+ self.lex = lex
+ self.type = type_
+ self.lineno = lineno
+ self.pos = pos
+
+ def __str__(self):
+ return f'{self.type}: {self.lex} ({self.lineno}, {self.pos})'
+
+ def __repr__(self):
+ return str(self)
+```
+
+ Como se puede comprbar un token está compuesto por un lexema, que no es más que una especie de nombre que se le hace corresponder al token; además también cuenta con un tipo, notemos que para las palabras reservadas del lenguaje el lexema y el tipo son el mismo, no ocurriendo lo mismo para los strings y números. También se lleva para cada token el número de línea en el que aparece y la posición dentro de esa línea (número de la columna).
+
+ La definición de todas las palabras reservadas del lenguaje se encuentra recogida dentro de _tokens.py_ ubicado en el directorio _src/cool/utils_.
+
+ El proceso de selección de los tokens dentro de código fuente se realiza por medio de una serie de expresiones regulares, definidas para cada una de las palabras reservadas del lenguaje, así como para todos los símbolos presentes en Cool.
+
+ Para ello se emplea _ply_, quien propone una especie de convención de la forma `t_tipo` y la definición de una expresión regular dentro del docstring del método, para reconocer la palabra.
+
+ En resumen sería algo como lo que se presenta a continuación:
+
+```python
+def t_equal(self, t):
+ r'='
+ self.update_column(t)
+ return t
+```
+
+**Proceso de Parsing**
+
+ El parser, que no es más que el análisis de la secuencia de tokens que se obtienen en la sección anterior y la producción del árbol de derivación, también se implementó mediante _ply_.
+
+ _Ply_ brinda igualmente una conveción para la correcta definición de las funciones relacionadas con el proceso; para cada regla gramatical hay una función cuyo nombre empieza con p_ y en el docstring contiene la forma de la producción.
+
+ Sería algo como lo que se presenta a continuación.
+
+```python
+def p_atom_new(self, p):
+ 'atom : new type'
+ p[0] = InstantiateNode(p.slice[2])
+```
+
+ _Ply_ usa los (:) para separar la parte izquierda de la parte derecha de la producción, y en el cuerpo de la función se detalla el código que realiza la acción de esa producción. En cada producción se construye un nodo del Árbol de Sintaxis Abstracta (AST).
+
+ El parámetro _p_ que se muestra dentro del cuerpo contiene los resultados que se obtuvieron luego de parsear el lado derecho de la producción. Es posible indexar en p para acceder a los datos, en el índice 0 se deja siempre el resultado de la acción que se realizó, mientras que a partir de 1 nos comenzamos a referirnos al primer símbolo de la parte derecha de la producción.
+
+ _Ply_ genera un parser que usa el algoritmo de shift-reduce LALR(1), uno de los más usados en la actualidad; notemos que la gramática de Cool fue refactorizada para ser procesada, por LALR(1), sin errores (para ello se eliminó todo tipo de ambigüedad y se tuvo en cuenta la precedencia de todos los operadores presentes), puesto que LALR(1) no puede manejar todas las gramáticas libres del contexto.
+
+ _Ply_ también se emplea para la recuperación y el manejo de los errores.
+
+
+
+#### Análisis semántico
+
+ El objetivo del análisis semántico es asegurar el correcto cumplimiento de los predicados semánticos y validar, además, la información de los tipos para la posterior fase de transformación del código de Cool a Mips.
+
+ Para el desarrollo de esta fase nos apoyamos en el árbol de sintaxis abstracta (AST), estructura que se presenta de forma conveniente para ser explorada, luego el procedimiento para validar cada uno de los predicados pasa por realizar un recorrido por cada uno de los nodos de dicho árbol.
+
+ Dado el hecho de que la mayoría de las reglas semánticas incluyen al uso de variables y funciones, así como las definiciones de estas; se hace necesario, por lo tanto, acceder a un scope, donde están definidas todas las variables y funciones que se emplean en el nodo.
+
+ También se emplea un Contexto, que contiene todas las definiciones de los tipos que se construyen a lo largo del programa.
+
+ Para realizar estos recorridos de los que se hablan se emplea el patrón _visitor_, el cual será de relevante importancia a partir de este momento y se usará como pieza fundamental en todas las acciones que se realicen para el funcionamiento del compilador, este patrón nos permite realizar una abstracción en el concepto de procesamiento de un nodo.
+
+ Apoyándonos en _visitor_, en esta fase realizamos varios recorridos sobre el AST, que permiten en este orden, realizar los siguientes procedimientos:
+
+- Recolectar los tipos definidos, la implementación está dentro de _TypeCollector_, en este recorrido solo nos interesan los nodos _ProgramNode_ y _ClassDeclarationNode_.
+
+- Construcción del contexto de métodos y atributos, la implementaión está dentro de _TypeBuilder_, en este recorridos solo nos interesan los nodos _FuncDeclarationNode_ y _AttrDeclarationNode_
+
+- Construcción de scopes recolectando las variables definidas en el programa; teniendo en cuenta, como es natural, la visibilidad de cada una de estas, la implementación está dentro de _CollectVariables_.
+
+ En este punto se requiere un poco de atención sobre el orden en que se definen los atributos, puesto que la inicialización de estos no puede depender de uno que esté declarado posteriormente en el código.
+
+- Chequear los tipos, en esta pasada se verifica la consistencia de todos los tipos presentes en todos los nodos del AST para detectar con ello la mayor cantidad de errores y por consiguiente, en caso de que se encuentren los mismos, garantizar la creación de instancias de ErrorType para mostrar que cierto tipo presentó algún error semántico. La implentación está dentro de _TypeCheker_.
+
+ Toda la implementación referente al procesamiento de esta etapa del compilador está en el directorio _src/cool/semantic_. Se pueden referir a la misma para analizar cualquier duda que surja.
+
+
+
+#### Generación de código.
+
+ Para la etapa de generación de código, debido a que el salto de Cool a Mips, es demasiado complejo, se genera primeramente un código intermedio, CIL, para facilitar todo el proceso.
+
+**Código intermedio (Cool -> Cil)**
+
+ Para la generación de Cil, también se emplea el patrón visitor, la idea principal es generar para cada nodo del AST de Cool, su correspondiente conjunto de instrucciones el Cil; en todo momento se asegura que las variables y funciones dentro del programa tengan nombre únicos para asegurar que no ocurran futuras incongruencias o inconsistencias durante la generación y posterior ejecución.
+
+ En el leguanje intermendio se menejan 3 secciones fundamentales .TYPES, .DATA y .CODE, que recojen todos los tipos declarados en el programa con sus correspondientes funciones y atributos, las cadenas de texto constantes que serán usadas durante la ejecución y el cuerpo de la funciones en sí, respectivamente.
+
+ Los tipos built-in que existen en Cool (Object, IO, Int, String, Bool) son definidos directamente dentro de CIL, para garantizar un fácil manejo de todas las funciones presentes en estos métodos, se concretó la idea de crear nuevos nodos en Cil dígase: _ExitNode_ y _CopyNode_ para _abort_ y _copy_ de Object. Además por el hecho de que en Mips se realiza un trato diferente asociados a los tipos _int_ y _string_ cuando se hacen llamados al sistema se decidió eliminar las funciones Read y Print, para en su lugar agregar: ReadInt, ReadString, PrintInt, PrintString, esto persigue que se realice de forma más natural y simple los llamados a: in_int, in_string, out_int y out_string presentes en IO.
+
+ Por otro lado para los métodos de String: lenght, concat y substr se crearon los nodos: LenghtNode, ConcatNode y SubstringNode, para garantizar lo mismo que se persigue en la explicación del párrafo anterior.
+
+ Con esto, dichas funciones se crean directamente en la generación a Mips; lo que permite, como es fácil notar, ganar en eficiencia y manejar de forma más adecuada las particularidades de cada una de ellas.
+
+ Algo que presentó una notable relevancia en la generación de Cil fue el hecho de la inicialización de los atributos, nos referimos tanto a los heredados como los de la propia clase; cuando se crea una instancia de una clase se deben inicializar todos los atributos con su expresión inicial, en caso de que tengan alguna, en otro caso se usa su expresión por defecto; esto se aseguró creando para cada tipo un constructor que se encarga de darle un valor a cada uno de sus atributos, este es llamada cada vez que se crea la instancia de algún tipo.
+
+**Generación de MIPS (Cil -> Mips)**
+
+ Naturalmente para generar el código en Mips también se emplea el patrón visitor, pero en esta ocasión recorriendo todos los nodos de Cil que fueron creados en el paso anterior, para cada uno de estos nodos de Cil, se genera el conjunto de instrucciones necesarias para Mips.
+
+ Una de las principales dificultades que se presentaron en esta sección fue la representación de los objetos en memoria, para ello se necesita guardar la información referente al tipo del objeto, los métodos y sus atributos, además de información extra y de otros aspectos útiles referentes al tipo (por ejemplo una referencia al tipo del padre).
+
+
+
+ La imagen anterior muestra la forma en la que se representan los objetos en memoria. El TypeInfo almacena una referencia al nombre del tipo, la información del tipo del padre y además una tabla donde están ubicados los métodos del objeto como tal, y en la misma forma en la que se guardan en Cil. A la hora de crear un objeto, se calcula el tamaño que ocupará, que no es otra cosa que el total de atributos más los 3 campos adicionales usados para guardar la otra información que se muestra en la figura.
+
+ El orden en el que se ubican los atributos, es primero los del padre y luego los propios del objeto, entonces a la hora de acceder a ellos se calcula el offset de este atributo en su tipo estático y a este se le suma 3 porque ahí es donde empiezan a presentar los mismo.
+
+ De forma similar se hace para acceder a los métodos, primero se busca en la posición 3 de la tabla del objeto, donde encontramos el TypeInfo y desde allí se accede a la nueva tabla a partir de la cuál se busca el índice de la función llamada, según la información que se tiene del tipo estático del objeto, resaltar que ahí se encuentra la dirección real del método.
+
+ También requirió especial atención el nodo _ConformsNode_, usado para determinar si el tipo de una expresión se conforma con un _typex_. Para calcular esto se accede al TypeInfo del objeto y a partir de ahí, se realiza un ciclo por los los tipos del padre hasta encontrar alguno que sea igual a _typex_. La igualdad de tipos se comprueba accediendo a TypeName.
+
+#### Problemas técnicos
+
+ Un especial tratamiento hubo que dedicarle al menejo de los comentarios y strings en el lexer, puesto que las expresiones regulares que se definieron para el manejo de estos no cubrían todos los casos posibles. Para ello _ply_ ofrecía una solución que consitía en crear una especie de estados, donde una vez que se accede a esos estados, se le puede dar un tratamiento diferenciado a ciertos tokens, tratamiento que no poseen en el estado _Initial_, que es el que se usa por defecto en _ply_. En este punto lo más difícil de anlizar fueron los comentarios que se realizaban con ((\*...\*)), pero para ello al encontrarse el primer (* se entró a un nuevo estado y por tanto todas las demás reglas eran ignoradas, en ese estado nos mantuvimos hasta llegar a *).
+
+ Los otros problemas más relevantes que tuvimos radicaron en la generación de código, por ejemplo a la hora de determinar como utilizar los registros para almacenar los valores y con que fin se iba a utilizar cada uno; también surgieron otros errores, pero afortunadamente se le puedo dar con la solución aceptada para cada uno de ellos.
\ No newline at end of file
diff --git a/doc/report.pdf b/doc/report.pdf
new file mode 100644
index 000000000..c4b0f085a
Binary files /dev/null and b/doc/report.pdf differ
diff --git a/doc/team.yml b/doc/team.yml
index c16162532..ba69c295f 100644
--- a/doc/team.yml
+++ b/doc/team.yml
@@ -1,10 +1,10 @@
members:
- - name: Nombre Apellido1 Apellido2
- github: github_id
- group: CXXX
- - name: Nombre Apellido1 Apellido2
- github: github_id
- group: CXXX
- - name: Nombre Apellido1 Apellido2
- github: github_id
- group: CXXX
+ - name: José Carlos Hernández Piñera
+ github: JCH97
+ group: C411
+ - name: Yan Carlos González Blanco
+ github: yanc1998
+ group: C411
+ - name: Herny Estévez Gómez
+ github: Henrye10
+ group: C411
diff --git a/img/memory.jpg b/img/memory.jpg
new file mode 100644
index 000000000..956317d91
Binary files /dev/null and b/img/memory.jpg differ
diff --git a/mips-code.asm b/mips-code.asm
new file mode 100644
index 000000000..5b9e044e4
--- /dev/null
+++ b/mips-code.asm
@@ -0,0 +1,1028 @@
+.text
+.globl main
+main:
+# Save method directions in the methods array
+la $v0, methods
+la $t9, entry
+sw $t9, 0($v0)
+la $t9, function_abort_Object
+sw $t9, 4($v0)
+la $t9, function_type_name_Object
+sw $t9, 8($v0)
+la $t9, function_copy_Object
+sw $t9, 12($v0)
+la $t9, function_out_string_IO
+sw $t9, 16($v0)
+la $t9, function_out_int_IO
+sw $t9, 20($v0)
+la $t9, function_in_int_IO
+sw $t9, 24($v0)
+la $t9, function_in_string_IO
+sw $t9, 28($v0)
+la $t9, function_length_String
+sw $t9, 32($v0)
+la $t9, function_concat_String
+sw $t9, 36($v0)
+la $t9, function_substr_String
+sw $t9, 40($v0)
+la $t9, function_type_name_String
+sw $t9, 44($v0)
+la $t9, function_copy_String
+sw $t9, 48($v0)
+la $t9, function_type_name_Int
+sw $t9, 52($v0)
+la $t9, function_copy_Int
+sw $t9, 56($v0)
+la $t9, function_type_name_Bool
+sw $t9, 60($v0)
+la $t9, function_copy_Bool
+sw $t9, 64($v0)
+la $t9, function_abort_String
+sw $t9, 68($v0)
+la $t9, function_abort_Int
+sw $t9, 72($v0)
+la $t9, function_abort_Bool
+sw $t9, 76($v0)
+la $t9, function_main_Main
+sw $t9, 80($v0)
+# Save types directions in the types array
+la $t9, types
+# Save space to locate the type info
+# Allocating memory
+li $v0, 9
+li $a0, 12
+syscall
+# Filling table methods
+la $t8, type_String
+sw $t8, 0($v0)
+# Copying direction to array
+sw $v0, 0($t9)
+# Table addr is now stored in t8
+move $t8, $v0
+# Creating the dispatch table
+# Allocate dispatch table in the heap
+li $v0, 9
+li $a0, 28
+syscall
+# I save the offset of every one of the methods of this type
+# Save the direction of methods
+la $v1, methods
+# Save the direction of the method function_length_String in a0
+lw $a0, 32($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 4($v0)
+# Save the direction of the method function_concat_String in a0
+lw $a0, 36($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 8($v0)
+# Save the direction of the method function_substr_String in a0
+lw $a0, 40($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 12($v0)
+# Save the direction of the method function_abort_String in a0
+lw $a0, 68($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 16($v0)
+# Save the direction of the method function_type_name_String in a0
+lw $a0, 44($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 20($v0)
+# Save the direction of the method function_copy_String in a0
+lw $a0, 48($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 24($v0)
+sw $v0, 8($t8)
+# Allocating memory
+li $v0, 9
+li $a0, 12
+syscall
+# Filling table methods
+la $t8, type_Int
+sw $t8, 0($v0)
+# Copying direction to array
+sw $v0, 4($t9)
+# Table addr is now stored in t8
+move $t8, $v0
+# Creating the dispatch table
+# Allocate dispatch table in the heap
+li $v0, 9
+li $a0, 16
+syscall
+# I save the offset of every one of the methods of this type
+# Save the direction of methods
+la $v1, methods
+# Save the direction of the method function_abort_Int in a0
+lw $a0, 72($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 4($v0)
+# Save the direction of the method function_type_name_Int in a0
+lw $a0, 52($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 8($v0)
+# Save the direction of the method function_copy_Int in a0
+lw $a0, 56($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 12($v0)
+sw $v0, 8($t8)
+# Allocating memory
+li $v0, 9
+li $a0, 12
+syscall
+# Filling table methods
+la $t8, type_Object
+sw $t8, 0($v0)
+# Copying direction to array
+sw $v0, 8($t9)
+# Table addr is now stored in t8
+move $t8, $v0
+# Creating the dispatch table
+# Allocate dispatch table in the heap
+li $v0, 9
+li $a0, 16
+syscall
+# I save the offset of every one of the methods of this type
+# Save the direction of methods
+la $v1, methods
+# Save the direction of the method function_abort_Object in a0
+lw $a0, 4($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 4($v0)
+# Save the direction of the method function_type_name_Object in a0
+lw $a0, 8($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 8($v0)
+# Save the direction of the method function_copy_Object in a0
+lw $a0, 12($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 12($v0)
+sw $v0, 8($t8)
+# Allocating memory
+li $v0, 9
+li $a0, 12
+syscall
+# Filling table methods
+la $t8, type_Bool
+sw $t8, 0($v0)
+# Copying direction to array
+sw $v0, 12($t9)
+# Table addr is now stored in t8
+move $t8, $v0
+# Creating the dispatch table
+# Allocate dispatch table in the heap
+li $v0, 9
+li $a0, 16
+syscall
+# I save the offset of every one of the methods of this type
+# Save the direction of methods
+la $v1, methods
+# Save the direction of the method function_abort_Bool in a0
+lw $a0, 76($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 4($v0)
+# Save the direction of the method function_type_name_Bool in a0
+lw $a0, 60($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 8($v0)
+# Save the direction of the method function_copy_Bool in a0
+lw $a0, 64($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 12($v0)
+sw $v0, 8($t8)
+# Allocating memory
+li $v0, 9
+li $a0, 12
+syscall
+# Filling table methods
+la $t8, type_IO
+sw $t8, 0($v0)
+# Copying direction to array
+sw $v0, 16($t9)
+# Table addr is now stored in t8
+move $t8, $v0
+# Creating the dispatch table
+# Allocate dispatch table in the heap
+li $v0, 9
+li $a0, 32
+syscall
+# I save the offset of every one of the methods of this type
+# Save the direction of methods
+la $v1, methods
+# Save the direction of the method function_abort_Object in a0
+lw $a0, 4($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 4($v0)
+# Save the direction of the method function_type_name_Object in a0
+lw $a0, 8($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 8($v0)
+# Save the direction of the method function_copy_Object in a0
+lw $a0, 12($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 12($v0)
+# Save the direction of the method function_out_string_IO in a0
+lw $a0, 16($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 16($v0)
+# Save the direction of the method function_out_int_IO in a0
+lw $a0, 20($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 20($v0)
+# Save the direction of the method function_in_int_IO in a0
+lw $a0, 24($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 24($v0)
+# Save the direction of the method function_in_string_IO in a0
+lw $a0, 28($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 28($v0)
+sw $v0, 8($t8)
+# Allocating memory
+li $v0, 9
+li $a0, 12
+syscall
+# Filling table methods
+la $t8, type_Main
+sw $t8, 0($v0)
+# Copying direction to array
+sw $v0, 20($t9)
+# Table addr is now stored in t8
+move $t8, $v0
+# Creating the dispatch table
+# Allocate dispatch table in the heap
+li $v0, 9
+li $a0, 36
+syscall
+# I save the offset of every one of the methods of this type
+# Save the direction of methods
+la $v1, methods
+# Save the direction of the method function_abort_Object in a0
+lw $a0, 4($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 4($v0)
+# Save the direction of the method function_type_name_Object in a0
+lw $a0, 8($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 8($v0)
+# Save the direction of the method function_copy_Object in a0
+lw $a0, 12($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 12($v0)
+# Save the direction of the method function_out_string_IO in a0
+lw $a0, 16($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 16($v0)
+# Save the direction of the method function_out_int_IO in a0
+lw $a0, 20($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 20($v0)
+# Save the direction of the method function_in_string_IO in a0
+lw $a0, 28($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 24($v0)
+# Save the direction of the method function_in_int_IO in a0
+lw $a0, 24($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 28($v0)
+# Save the direction of the method function_main_Main in a0
+lw $a0, 80($v1)
+# Save the direction of the method in his position in the dispatch table
+sw $a0, 32($v0)
+sw $v0, 8($t8)
+# Copying parents
+lw $v0, 0($t9)
+li $t8, 0
+sw $t8, 4($v0)
+lw $v0, 4($t9)
+li $t8, 0
+sw $t8, 4($v0)
+lw $v0, 8($t9)
+li $t8, 0
+sw $t8, 4($v0)
+lw $v0, 12($t9)
+li $t8, 0
+sw $t8, 4($v0)
+lw $v0, 16($t9)
+lw $t8, 8($t9)
+sw $t8, 4($v0)
+lw $v0, 20($t9)
+lw $t8, 16($t9)
+sw $t8, 4($v0)
+
+entry:
+# Gets the params from the stack
+move $fp, $sp
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local__internal_0 to the stack
+addiu $sp, $sp, -4
+# Updates stack pointer pushing local__internal_1 to the stack
+addiu $sp, $sp, -4
+lw $t0, -0($fp)
+# Syscall to allocate memory of the object entry in heap
+li $v0, 9
+li $a0, 12
+syscall
+# Loads the name of the variable and saves the name like the first field
+la $t9, type_Main
+sw $t9, 0($v0)
+# Saves the size of the node
+li $t9, 12
+sw $t9, 4($v0)
+move $t0, $v0
+# Adding Type Info addr
+la $t8, types
+lw $v0, 20($t8)
+sw $v0, 8($t0)
+lw $t1, -4($fp)
+# Static Dispatch of the method main
+sw $fp, ($sp)
+addiu $sp, $sp, -4
+sw $ra, ($sp)
+addiu $sp, $sp, -4
+# Push the arguments to the stack
+# The rest of the arguments are push into the stack
+sw $t0, ($sp)
+addiu $sp, $sp, -4
+# Empty all used registers and saves them to memory
+sw $t0, -0($fp)
+sw $t1, -4($fp)
+# This function will consume the arguments
+jal function_main_Main
+# Pop ra register of return function of the stack
+addiu $sp, $sp, 4
+lw $ra, ($sp)
+# Pop fp register from the stack
+addiu $sp, $sp, 4
+lw $fp, ($sp)
+lw $t0, -4($fp)
+# saves the return value
+move $t0, $v0
+li $v0, 0
+# Empty all used registers and saves them to memory
+sw $t0, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_abort_Object:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_abort_Object_self_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -0($fp)
+lw $t1, -4($fp)
+# Moving self to local_abort_Object_self_0
+move $t1, $t0
+sw $t1, -4($fp)
+# Exiting the program
+li $t8, 0
+# Printing abort message
+li $v0, 4
+la $a0, abort_msg
+syscall
+li $v0, 4
+lw $a0, 0($t0)
+syscall
+li $v0, 4
+la $a0, new_line
+syscall
+li $v0, 17
+move $a0, $t8
+syscall
+sw $t0, -0($fp)
+sw $t1, -4($fp)
+
+function_type_name_Object:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_type_name_Object_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -0($fp)
+lw $t1, -4($fp)
+# local_type_name_Object_result_0 <- Type of self
+lw $t1, 0($t0)
+move $v0, $t1
+# Empty all used registers and saves them to memory
+sw $t0, -0($fp)
+sw $t1, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_copy_Object:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_copy_Object_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -0($fp)
+lw $t1, -4($fp)
+lw $t9, 4($t0)
+# Syscall to allocate memory of the object entry in heap
+li $v0, 9
+move $a0, $t9
+syscall
+move $t1, $v0
+# Loop to copy every field of the previous object
+# t8 the register to loop
+li $t8, 0
+loop_0:
+# In t9 is stored the size of the object
+bge $t8, $t9, exit_0
+lw $a0, ($t0)
+sw $a0, ($v0)
+addi $v0, $v0, 4
+addi $t0, $t0, 4
+# Increase loop counter
+addi $t8, $t8, 4
+j loop_0
+exit_0:
+move $v0, $t1
+# Empty all used registers and saves them to memory
+sw $t0, -0($fp)
+sw $t1, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_out_string_IO:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Pops the register with the param value word
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_out_string_String_self_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -4($fp)
+lw $t1, -8($fp)
+# Moving self to local_out_string_String_self_0
+move $t1, $t0
+sw $t1, -8($fp)
+lw $t2, -0($fp)
+# Printing a string
+li $v0, 4
+move $a0, $t2
+syscall
+move $v0, $t1
+# Empty all used registers and saves them to memory
+sw $t0, -4($fp)
+sw $t1, -8($fp)
+sw $t2, -0($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 12
+jr $ra
+
+
+function_out_int_IO:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Pops the register with the param value number
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_out_int_IO_self_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -4($fp)
+lw $t1, -8($fp)
+# Moving self to local_out_int_IO_self_0
+move $t1, $t0
+sw $t1, -8($fp)
+lw $t2, -0($fp)
+# Printing an int
+li $v0, 1
+move $a0, $t2
+syscall
+move $v0, $t1
+# Empty all used registers and saves them to memory
+sw $t0, -4($fp)
+sw $t1, -8($fp)
+sw $t2, -0($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 12
+jr $ra
+
+
+function_in_int_IO:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_in_int_IO_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -4($fp)
+# Reading a int
+li $v0, 5
+syscall
+move $t0, $v0
+move $v0, $t0
+# Empty all used registers and saves them to memory
+sw $t0, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_in_string_IO:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_in_string_IO_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -4($fp)
+# Allocating memory for the buffer
+li $a0, 356
+li $v0, 9
+syscall
+move $t0, $v0
+# Reading a string
+# Putting buffer in a0
+move $a0, $t0
+# Putting length of string in a1
+li $a1, 356
+li $v0, 8
+syscall
+# Walks to eliminate the newline
+move $t9, $t0
+start_1:
+lb $t8, 0($t9)
+beqz $t8, end_1
+add $t9, $t9, 1
+j start_1
+end_1:
+addiu $t9, $t9, -1
+sb $0, ($t9)
+move $v0, $t0
+# Empty all used registers and saves them to memory
+sw $t0, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_length_String:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_length_String_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -0($fp)
+lw $t1, -4($fp)
+move $t8, $t0
+# Determining the length of a string
+loop_2:
+lb $t9, 0($t8)
+beq $t9, $zero, end_2
+addi $t8, $t8, 1
+j loop_2
+end_2:
+sub $t1, $t8, $t0
+move $v0, $t1
+# Empty all used registers and saves them to memory
+sw $t0, -0($fp)
+sw $t1, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_concat_String:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Pops the register with the param value word
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_concat_String_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -4($fp)
+lw $t1, -0($fp)
+lw $t2, -8($fp)
+# Allocating memory for the buffer
+li $a0, 356
+li $v0, 9
+syscall
+move $t2, $v0
+# Copy the first string to dest
+move $a0, $t0
+move $a1, $t2
+sw $ra, ($sp)
+addiu $sp, $sp, -4
+jal strcopier
+# Concatenate second string on result buffer
+move $a0, $t1
+move $a1, $v0
+jal strcopier
+sb $0, 0($v0)
+addiu $sp, $sp, 4
+lw $ra, ($sp)
+j finish_3
+# Definition of strcopier
+strcopier:
+# In a0 is the source and in a1 is the destination
+loop_3:
+lb $t8, ($a0)
+beq $t8, $zero, end_3
+addiu $a0, $a0, 1
+sb $t8, ($a1)
+addiu $a1, $a1, 1
+b loop_3
+end_3:
+move $v0, $a1
+jr $ra
+finish_3:
+move $v0, $t2
+# Empty all used registers and saves them to memory
+sw $t0, -4($fp)
+sw $t1, -0($fp)
+sw $t2, -8($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 12
+jr $ra
+
+
+function_substr_String:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Pops the register with the param value begin
+addiu $fp, $fp, 4
+# Pops the register with the param value end
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_substr_String_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -4($fp)
+lw $t1, -0($fp)
+lw $t2, -12($fp)
+# Allocating memory for the buffer
+li $a0, 356
+li $v0, 9
+syscall
+move $t2, $v0
+lw $t3, -8($fp)
+# Getting the substring of a node
+# Move to the first position in the string
+li $v0, 0
+move $t8, $t3
+start_4:
+lb $t9, 0($t8)
+beqz $t9, error_4
+addi $v0, 1
+bgt $v0, $t0, end_len_4
+addi $t8, 1
+j start_4
+end_len_4:
+# Saving dest to iterate over him
+move $v0, $t2
+loop_4:
+sub $t9, $v0, $t2
+beq $t9, $t1, end_4
+lb $t9, 0($t8)
+beqz $t9, error_4
+sb $t9, 0($v0)
+addi $t8, $t8, 1
+addi $v0, $v0, 1
+j loop_4
+error_4:
+la $a0, index_error
+li $v0, 4
+move $a0, $t3
+syscall
+li $v0, 1
+move $a0, $t0
+syscall
+li $v0, 1
+move $a0, $t1
+syscall
+j .raise
+end_4:
+sb $0, 0($v0)
+move $v0, $t2
+# Empty all used registers and saves them to memory
+sw $t0, -4($fp)
+sw $t1, -0($fp)
+sw $t2, -12($fp)
+sw $t3, -8($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 16
+jr $ra
+
+
+function_type_name_String:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_type_name_String_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -4($fp)
+# Saves in local_type_name_String_result_0 type_String
+la $t0, type_String
+move $v0, $t0
+# Empty all used registers and saves them to memory
+sw $t0, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_copy_String:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_copy_String_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -0($fp)
+lw $t1, -4($fp)
+# Allocating memory for the buffer
+li $a0, 356
+li $v0, 9
+syscall
+move $t1, $v0
+# Copy the first string to dest
+move $a0, $t0
+move $a1, $t1
+sw $ra, ($sp)
+addiu $sp, $sp, -4
+jal strcopier
+sb $0, 0($v0)
+addiu $sp, $sp, 4
+lw $ra, ($sp)
+j finish_5
+finish_5:
+move $v0, $t1
+# Empty all used registers and saves them to memory
+sw $t0, -0($fp)
+sw $t1, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_type_name_Int:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_type_name_Int_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -4($fp)
+# Saves in local_type_name_Int_result_0 type_Int
+la $t0, type_Int
+move $v0, $t0
+# Empty all used registers and saves them to memory
+sw $t0, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_copy_Int:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_copy_Int_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -0($fp)
+lw $t1, -4($fp)
+# Moving self to local_copy_Int_result_0
+move $t1, $t0
+sw $t1, -4($fp)
+move $v0, $t1
+# Empty all used registers and saves them to memory
+sw $t0, -0($fp)
+sw $t1, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_type_name_Bool:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_type_name_Bool_result_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -4($fp)
+# Saves in local_type_name_Bool_result_0 type_Bool
+la $t0, type_Bool
+move $v0, $t0
+# Empty all used registers and saves them to memory
+sw $t0, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_copy_Bool:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_copy_result_Bool_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -0($fp)
+lw $t1, -4($fp)
+# Moving self to local_copy_result_Bool_0
+move $t1, $t0
+sw $t1, -4($fp)
+move $v0, $t1
+# Empty all used registers and saves them to memory
+sw $t0, -0($fp)
+sw $t1, -4($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 8
+jr $ra
+
+
+function_abort_String:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_abort_String_msg_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -0($fp)
+# Saves in self string_abort
+la $t0, string_abort
+# Printing a string
+li $v0, 4
+move $a0, $t0
+syscall
+# Exiting the program
+li $t8, 0
+li $v0, 17
+move $a0, $t8
+syscall
+sw $t0, -0($fp)
+
+function_abort_Int:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_abort_Int_msg_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -0($fp)
+# Saves in self int_abort
+la $t0, int_abort
+# Printing a string
+li $v0, 4
+move $a0, $t0
+syscall
+# Exiting the program
+li $t8, 0
+li $v0, 17
+move $a0, $t8
+syscall
+sw $t0, -0($fp)
+
+function_abort_Bool:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_abort_Bool_msg_0 to the stack
+addiu $sp, $sp, -4
+lw $t0, -0($fp)
+# Saves in self bool_abort
+la $t0, bool_abort
+# Printing a string
+li $v0, 4
+move $a0, $t0
+syscall
+# Exiting the program
+li $t8, 0
+li $v0, 17
+move $a0, $t8
+syscall
+sw $t0, -0($fp)
+
+function_main_Main:
+# Gets the params from the stack
+move $fp, $sp
+# Pops the register with the param value self
+addiu $fp, $fp, 4
+# Gets the frame pointer from the stack
+# Updates stack pointer pushing local_main_Main_internal_0 to the stack
+addiu $sp, $sp, -4
+# Updates stack pointer pushing local_main_Main_internal_1 to the stack
+addiu $sp, $sp, -4
+lw $t0, -4($fp)
+# Saves in local_main_Main_internal_0 data_1
+la $t0, data_1
+lw $t1, -0($fp)
+lw $t2, -8($fp)
+# Find the actual name in the dispatch table
+# Gets in a0 the actual direction of the dispatch table
+lw $t9, 8($t1)
+lw $a0, 8($t9)
+# Saves in t8 the direction of function_out_string_IO
+lw $t8, 16($a0)
+sw $fp, ($sp)
+addiu $sp, $sp, -4
+sw $ra, ($sp)
+addiu $sp, $sp, -4
+# Push the arguments to the stack
+# The rest of the arguments are push into the stack
+sw $t0, ($sp)
+addiu $sp, $sp, -4
+# The rest of the arguments are push into the stack
+sw $t1, ($sp)
+addiu $sp, $sp, -4
+# Empty all used registers and saves them to memory
+sw $t0, -4($fp)
+sw $t1, -0($fp)
+sw $t2, -8($fp)
+# This function will consume the arguments
+jal $t8
+# Pop ra register of return function of the stack
+addiu $sp, $sp, 4
+lw $ra, ($sp)
+# Pop fp register from the stack
+addiu $sp, $sp, 4
+lw $fp, ($sp)
+lw $t0, -8($fp)
+# saves the return value
+move $t0, $v0
+move $v0, $t0
+# Empty all used registers and saves them to memory
+sw $t0, -8($fp)
+# Removing all locals from stack
+addiu $sp, $sp, 12
+jr $ra
+
+# Raise exception method
+.raise:
+li $v0, 4
+syscall
+li $v0, 17
+li $a0, 1
+syscall
+
+.data
+abort_msg: .asciiz "Abort called from class "
+new_line: .asciiz "
+"
+string_abort: .asciiz "Abort called from class String
+"
+int_abort: .asciiz "Abort called from class Int
+"
+bool_abort: .asciiz "Abort called from class Bool
+"
+type_Object: .asciiz "Object"
+type_IO: .asciiz "IO"
+type_String: .asciiz "String"
+type_Int: .asciiz "Int"
+type_Bool: .asciiz "Bool"
+type_Main: .asciiz "Main"
+methods: .word 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+type_Void: .asciiz "Void"
+types: .word 0, 0, 0, 0, 0, 0
+data_0: .asciiz "Void"
+data_1: .asciiz "Hello, World.
+"
+zero_error: .asciiz "Division by zero error
+"
+case_void_error: .asciiz "Case on void error
+"
+dispatch_error: .asciiz "Dispatch on void error
+"
+case_error: .asciiz "Case statement without a matching branch error
+"
+index_error: .asciiz "Substring out of range error
+"
+heap_error: .asciiz "Heap overflow error
+"
\ No newline at end of file
diff --git a/package.json b/package.json
new file mode 100644
index 000000000..067cd2bc9
--- /dev/null
+++ b/package.json
@@ -0,0 +1,10 @@
+{
+ "devDependencies": {
+ "cz-conventional-changelog": "3.3.0"
+ },
+ "config": {
+ "commitizen": {
+ "path": "./node_modules/cz-conventional-changelog"
+ }
+ }
+}
diff --git a/requirements.txt b/requirements.txt
index 9eb0cad1a..4d792d537 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,3 @@
pytest
pytest-ordering
+ply~=3.11
diff --git a/src/.idea/workspace.xml b/src/.idea/workspace.xml
new file mode 100644
index 000000000..d192fca86
--- /dev/null
+++ b/src/.idea/workspace.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1640574149282
+
+
+ 1640574149282
+
+
+
+
\ No newline at end of file
diff --git a/src/cool/__init__.py b/src/cool/__init__.py
new file mode 100644
index 000000000..2f2f644af
--- /dev/null
+++ b/src/cool/__init__.py
@@ -0,0 +1,5 @@
+from .utils import *
+from .lexer import *
+from .semantic import *
+from .parser import *
+from .codegen import *
diff --git a/src/cool/__main__.py b/src/cool/__main__.py
new file mode 100644
index 000000000..231e764b3
--- /dev/null
+++ b/src/cool/__main__.py
@@ -0,0 +1,5 @@
+from .lexer import *
+from .parser import *
+from .semantic import *
+from .utils import *
+from .codegen import *
diff --git a/src/cool/code.cl b/src/cool/code.cl
new file mode 100644
index 000000000..81709b4b5
--- /dev/null
+++ b/src/cool/code.cl
@@ -0,0 +1,10 @@
+(*
+But it is an error to assign to self or to bind self in a let, a
+case, or as a formal parameter. It is also illegal to have attributes named self.
+*)
+
+class Main inherits IO {
+ main(): IO { out_string("Hello World!")};
+
+ test(self: IO): IO { self };
+};
diff --git a/src/cool/codegen/__init__.py b/src/cool/codegen/__init__.py
new file mode 100644
index 000000000..ded6df751
--- /dev/null
+++ b/src/cool/codegen/__init__.py
@@ -0,0 +1 @@
+from .codegen import *
diff --git a/src/cool/codegen/__main__.py b/src/cool/codegen/__main__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/cool/codegen/cil_visitor.py b/src/cool/codegen/cil_visitor.py
new file mode 100644
index 000000000..a12d946cd
--- /dev/null
+++ b/src/cool/codegen/cil_visitor.py
@@ -0,0 +1,384 @@
+from .cilgen import BaseCil
+from ..utils import visitor
+from ..utils.ast import *
+from ..semantic.helpers import Scope, VariableInfo
+from ..semantic.types import *
+from .utils import ast_cil
+from ..utils.helpers import get_type, get_common_base_type
+
+
+class CilVisitor(BaseCil):
+ @visitor.on('node')
+ def visit(self, node):
+ pass
+
+ @visitor.when(ProgramNode)
+ def visit(self, node: ProgramNode, scope: Scope):
+ self.current_function = self.register_function('entry')
+ idx = self.index
+
+ instance = self.define_internal_local()
+ result = self.define_internal_local()
+ self.register_instruction(ast_cil.AllocateNode('Main', instance))
+ typex = self.context.get_type('Main', (0, 0))
+
+ if typex.all_attributes():
+ self.register_instruction(
+ ast_cil.StaticCallNode(typex.name, typex.name, None, [ast_cil.ArgNode(instance)], typex.name))
+
+ self.register_instruction(ast_cil.StaticCallNode('Main', 'main', result, [ast_cil.ArgNode(instance)], 'Object'))
+ self.register_instruction(ast_cil.ReturnNode(0))
+
+ self.current_function = None
+ self.void_data = self.register_data(VOID_NAME).name
+ self.built_in_functions()
+
+ for declaration, child_scope in zip(node.declarations, scope.children):
+ self.visit(declaration, child_scope)
+
+ return ast_cil.ProgramNode(self.types_nodes, self.data, self.fun_nodes, idx)
+
+ @visitor.when(ClassDeclarationNode)
+ def visit(self, node: ClassDeclarationNode, scope: Scope):
+ self.current_type = self.context.get_type(node.id, node.pos)
+
+ cil_type = self.register_type(node.id)
+ attrs = self.current_type.all_attributes()
+
+ if len(attrs) > 0:
+ constructor = FuncDeclarationNode(node.token, [], node.token, BlockNode([], node.token))
+ func_declarations = [constructor]
+ self.constructors.append(node.id)
+ self.current_type.define_method(self.current_type.name, [], [], self.current_type, node.pos)
+
+ scopes = [scope] + list(scope.functions.values())
+ else:
+ func_declarations = []
+ scopes = list(scope.functions.values())
+
+ for attr, a_type in attrs:
+ cil_type.attributes.append((attr.name, self.to_attr_name(attr.name, a_type.name)))
+ self.initialize_attr(constructor, attr, scope)
+ if attrs:
+ # Append like the last expression self type
+ constructor.body.expr_list.append(SelfNode())
+
+ for method, mtype in self.current_type.all_methods():
+ cil_type.methods.append((method.name, self.to_function_name(method.name, mtype.name)))
+
+ func_declarations += [f for f in node.features if isinstance(f, FuncDeclarationNode)]
+ for feature, child_scope in zip(func_declarations, scopes):
+ self.visit(feature, child_scope)
+
+ @visitor.when(FuncDeclarationNode)
+ def visit(self, node: FuncDeclarationNode, scope: Scope):
+ self.current_method = self.current_type.get_method(node.id, node.pos)
+
+ name = self.to_function_name(node.id, self.current_type.name)
+ self.current_function = self.register_function(name)
+
+ self.register_param('self', self.current_type.name)
+ for p_name, p_type in node.params:
+ self.register_param(p_name, p_type.value)
+
+ value, typex = self.visit(node.body, scope)
+ if not isinstance(value, str):
+ result = self.define_internal_local()
+ self.register_instruction(ast_cil.AssignNode(result, value))
+ else:
+ result = value
+
+ if (
+ typex.name == 'Int' or typex.name == 'String' or typex.name == 'Bool') and self.current_method.return_type.name == 'Object':
+ self.register_instruction(ast_cil.BoxingNode(result, typex.name))
+
+ self.register_instruction(ast_cil.ReturnNode(result))
+ self.current_method = None
+
+ @visitor.when(VarDeclarationNode)
+ def visit(self, node: VarDeclarationNode, scope: Scope):
+ var_info = scope.find_variable(node.id)
+ vtype = get_type(var_info.type, self.current_type)
+ local_var = self.register_local(var_info.name)
+
+ value, typex = self.visit(node.expr, scope)
+ if vtype.name == 'Object' and typex.name in ['String', 'Int', 'Bool']:
+ self.register_instruction(ast_cil.BoxingNode(local_var, typex.name))
+ else:
+ self.register_instruction(ast_cil.AssignNode(local_var, value))
+ return local_var, vtype
+
+ @visitor.when(AssignNode)
+ def visit(self, node: AssignNode, scope: Scope):
+ var_info = scope.find_local(node.id)
+ value, typex = self.visit(node.expr, scope)
+ if var_info is None:
+ var_info = scope.find_attribute(node.id)
+ attributes = [attr.name for attr, a_type in self.current_type.all_attributes()]
+ if var_info.type.name == 'Object' and typex.name in ['String', 'Bool', 'Int']:
+ value = self.define_internal_local()
+ self.register_instruction(ast_cil.BoxingNode(value, typex.name))
+ self.register_instruction(ast_cil.SetAttribNode('self', var_info.name, self.current_type.name, value))
+ else:
+ local_name = self.to_var_name(var_info.name)
+ if var_info.type.name == 'Object' and typex.name in ['String', 'Bool', 'Int']:
+ self.register_instruction(ast_cil.BoxingNode(local_name, typex.name))
+ else:
+ self.register_instruction(ast_cil.AssignNode(local_name, value))
+ return value, typex
+
+ def _return_type(self, typex: Type, node):
+ meth = typex.get_method(node.id, node.pos)
+ return get_type(meth.return_type, self.current_type)
+
+ @visitor.when(CallNode)
+ def visit(self, node: CallNode, scope: Scope):
+ obj, otype = self.visit(node.obj, scope)
+
+ meth = otype.get_method(node.id, node.pos)
+ args_node = [ast_cil.ArgNode(obj, self.index)] + self.handle_arguments(node.args, scope, meth.param_types)
+
+ rtype = meth.return_type
+ result = None if isinstance(rtype, VoidType) else self.define_internal_local()
+
+ continue_label = ast_cil.LabelNode(f'continue__{self.index}')
+ isvoid = self.check_void(obj)
+ self.register_instruction(ast_cil.GotoIfFalseNode(isvoid, continue_label.label))
+ self.register_instruction(ast_cil.ErrorNode('dispatch_error'))
+ self.register_instruction(continue_label)
+
+ if otype in [StringType(), IntType(), BoolType()]:
+ self.register_instruction(ast_cil.StaticCallNode(otype.name, node.id, result, args_node, rtype.name))
+ else:
+ self.register_instruction(ast_cil.DynamicCallNode(otype.name, obj, node.id, result, args_node, rtype.name))
+ return result, self._return_type(otype, node)
+
+ @visitor.when(BaseCallNode)
+ def visit(self, node: BaseCallNode, scope: Scope):
+ obj, otype = self.visit(node.obj, scope)
+
+ meth = otype.get_method(node.id, node.pos)
+ args_node = [ast_cil.ArgNode(obj, self.index)] + self.handle_arguments(node.args, scope, meth.param_types)
+
+ rtype = meth.return_type
+ result = None if isinstance(rtype, VoidType) else self.define_internal_local()
+
+ continue_label = ast_cil.LabelNode(f'continue__{self.index}')
+ isvoid = self.check_void(obj)
+ self.register_instruction(ast_cil.GotoIfFalseNode(isvoid, continue_label.label))
+ self.register_instruction(ast_cil.ErrorNode('dispatch_error'))
+ self.register_instruction(continue_label)
+
+ self.register_instruction(ast_cil.StaticCallNode(node.type, node.id, result, args_node, rtype.name))
+ return result, self._return_type(otype, node)
+
+ @visitor.when(StaticCallNode)
+ def visit(self, node: StaticCallNode, scope: Scope):
+ meth = self.current_type.get_method(node.id, node.pos)
+ args_node = [ast_cil.ArgNode('self', self.index)] + self.handle_arguments(node.args, scope, meth.param_types)
+
+ rtype = meth.return_type
+ if isinstance(rtype, VoidType):
+ result = None
+ else:
+ result = self.define_internal_local()
+
+ self.register_instruction(
+ ast_cil.DynamicCallNode(self.current_type.name, 'self', node.id, result, args_node, rtype.name))
+ return result, self._return_type(self.current_type, node)
+
+ @visitor.when(ConstantNumNode)
+ def visit(self, node: ConstantNumNode, scope: Scope):
+ return int(node.lex), IntType()
+
+ @visitor.when(ConstantBoolNode)
+ def visit(self, node: ConstantBoolNode, scope: Scope):
+ return 1 if node.lex == 'true' else 0, BoolType()
+
+ @visitor.when(ConstantStrNode)
+ def visit(self, node: ConstantStrNode, scope: Scope):
+ data = self.register_data(node.lex)
+ result = self.define_internal_local()
+ self.register_instruction(ast_cil.LoadNode(result, data.name))
+ return result, StringType()
+
+ @visitor.when(ConstantVoidNode)
+ def visit(self, node: ConstantVoidNode, scope: Scope):
+ result = self.register_local(node.lex)
+ void = ast_cil.VoidConstantNode(result)
+ self.register_instruction(void)
+ return result, VoidType()
+
+ @visitor.when(SelfNode)
+ def visit(self, node: SelfNode, scope: Scope):
+ return 'self', self.current_type
+
+ @visitor.when(VariableNode)
+ def visit(self, node: VariableNode, scope: Scope):
+ try:
+ typex = scope.find_local(node.lex).type
+ name = self.to_var_name(node.lex)
+ return name, get_type(typex, self.current_type)
+ except:
+ var_info = scope.find_attribute(node.lex)
+ local_var = self.register_local(var_info.name)
+ self.register_instruction(
+ ast_cil.GetAttribNode('self', var_info.name, self.current_type.name, local_var, var_info.type.name))
+ return local_var, get_type(var_info.type, self.current_type)
+
+ @visitor.when(InstantiateNode)
+ def visit(self, node: InstantiateNode, scope: Scope):
+ instance = self.define_internal_local()
+ typex = self.context.get_type(node.lex, node.pos)
+ typex = get_type(typex, self.current_type)
+ self.register_instruction(ast_cil.AllocateNode(typex.name, instance))
+
+ if typex.all_attributes():
+ self.register_instruction(
+ ast_cil.StaticCallNode(typex.name, typex.name, instance, [ast_cil.ArgNode(instance)], typex.name))
+
+ return instance, typex
+
+ @visitor.when(WhileNode)
+ def visit(self, node: WhileNode, scope: Scope):
+ start_label = ast_cil.LabelNode(f'start__{self.idx}')
+ end_label = ast_cil.LabelNode(f'end__{self.idx}')
+
+ result = self.define_internal_local()
+ self.register_instruction(ast_cil.VoidConstantNode(result))
+ self.register_instruction(start_label)
+
+ cond, _ = self.visit(node.cond, scope)
+ self.register_instruction(ast_cil.GotoIfFalseNode(cond, end_label.label))
+ expr, typex = self.visit(node.expr, scope)
+ self.register_instruction(ast_cil.AssignNode(result, expr))
+ self.register_instruction(ast_cil.GotoNode(start_label.label))
+ self.register_instruction(end_label)
+
+ return result, ObjectType()
+
+ @visitor.when(ConditionalNode)
+ def visit(self, node: ConditionalNode, scope: Scope):
+ cond, _ = self.visit(node.cond, scope)
+
+ true_label = ast_cil.LabelNode(f"true__{self.idx}")
+ end_label = ast_cil.LabelNode(f"end__{self.idx}")
+
+ result = self.define_internal_local()
+ self.register_instruction(ast_cil.GotoIfNode(cond, true_label.label))
+
+ false_expr, ftypex = self.visit(node.else_stm, scope)
+ self.register_instruction(ast_cil.AssignNode(result, false_expr))
+ self.register_instruction(ast_cil.GotoNode(end_label.label))
+ self.register_instruction(true_label)
+
+ true_expr, ttypex = self.visit(node.stm, scope)
+ self.register_instruction(ast_cil.AssignNode(result, true_expr))
+ self.register_instruction(end_label)
+ return result, get_common_base_type([ttypex, ftypex])
+
+ @visitor.when(BlockNode)
+ def visit(self, node: BlockNode, scope: Scope):
+ value = None
+ for exp in node.expr_list:
+ value, typex = self.visit(exp, scope)
+ result = self.define_internal_local()
+ self.register_instruction(ast_cil.AssignNode(result, value))
+ return result, typex
+
+ @visitor.when(LetNode)
+ def visit(self, node: LetNode, scope: Scope):
+ child_scope = scope.expr_dict[node]
+ for init in node.init_list:
+ self.visit(init, child_scope)
+
+ expr, typex = self.visit(node.expr, child_scope)
+ return expr, typex
+
+ @visitor.when(CaseNode)
+ def visit(self, node: CaseNode, scope: Scope):
+ expr, typex = self.visit(node.expr, scope)
+
+ result = self.define_internal_local()
+ end_label = ast_cil.LabelNode(f'end__{self.idx}')
+ error_label = ast_cil.LabelNode(f'error__{self.idx}')
+
+ isvoid = self.check_void(expr)
+ self.register_instruction(ast_cil.GotoIfNode(isvoid, error_label.label))
+
+ try:
+ new_scope = scope.expr_dict[node]
+ except:
+ new_scope = scope
+ sorted_case_list = self.sort_option_nodes_by_type(node.case_list)
+ for i, case in enumerate(sorted_case_list):
+ next_label = ast_cil.LabelNode(f'next__{self.idx}_{i}')
+ expr_i = self.visit(case, new_scope.create_child(), expr, next_label, typex)
+ self.register_instruction(ast_cil.AssignNode(result, expr_i))
+ self.register_instruction(ast_cil.GotoNode(end_label.label))
+ self.register_instruction(next_label)
+
+ # No match before
+ self.register_instruction(ast_cil.ErrorNode('case_error'))
+ self.register_instruction(error_label)
+ self.register_instruction(ast_cil.ErrorNode('case_void_error'))
+ self.register_instruction(end_label)
+ return result, typex
+
+ @visitor.when(OptionNode)
+ def visit(self, node: OptionNode, scope: Scope, expr, next_label, type_e):
+ aux = self.define_internal_local()
+ self.register_instruction(ast_cil.ConformsNode(aux, expr, node.typex))
+ self.register_instruction(ast_cil.GotoIfFalseNode(aux, next_label.label))
+
+ local_var = self.register_local(node.id)
+ typex = self.context.get_type(node.typex, node.type_pos)
+ scope.define_variable(node.id, typex)
+ if typex.name == 'Object' and type_e.name in ['String', 'Int', 'Bool']:
+ self.register_instruction(ast_cil.BoxingNode(local_var, type_e.name))
+ else:
+ self.register_instruction(ast_cil.AssignNode(local_var, expr))
+ expr_i, type_expr = self.visit(node.expr, scope)
+ return expr_i
+
+ @visitor.when(NotNode)
+ def visit(self, node: NotNode, scope: Scope):
+ return self._define_unary_node(node, scope, ast_cil.LogicalNotNode)
+
+ @visitor.when(BinaryNotNode)
+ def visit(self, node: BinaryNotNode, scope: Scope):
+ return self._define_unary_node(node, scope, ast_cil.NotNode)
+
+ @visitor.when(IsVoidNode)
+ def visit(self, node: IsVoidNode, scope: Scope):
+ expr, _ = self.visit(node.expr, scope)
+ result = self.check_void(expr)
+ return result, BoolType()
+
+ @visitor.when(PlusNode)
+ def visit(self, node: PlusNode, scope: Scope):
+ return self._define_binary_node(node, scope, ast_cil.PlusNode)
+
+ @visitor.when(MinusNode)
+ def visit(self, node: MinusNode, scope: Scope):
+ return self._define_binary_node(node, scope, ast_cil.MinusNode)
+
+ @visitor.when(StarNode)
+ def visit(self, node: StarNode, scope: Scope):
+ return self._define_binary_node(node, scope, ast_cil.StarNode)
+
+ @visitor.when(DivNode)
+ def visit(self, node: DivNode, scope: Scope):
+ return self._define_binary_node(node, scope, ast_cil.DivNode)
+
+ @visitor.when(LessNode)
+ def visit(self, node: LessNode, scope: Scope):
+ return self._define_binary_node(node, scope, ast_cil.LessNode)
+
+ @visitor.when(LessEqNode)
+ def visit(self, node: LessEqNode, scope: Scope):
+ return self._define_binary_node(node, scope, ast_cil.LessEqNode)
+
+ @visitor.when(EqualNode)
+ def visit(self, node: EqualNode, scope: Scope):
+ return self._define_binary_node(node, scope, ast_cil.EqualNode)
diff --git a/src/cool/codegen/cilgen.py b/src/cool/codegen/cilgen.py
new file mode 100644
index 000000000..8d2a5cc12
--- /dev/null
+++ b/src/cool/codegen/cilgen.py
@@ -0,0 +1,286 @@
+from .utils import ProgramNode, LocalNode, FunctionNode, TypeNode, DataNode, ParamNode
+from .utils import ast_cil
+from ..semantic.helpers import Context, VariableInfo, Scope
+from ..semantic.types import Attribute, Type, StringType, ObjectType, IOType, Method
+import re
+from ..utils.ast import BinaryNode, UnaryNode, AssignNode, ConstantBoolNode, ConstantVoidNode, ConstantStrNode, \
+ ConstantNumNode
+
+
+class BaseCil:
+ def __init__(self, context):
+ self.current_function = None
+ self.current_type: Type = None
+ self.current_method: Method = None
+ self.fun_nodes = []
+ self.data = []
+ self.types_nodes = []
+ self.context = context
+ self.idx = 0
+ self.void_data = None
+ self.constructors = []
+ self.void_data = None
+ self.inherit_graph = {}
+
+ @property
+ def params(self):
+ return self.current_function.params
+
+ @property
+ def index(self):
+ t = self.idx
+ self.idx += 1
+ return t
+
+ @property
+ def localvars(self):
+ return self.current_function.localvars
+
+ @property
+ def instructions(self):
+ return self.current_function.instructions
+
+ def register_param(self, vname, vtype):
+ # name = f'param_{self.current_function.name[9:]}_{vname}_{len(self.params)}'
+ param_node = ParamNode(vname, vtype, self.index)
+ self.params.append(param_node)
+ return vname
+
+ def register_local(self, vname):
+ name = f'local_{self.current_function.name[9:]}_{vname}_{len(self.localvars)}'
+ local_node = LocalNode(name, self.index)
+ self.localvars.append(local_node)
+ return name
+
+ def define_internal_local(self):
+ return self.register_local('internal')
+
+ def register_instruction(self, instruction):
+ self.instructions.append(instruction)
+ instruction.index = self.index
+ return instruction
+
+ def to_attr_name(self, attr_name, type_name):
+ return f'attribute_{attr_name}_{type_name}'
+
+ def to_function_name(self, method_name, type_name):
+ return f'function_{method_name}_{type_name}'
+
+ def to_var_name(self, var_name):
+ regex = re.compile(f'local_{self.current_function.name[9:]}_(.+)_\d+')
+ for node in reversed(self.localvars):
+ m = regex.match(node.name).groups()[0]
+ if m == var_name:
+ return node.name
+ for node in self.params:
+ if node.name == var_name:
+ return var_name
+ return None
+
+ def register_function(self, function_name):
+ node = FunctionNode(function_name, [], [], [], self.index)
+ self.fun_nodes.append(node)
+ return node
+
+ def register_type(self, type_name):
+ node = TypeNode(type_name)
+ self.types_nodes.append(node)
+ return node
+
+ def register_data(self, value):
+ vname = f'data_{len(self.data)}'
+ node = DataNode(vname, value, self.index)
+ self.data.append(node)
+ return node
+
+ def _define_binary_node(self, node: BinaryNode, scope: Scope, cil_node: ast_cil.Node):
+ result = self.define_internal_local()
+ left, typex = self.visit(node.left, scope)
+ right, typex = self.visit(node.right, scope)
+ self.register_instruction(cil_node(result, left, right))
+ return result, typex
+
+ def _define_unary_node(self, node: UnaryNode, scope: Scope, cil_node):
+ result = self.define_internal_local()
+ expr, typex = self.visit(node.expr, scope)
+ self.register_instruction(cil_node(result, expr))
+ return result, typex
+
+ def initialize_attr(self, constructor, attr: Attribute, scope: Scope):
+ if attr.expr:
+ constructor.body.expr_list.append(AssignNode(attr.name, attr.expr))
+ elif attr.type == 'Int':
+ constructor.body.expr_list.append(AssignNode(attr.name, ConstantNumNode(0)))
+ elif attr.type == 'Bool':
+ constructor.body.expr_list.append(AssignNode(attr.name, ConstantBoolNode(False)))
+ elif attr.type == 'String':
+ constructor.body.expr_list.append(AssignNode(attr.name, ConstantStrNode("")))
+ else:
+ constructor.body.expr_list.append(AssignNode(attr.name, ConstantVoidNode(attr.name)))
+
+ def built_in_functions(self):
+ func1_params = [ParamNode("self", 'Object')]
+ func1_localVars = [LocalNode("local_abort_Object_self_0")]
+ func1_instructions = [ast_cil.AssignNode(func1_localVars[0].name, func1_params[0].name, self.index),
+ ast_cil.ExitNode(func1_params[0].name, idx=self.index)]
+ func1 = FunctionNode("function_abort_Object", func1_params, func1_localVars, func1_instructions)
+
+ func2_params = [ParamNode("self", 'Object')]
+ func2_localVars = [LocalNode("local_type_name_Object_result_0")]
+ func2_instructions = [ast_cil.TypeOfNode(func2_params[0].name, func2_localVars[0].name, self.index),
+ ast_cil.ReturnNode(func2_localVars[0].name, self.index)]
+ func2 = FunctionNode("function_type_name_Object", func2_params, func2_localVars, func2_instructions)
+
+ func3_params = [ParamNode("self", 'Object')]
+ func3_localVars = [LocalNode("local_copy_Object_result_0")]
+ func3_instructions = [ast_cil.CopyNode(func3_localVars[0].name, func3_params[0].name, self.index),
+ ast_cil.ReturnNode(func3_localVars[0].name, self.index)]
+ func3 = FunctionNode("function_copy_Object", func3_params, func3_localVars, func3_instructions)
+
+ func4_params = [ParamNode("self", 'IO'), ParamNode("word", 'String')]
+ func4_localVars = [LocalNode("local_out_string_String_self_0")]
+ func4_instructions = [ast_cil.AssignNode(func4_localVars[0].name, func4_params[0].name, self.index),
+ ast_cil.OutStringNode(func4_params[1].name, self.index),
+ ast_cil.ReturnNode(func4_localVars[0].name, self.index)]
+ func4 = FunctionNode("function_out_string_IO", func4_params, func4_localVars, func4_instructions)
+
+ func5_params = [ParamNode("self", 'IO'), ParamNode("number", 'Int')]
+ func5_localVars = [LocalNode("local_out_int_IO_self_0")]
+ func5_instructions = [ast_cil.AssignNode(func5_localVars[0].name, func5_params[0].name, self.index),
+ ast_cil.OutIntNode(func5_params[1].name, self.index),
+ ast_cil.ReturnNode(func5_localVars[0].name, self.index)]
+ func5 = FunctionNode("function_out_int_IO", func5_params, func5_localVars, func5_instructions)
+
+ func6_params = [ParamNode("self", 'IO')]
+ func6_localVars = [LocalNode("local_in_int_IO_result_0")]
+ func6_instructions = [ast_cil.ReadIntNode(func6_localVars[0].name, self.index),
+ ast_cil.ReturnNode(func6_localVars[0].name, self.index)]
+ func6 = FunctionNode("function_in_int_IO", func6_params, func6_localVars, func6_instructions)
+
+ func7_params = [ParamNode("self", 'IO')]
+ func7_localVars = [LocalNode("local_in_string_IO_result_0")]
+ func7_instructions = [ast_cil.ReadStringNode(func7_localVars[0].name, self.index),
+ ast_cil.ReturnNode(func7_localVars[0].name, self.index)]
+ func7 = FunctionNode("function_in_string_IO", func7_params, func7_localVars, func7_instructions)
+
+ func8_params = [ParamNode("self", 'String')]
+ func8_localVars = [LocalNode("local_length_String_result_0")]
+ func8_instructions = [ast_cil.LengthNode(func8_localVars[0].name, func8_params[0].name, self.index),
+ ast_cil.ReturnNode(func8_localVars[0].name, self.index)]
+ func8 = FunctionNode("function_length_String", func8_params, func8_localVars, func8_instructions)
+
+ func9_params = [ParamNode("self", 'String'), ParamNode("word", 'String')]
+ func9_localVars = [LocalNode("local_concat_String_result_0")]
+ func9_instructions = [
+ ast_cil.ConcatNode(func9_localVars[0].name, func9_params[0].name, func9_params[1].name, self.index),
+ ast_cil.ReturnNode(func9_localVars[0].name, self.index)]
+ func9 = FunctionNode("function_concat_String", func9_params, func9_localVars, func9_instructions)
+
+ func10_params = [ParamNode("self", 'String'), ParamNode("begin", 'Int'), ParamNode("end", 'Int')]
+ func10_localVars = [LocalNode("local_substr_String_result_0")]
+ func10_instructions = [
+ ast_cil.SubstringNode(func10_localVars[0].name, func10_params[0].name, func10_params[1].name,
+ func10_params[2].name,
+ self.index),
+ ast_cil.ReturnNode(func10_localVars[0].name, self.index)]
+ func10 = FunctionNode("function_substr_String", func10_params, func10_localVars, func10_instructions)
+
+ func11_params = [ParamNode("self", 'String')]
+ func11_localVars = [LocalNode("local_type_name_String_result_0")]
+ func11_instructions = [ast_cil.LoadNode(func11_localVars[0].name, 'type_String', self.index),
+ ast_cil.ReturnNode(func11_localVars[0].name, self.index)]
+ func11 = FunctionNode("function_type_name_String", func11_params, func11_localVars, func11_instructions)
+
+ func12_params = [ParamNode("self", 'String')]
+ func12_localVars = [LocalNode("local_copy_String_result_0")]
+ func12_instructions = [ast_cil.ConcatNode(func12_localVars[0].name, func12_params[0].name, None, self.index),
+ ast_cil.ReturnNode(func12_localVars[0].name, self.index)]
+ func12 = FunctionNode("function_copy_String", func12_params, func12_localVars, func12_instructions)
+
+ func17_params = [ParamNode("self", 'String')]
+ func17_localVars = [LocalNode('local_abort_String_msg_0')]
+ func17_instructions = [ast_cil.LoadNode(func17_params[0].name, 'string_abort'),
+ ast_cil.OutStringNode(func17_params[0].name, self.index),
+ ast_cil.ExitNode(func17_params[0].name, idx=self.index)]
+ func17 = FunctionNode("function_abort_String", func17_params, func17_localVars, func17_instructions)
+
+ func13_params = [ParamNode("self", 'Int')]
+ func13_localVars = [LocalNode("local_type_name_Int_result_0")]
+ func13_instructions = [ast_cil.LoadNode(func13_localVars[0].name, 'type_Int', self.index),
+ ast_cil.ReturnNode(func13_localVars[0].name, self.index)]
+ func13 = FunctionNode("function_type_name_Int", func13_params, func13_localVars, func13_instructions)
+
+ func14_params = [ParamNode("self", 'Int')]
+ func14_localVars = [LocalNode("local_copy_Int_result_0")]
+ func14_instructions = [ast_cil.AssignNode(func14_localVars[0].name, func14_params[0].name),
+ ast_cil.ReturnNode(func14_localVars[0].name, self.index)]
+ func14 = FunctionNode("function_copy_Int", func14_params, func14_localVars, func14_instructions)
+
+ func18_params = [ParamNode("self", 'Int')]
+ func18_localVars = [LocalNode('local_abort_Int_msg_0')]
+ func18_instructions = [ast_cil.LoadNode(func18_params[0].name, 'int_abort'),
+ ast_cil.OutStringNode(func18_params[0].name, self.index),
+ ast_cil.ExitNode(func18_params[0].name, idx=self.index)]
+ func18 = FunctionNode("function_abort_Int", func18_params, func18_localVars, func18_instructions)
+
+ func15_params = [ParamNode("self", 'Bool')]
+ func15_localVars = [LocalNode("local_type_name_Bool_result_0")]
+ func15_instructions = [ast_cil.LoadNode(func15_localVars[0].name, 'type_Bool', self.index),
+ ast_cil.ReturnNode(func15_localVars[0].name, self.index)]
+ func15 = FunctionNode("function_type_name_Bool", func15_params, func15_localVars, func15_instructions)
+
+ func16_params = [ParamNode("self", 'Bool')]
+ func16_localVars = [LocalNode("local_copy_result_Bool_0")]
+ func16_instructions = [ast_cil.AssignNode(func16_localVars[0].name, func16_params[0].name),
+ ast_cil.ReturnNode(func16_localVars[0].name, self.index)]
+ func16 = FunctionNode("function_copy_Bool", func16_params, func16_localVars, func16_instructions)
+
+ func19_params = [ParamNode("self", 'Bool')]
+ func19_localVars = [LocalNode('local_abort_Bool_msg_0')]
+ func19_instructions = [ast_cil.LoadNode(func19_params[0].name, 'bool_abort'),
+ ast_cil.OutStringNode(func19_params[0].name, self.index),
+ ast_cil.ExitNode(func19_params[0].name, idx=self.index)]
+ func19 = FunctionNode("function_abort_Bool", func19_params, func19_localVars, func19_instructions)
+
+ self.fun_nodes += [func1, func2, func3, func4, func5, func6, func7, func8, func9, func10, func11, func12,
+ func13, func14, func15, func16, func17, func18, func19]
+ object_methods = [('abort', func1.name), ('type_name', func2.name), ('copy', func3.name)]
+ string_methods = [('length', func8.name), ('concat', func9.name), ('substr', func10.name),
+ ('abort', func17.name),
+ ('type_name', func11.name), ('copy', func12.name)]
+ io_methods = [('out_string', func4.name), ('out_int', func5.name), ('in_int', func6.name),
+ ('in_string', func7.name)]
+ int_methods = [('abort', func18.name), ('type_name', func13.name), ('copy', func14.name)]
+ bool_methods = [('abort', func19.name), ('type_name', func15.name), ('copy', func16.name)]
+
+ self.types_nodes += [TypeNode("Object", [], object_methods),
+ TypeNode("IO", [], object_methods + io_methods),
+ TypeNode("String", [], string_methods),
+ TypeNode('Int', [], int_methods),
+ TypeNode('Bool', [], bool_methods)]
+
+ def sort_option_nodes_by_type(self, case_list):
+ return sorted(case_list, reverse=True,
+ key=lambda x: self.context.get_depth(x.typex))
+
+ def check_void(self, expr):
+ result = self.define_internal_local()
+ self.register_instruction(ast_cil.TypeOfNode(expr, result))
+
+ void_expr = self.define_internal_local()
+ self.register_instruction(ast_cil.LoadNode(void_expr, self.void_data))
+ self.register_instruction(ast_cil.EqualNode(result, result, void_expr))
+ return result
+
+ def handle_arguments(self, args, scope, param_types):
+ args_node = []
+ args = [self.visit(arg, scope) for arg in args]
+
+ for (arg, typex), param_type in zip(args, param_types):
+ if typex.name in ['String', 'Int', 'Bool'] and param_type.name == 'Object':
+ auxiliar = self.define_internal_local()
+ self.register_instruction(ast_cil.BoxingNode(auxiliar, typex.name))
+ else:
+ auxiliar = arg
+ args_node.append(ast_cil.ArgNode(auxiliar, self.index))
+ return args_node
diff --git a/src/cool/codegen/codegen.py b/src/cool/codegen/codegen.py
new file mode 100644
index 000000000..a92a9f72d
--- /dev/null
+++ b/src/cool/codegen/codegen.py
@@ -0,0 +1,20 @@
+from .cil_visitor import CilVisitor
+from .mips_visitor import MipsVisitor
+from ..semantic.helpers import Context
+
+
+def run_pipeline(context: Context, ast, scope):
+ cool_to_cil = CilVisitor(context)
+ cil_ast = cool_to_cil.visit(ast, scope)
+
+ inherit_graph = context.build_inheritance_graph()
+
+ data_code, text_code = MipsVisitor(inherit_graph).visit(cil_ast)
+
+ return make_code(data_code, text_code)
+
+
+def make_code(data_code, text_code) -> str:
+ ans = '\n'.join(text_code) + '\n' + '\n'.join(data_code)
+
+ return ans
diff --git a/src/cool/codegen/mips_visitor.py b/src/cool/codegen/mips_visitor.py
new file mode 100644
index 000000000..0ec8a45e9
--- /dev/null
+++ b/src/cool/codegen/mips_visitor.py
@@ -0,0 +1,749 @@
+from .mipsgen import BaseMips
+from ..utils import visitor
+from .utils.tools import SymbolTable, AddrDescriptor, RegisterDescriptor, AddrType
+from ..semantic.helpers import VariableInfo
+from ..semantic.types import VOID_NAME
+from .utils.ast_cil import *
+
+
+class MipsVisitor(BaseMips):
+ @visitor.on('node')
+ def visit(self, node):
+ pass
+
+ @visitor.when(ProgramNode)
+ def visit(self, node: ProgramNode):
+ self.code.append('# debug: ProgramNode')
+ for type_ in node.type_node:
+ self.visit(type_)
+
+ self.save_meth_addr(node.func_node)
+ self.data_code.append(f"type_Void: .asciiz \"Void\"")
+ self.save_types_addr(node.type_node)
+
+ for d in node.data:
+ self.visit(d)
+
+ for code in node.func_node:
+ self.visit(code)
+
+ self.initialize_runtime_errors()
+
+ return self.data_code, self.code
+
+ @visitor.when(TypeNode)
+ def visit(self, node: TypeNode):
+ self.code.append('# debug: TypeNode')
+ self.obj_table.add_entry(node.name, node.methods, node.attributes)
+ self.data_code.append(
+ f"type_{node.name}: .asciiz \"{node.name}\"")
+
+ @visitor.when(DataNode)
+ def visit(self, node: DataNode):
+ self.code.append('# debug: DataNode')
+ self.data_code.append(f"{node.name}: .asciiz \"{node.value}\"")
+
+ @visitor.when(FunctionNode)
+ def visit(self, node: FunctionNode):
+ self.code.append('# debug: FunctionNode')
+ self.code.append('')
+ self.code.append(f'{node.name}:')
+ self.locals = 0
+ self.code.append('# Gets the params from the stack')
+ self.code.append(f'move $fp, $sp') # gets the frame pointer from the stack
+ n = len(node.params)
+ for i, param in enumerate(node.params, 1): # gets the params from the stack
+ self.visit(param, i, n)
+ self.code.append('# Gets the frame pointer from the stack')
+ for i, var in enumerate(node.localvars, len(node.params)):
+ self.visit(var, i)
+ self.locals = len(node.params) + len(node.localvars)
+ blocks = self.get_basic_blocks(node.instructions)
+ self.next_use = self.construct_next_use(blocks)
+
+ for block in blocks:
+ self.block = block
+ for inst in block:
+ self.inst = inst
+ self.get_reg(inst)
+ self.visit(inst)
+ inst = block[-1]
+ if not (isinstance(inst, GotoNode) or isinstance(inst, GotoIfNode) or isinstance(inst, ReturnNode) \
+ or isinstance(inst, StaticCallNode) or isinstance(inst, DynamicCallNode)):
+ self.empty_registers()
+
+ @visitor.when(ParamNode)
+ def visit(self, node: ParamNode, idx: int, length: int):
+ self.code.append('# debug: ParamNode')
+ self.symbol_table.insert_name(node.name)
+ self.var_address[node.name] = self.get_type(node.type)
+ self.code.append(f'# Pops the register with the param value {node.name}')
+ self.code.append('addiu $fp, $fp, 4')
+ self.addr_desc.insert_var(node.name, length - idx)
+
+ @visitor.when(LocalNode)
+ def visit(self, node: LocalNode, idx: int):
+ self.code.append('# debug: LocalNode')
+ self.symbol_table.insert_name(node.name)
+ self.addr_desc.insert_var(node.name, idx)
+ self.code.append(f'# Updates stack pointer pushing {node.name} to the stack')
+ self.code.append(f'addiu $sp, $sp, -4')
+
+ @visitor.when(AssignNode)
+ def visit(self, node: AssignNode):
+ self.code.append('# debug: AssignNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ self.code.append(f'# Moving {node.source} to {node.dest}')
+ if self.is_variable(node.source):
+ rsrc = self.addr_desc.get_var_reg(node.source)
+ self.code.append(f'move ${rdest}, ${rsrc}')
+ self.var_address[node.dest] = self.var_address[node.source]
+ elif self.is_int(node.source):
+ self.code.append(f'li ${rdest}, {node.source}')
+ self.var_address[node.dest] = AddrType.INT
+ self.save_var_code(node.dest)
+
+ @visitor.when(NotNode)
+ def visit(self, node: NotNode):
+ self.code.append('#debug: NotNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ rsrc = self.save_to_register(node.expr)
+ self.code.append(f'# {node.dest} <- ~{node.expr}')
+ self.code.append(f'not ${rdest}, ${rsrc}')
+ self.code.append(f'addi ${rdest}, ${rdest}, 1')
+ self.var_address[node.dest] = AddrType.INT
+
+ @visitor.when(LogicalNotNode)
+ def visit(self, node: LogicalNotNode):
+ self.code.append('#debug: LogicalNotNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ rsrc = self.save_to_register(node.expr)
+ self.code.append(f'# {node.dest} <- not {node.expr}')
+ self.code.append(f'beqz ${rsrc}, false_{self.loop_idx}')
+ self.code.append(f'li ${rdest}, 0')
+ self.code.append(f'j end_{self.loop_idx}')
+ self.code.append(f'false_{self.loop_idx}:')
+ self.code.append(f'li ${rdest}, 1')
+ self.code.append(f'end_{self.loop_idx}:')
+ self.loop_idx += 1
+ self.var_address[node.dest] = AddrType.BOOL
+
+ @visitor.when(PlusNode)
+ def visit(self, node: PlusNode):
+ self.code.append('#debug: PlusNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ self.code.append(f'# {node.dest} <- {node.left} + {node.right}')
+ if self.is_variable(node.left):
+ rleft = self.addr_desc.get_var_reg(node.left)
+ if self.is_variable(node.right):
+ rright = self.addr_desc.get_var_reg(node.right)
+ self.code.append(f"add ${rdest}, ${rleft}, ${rright}")
+ elif self.is_int(node.right):
+ self.code.append(f"addi ${rdest}, ${rleft}, {node.right}")
+ elif self.is_int(node.left):
+ if self.is_int(node.right):
+ self.code.append(f"li ${rdest}, {node.left + node.right}")
+ elif self.is_variable(node.right):
+ rright = self.addr_desc.get_var_reg(node.right)
+ self.code.append(f"addi ${rdest}, ${rright}, {node.left}")
+ self.var_address[node.dest] = AddrType.INT
+
+ @visitor.when(MinusNode)
+ def visit(self, node: MinusNode):
+ self.code.append('#debug: MinusNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ self.code.append(f'# {node.dest} <- {node.left} - {node.right}')
+ if self.is_variable(node.left):
+ rleft = self.addr_desc.get_var_reg(node.left)
+ if self.is_variable(node.right):
+ rright = self.addr_desc.get_var_reg(node.right)
+ self.code.append(f"sub ${rdest}, ${rleft}, ${rright}")
+ elif self.is_int(node.right):
+ self.code.append(f"addi ${rdest}, ${rleft}, -{node.right}")
+ elif self.is_int(node.left):
+ if self.is_int(node.right):
+ self.code.append(f"li ${rdest}, {node.left - node.right}")
+ elif self.is_variable(node.right):
+ rright = self.addr_desc.get_var_reg(node.right)
+ self.code.append(f"sub $t9, $zero, {rright}")
+ self.code.append(f"addi ${rdest}, {node.left}, $t9")
+ self.var_address[node.dest] = AddrType.INT
+
+ @visitor.when(StarNode)
+ def visit(self, node: StarNode):
+ self.code.append('#debug: StartNode')
+ self.code.append(f'# {node.dest} <- {node.left} * {node.right}')
+ self._code_to_mult_div(node, op='mult', func_op=lambda x, y: x * y)
+
+ @visitor.when(DivNode)
+ def visit(self, node: DivNode):
+ self.code.append('#debug: DivNode')
+ self.code.append(f'# {node.dest} <- {node.left} / {node.right}')
+ self._code_to_mult_div(node, op='div', func_op=lambda x, y: int(x / y))
+
+ def _code_to_mult_div(self, node, op: str, func_op):
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ if self.is_int(node.left) and self.is_int(node.right):
+ try:
+ self.code.append(f"li ${rdest}, {func_op(node.left, node.right)}")
+ except ZeroDivisionError:
+ self.code.append('la $a0, zero_error')
+ self.code.append('j .raise')
+ else:
+ if self.is_variable(node.left):
+ rleft = self.addr_desc.get_var_reg(node.left)
+ if self.is_variable(node.right):
+ rright = self.addr_desc.get_var_reg(node.right)
+ elif self.is_int(node.right):
+ self.code.append(f"li $t9, {node.right}")
+ rright = 't9'
+ elif self.is_int(node.left):
+ # right es una variable porque falló el primer if
+ rright = self.addr_desc.get_var_reg(node.right)
+ self.code.append(f"li $t9, {node.left}")
+ rleft = 't9'
+ if op == 'div':
+ self.code.append('la $a0, zero_error')
+ self.code.append(f'beqz ${rright}, .raise')
+ self.code.append(f"{op} ${rleft}, ${rright}")
+ self.code.append(f"mflo ${rdest}")
+ self.var_address[node.dest] = AddrType.INT
+
+ @visitor.when(LessNode)
+ def visit(self, node: LessNode):
+ self.code.append('#debug: LessNode')
+ self.code.append(f'# {node.dest} <- {node.left} < {node.right}')
+ self._code_to_comp(node, 'slt', lambda x, y: x < y)
+
+ @visitor.when(LessEqNode)
+ def visit(self, node: LessEqNode):
+ self.code.append('#debug: LessEqNode')
+ self.code.append(f'# {node.dest} <- {node.left} <= {node.right}')
+ self._code_to_comp(node, 'sle', lambda x, y: x <= y)
+
+ @visitor.when(EqualNode)
+ def visit(self, node: EqualNode):
+ self.code.append('#debug: EqualNode')
+ self.code.append(f'# {node.dest} <- {node.left} = {node.right}')
+ if self.is_variable(node.left) and self.is_variable(node.right) and self.var_address[
+ node.left] == AddrType.STR and self.var_address[node.right] == AddrType.STR:
+ self.compare_strings(node)
+ else:
+ self._code_to_comp(node, 'seq', lambda x, y: x == y)
+
+ def _code_to_comp(self, node, op, func_op):
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ if self.is_variable(node.left):
+ rleft = self.addr_desc.get_var_reg(node.left)
+ if self.is_variable(node.right):
+ rright = self.addr_desc.get_var_reg(node.right)
+ self.code.append(f"{op} ${rdest}, ${rleft}, ${rright}")
+ elif self.is_int(node.right):
+ self.code.append(f"li $t9, {node.right}")
+ self.code.append(f"{op} ${rdest}, ${rleft}, $t9")
+ elif self.is_int(node.left):
+ if self.is_int(node.right):
+ self.code.append(f"li ${rdest}, {int(func_op(node.left, node.right))}")
+ elif self.is_variable(node.right):
+ rright = self.addr_desc.get_var_reg(node.right)
+ self.code.append(f"li $t9, {node.left}")
+ self.code.append(f"{op} ${rdest}, $t9, ${rright}")
+ self.var_address[node.dest] = AddrType.BOOL
+
+ @visitor.when(GetAttribNode)
+ def visit(self, node: GetAttribNode):
+ self.code.append('#debug: GetAttribNode')
+ self.code.append(f'# {node.dest} <- GET {node.obj} . {node.attr}')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ self.var_address[node.dest] = self.get_type(node.attr_type)
+ rsrc = self.addr_desc.get_var_reg(node.obj)
+ attr_offset = 4 * self.get_attr_offset(node.attr, node.type_name)
+ self.code.append(f'lw ${rdest}, {attr_offset}(${rsrc})')
+
+ @visitor.when(SetAttribNode)
+ def visit(self, node: SetAttribNode):
+ self.code.append('#debug: SetAttribNode')
+ self.code.append(f'# {node.obj} . {node.attr} <- SET {node.value}')
+ rdest = self.addr_desc.get_var_reg(node.obj)
+ attr_offset = 4 * self.get_attr_offset(node.attr, node.type_name)
+ if self.is_variable(node.value):
+ rsrc = self.addr_desc.get_var_reg(node.value)
+ elif self.is_int(node.value):
+ self.code.append(f'li $t9, {node.value}')
+ rsrc = 't9'
+ elif self.is_void(node.value):
+ self.code.append(f'la $t9, type_{VOID_NAME}')
+ rsrc = 't9'
+ self.code.append(f'sw ${rsrc}, {attr_offset}(${rdest})') # saves the new value in the attr offset
+
+ @visitor.when(AllocateNode)
+ def visit(self, node: AllocateNode):
+ self.code.append('#debug: AllocateNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ size = 4 * self.obj_table.size_of_entry(node.type)
+ self.var_address[node.dest] = AddrType.REF
+
+ self.code.append('# Syscall to allocate memory of the object entry in heap')
+ self.code.append('li $v0, 9')
+ self.code.append(f'li $a0, {size}')
+ self.code.append('syscall')
+ addrs_stack = self.addr_desc.get_var_addr(node.dest)
+
+ self.code.append('# Loads the name of the variable and saves the name like the first field')
+ self.code.append(f'la $t9, type_{node.type}')
+ self.code.append(f'sw $t9, 0($v0)')
+
+ self.code.append(f'# Saves the size of the node')
+ self.code.append(f'li $t9, {size}')
+ self.code.append(f'sw $t9, 4($v0)')
+ self.code.append(f'move ${rdest}, $v0')
+
+ idx = self.types.index(node.type)
+ self.code.append('# Adding Type Info addr')
+ self.code.append('la $t8, types')
+ self.code.append(f'lw $v0, {4 * idx}($t8)')
+ self.code.append(f'sw $v0, 8(${rdest})')
+
+ @visitor.when(TypeOfNode)
+ def visit(self, node: TypeOfNode):
+ self.code.append('#debug: TypeOfNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ self.code.append(f'# {node.dest} <- Type of {node.obj}')
+ if self.is_variable(node.obj):
+ rsrc = self.addr_desc.get_var_reg(node.obj)
+ if self.var_address[node.obj] == AddrType.REF:
+ self.code.append(f'lw ${rdest}, 0(${rsrc})')
+ elif self.var_address[node.obj] == AddrType.STR:
+ self.code.append(f'la ${rdest}, type_String')
+ elif self.var_address[node.obj] == AddrType.INT:
+ self.code.append(f'la ${rdest}, type_Int')
+ elif self.var_address[node.obj] == AddrType.BOOL:
+ self.code.append(f'la ${rdest}, type_Bool')
+ elif self.is_int(node.obj):
+ self.code.append(f'la ${rdest}, type_Int')
+ self.var_address[node.dest] = AddrType.STR
+
+ @visitor.when(LabelNode)
+ def visit(self, node: LabelNode):
+ self.code.append('#debug: LabelNode')
+ self.code.append(f'{node.label}:')
+
+ @visitor.when(GotoNode)
+ def visit(self, node: GotoNode):
+ self.code.append('#debug: GotoNode')
+ self.empty_registers()
+ self.code.append(f'j {node.label}')
+
+ @visitor.when(GotoIfNode)
+ def visit(self, node: GotoIfNode):
+ self.code.append('#debug: GotoIfNode')
+ reg = self.save_to_register(node.cond)
+ self.code.append(f'# If {node.cond} goto {node.label}')
+ self.empty_registers()
+ self.code.append(f'bnez ${reg}, {node.label}')
+
+ @visitor.when(GotoIfFalseNode)
+ def visit(self, node: GotoIfNode):
+ self.code.append('#debug: GotoIfFalseNode')
+ reg = self.save_to_register(node.cond)
+ self.code.append(f'# If not {node.cond} goto {node.label}')
+ self.empty_registers()
+ self.code.append(f'beqz ${reg}, {node.label}')
+
+ @visitor.when(StaticCallNode)
+ def visit(self, node: StaticCallNode):
+ self.code.append('#debug: StaticCallNode')
+ function = self.dispatch_table.find_full_name(node.type, node.function)
+ self.code.append(f'# Static Dispatch of the method {node.function}')
+ self._code_to_function_call(node.args, function, node.dest)
+
+ self.var_address[node.dest] = self.get_type(node.return_type)
+
+ @visitor.when(DynamicCallNode)
+ def visit(self, node: DynamicCallNode):
+ self.code.append('#debug: DynamicCallNode')
+ self.code.append('# Find the actual name in the dispatch table')
+ reg = self.addr_desc.get_var_reg(node.obj)
+ self.code.append('# Gets in a0 the actual direction of the dispatch table')
+ self.code.append(f'lw $t9, 8(${reg})')
+ self.code.append('lw $a0, 8($t9)')
+ function = self.dispatch_table.find_full_name(node.type, node.method)
+ index = 4 * self.dispatch_table.get_offset(node.type, function) + 4
+ self.code.append(f'# Saves in t8 the direction of {function}')
+ self.code.append(f'lw $t8, {index}($a0)')
+ self._code_to_function_call(node.args, '$t8', node.dest, function)
+
+ self.var_address[node.dest] = self.get_type(node.return_type)
+
+ def _code_to_function_call(self, args, function, dest, function_name=None):
+ self.push_register('fp')
+ self.push_register('ra')
+ self.code.append('# Push the arguments to the stack')
+ for arg in reversed(args):
+ self.visit(arg)
+ self.code.append('# Empty all used registers and saves them to memory')
+ self.empty_registers()
+ self.code.append('# This function will consume the arguments')
+ self.code.append(f'jal {function}')
+ self.code.append('# Pop ra register of return function of the stack')
+ self.pop_register('ra')
+ self.code.append('# Pop fp register from the stack')
+ self.pop_register('fp')
+ if dest is not None:
+ self.get_reg_var(dest)
+ rdest = self.addr_desc.get_var_reg(dest)
+ self.code.append('# saves the return value')
+ self.code.append(f'move ${rdest}, $v0')
+
+ @visitor.when(ArgNode)
+ def visit(self, node: ArgNode):
+ self.code.append('#debug: ArgNode')
+ self.code.append('# The rest of the arguments are push into the stack')
+ if self.is_variable(node.dest):
+ self.get_reg_var(node.dest)
+ reg = self.addr_desc.get_var_reg(node.dest)
+ self.code.append(f'sw ${reg}, ($sp)')
+ elif self.is_int(node.dest):
+ self.code.append(f'li $t9, {node.dest}')
+ self.code.append(f'sw $t9, ($sp)')
+ self.code.append('addiu $sp, $sp, -4')
+
+ @visitor.when(ReturnNode)
+ def visit(self, node: ReturnNode):
+ self.code.append('#debug: ReturnNode')
+ if self.is_variable(node.value):
+ rdest = self.addr_desc.get_var_reg(node.value)
+ self.code.append(f'move $v0, ${rdest}')
+ elif self.is_int(node.value):
+ self.code.append(f'li $v0, {node.value}')
+ self.code.append('# Empty all used registers and saves them to memory')
+ self.empty_registers()
+ self.code.append('# Removing all locals from stack')
+ self.code.append(f'addiu $sp, $sp, {self.locals * 4}')
+ self.code.append(f'jr $ra')
+ self.code.append('')
+
+ @visitor.when(LoadNode)
+ def visit(self, node: LoadNode):
+ self.code.append('#debug: LoadNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ self.code.append(f'# Saves in {node.dest} {node.msg}')
+ self.var_address[node.dest] = AddrType.STR
+ self.code.append(f'la ${rdest}, {node.msg}')
+
+ @visitor.when(LengthNode)
+ def visit(self, node: LengthNode):
+ self.code.append('#debug: LengthNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ reg = self.addr_desc.get_var_reg(node.arg)
+ loop = f'loop_{self.loop_idx}'
+ end = f'end_{self.loop_idx}'
+ self.code.append(f'move $t8, ${reg}')
+ self.code.append('# Get length of a string')
+ self.code.append(f'{loop}:')
+ self.code.append(f'lb $t9, 0($t8)')
+ self.code.append(f'beq $t9, $zero, {end}')
+ self.code.append(f'addi $t8, $t8, 1')
+ self.code.append(f'j {loop}')
+ self.code.append(f'{end}:')
+ self.code.append(f'sub ${rdest}, $t8, ${reg}')
+ self.loop_idx += 1
+
+ @visitor.when(ConcatNode)
+ def visit(self, node: ConcatNode):
+ self.code.append('#debug: ConcatFNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ self.code.append('# Allocating memory for the buffer')
+ self.code.append('li $a0, 356')
+ self.code.append('li $v0, 9')
+ self.code.append('syscall')
+ self.code.append(f'move ${rdest}, $v0')
+ rsrc1 = self.addr_desc.get_var_reg(node.arg1)
+ if node.arg2 is not None:
+ rsrc2 = self.addr_desc.get_var_reg(node.arg2)
+ self.code.append('# Copy the first string to dest')
+ var = self.save_reg_if_occupied('a1')
+ self.code.append(f'move $a0, ${rsrc1}')
+ self.code.append(f'move $a1, ${rdest}')
+ self.push_register('ra')
+ self.code.append('jal strcopier')
+
+ if node.arg2 is not None:
+ self.code.append('# Concatenate second string on result buffer')
+ self.code.append(f'move $a0, ${rsrc2}')
+ self.code.append(f'move $a1, $v0')
+ self.code.append('jal strcopier')
+ self.code.append('sb $0, 0($v0)')
+ self.pop_register('ra')
+ self.code.append(f'j finish_{self.loop_idx}')
+
+ if self.first_defined['strcopier']:
+ self.code.append('# Definition of strcopier')
+ self.code.append('strcopier:')
+ self.code.append('# In a0 is the source and in a1 is the destination')
+ self.code.append(f'loop_{self.loop_idx}:')
+ self.code.append('lb $t8, ($a0)')
+ self.code.append(f'beq $t8, $zero, end_{self.loop_idx}')
+ self.code.append('addiu $a0, $a0, 1')
+ self.code.append('sb $t8, ($a1)')
+ self.code.append('addiu $a1, $a1, 1')
+ self.code.append(f'b loop_{self.loop_idx}')
+ self.code.append(f'end_{self.loop_idx}:')
+ self.code.append('move $v0, $a1')
+ self.code.append('jr $ra')
+ self.first_defined['strcopier'] = False
+
+ self.code.append(f'finish_{self.loop_idx}:')
+ self.load_var_if_occupied(var)
+ self.loop_idx += 1
+
+ @visitor.when(SubstringNode)
+ def visit(self, node: SubstringNode):
+ self.code.append('#debug: SubstringNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ self.code.append('# Allocating memory for the buffer')
+ self.code.append('li $a0, 356')
+ self.code.append('li $v0, 9')
+ self.code.append('syscall')
+ self.code.append(f'move ${rdest}, $v0')
+
+ if self.is_variable(node.begin):
+ rstart = self.addr_desc.get_var_reg(node.begin)
+ elif self.is_int(node.begin):
+ rstart = 't8'
+ self.code.append(f'li $t8, {node.begin}')
+ if self.is_variable(node.end):
+ rend = self.addr_desc.get_var_reg(node.end)
+ var = None
+ elif self.is_int(node.end):
+ var = self.save_reg_if_occupied('a3')
+ rend = 'a3'
+ self.code.append(f'li $a3, {node.end}')
+
+ self.get_reg_var(node.word)
+ rself = self.addr_desc.get_var_reg(node.word)
+
+ self.code.append("# Getting the substring of a node")
+ start = f'start_{self.loop_idx}'
+ error = f'error_{self.loop_idx}'
+ end_lp = f'end_len_{self.loop_idx}'
+ self.code.append('# Move to the first position in the string')
+ self.code.append('li $v0, 0')
+ self.code.append(f'move $t8, ${rself}')
+ self.code.append(f'{start}:')
+ self.code.append('lb $t9, 0($t8)')
+ self.code.append(f'beqz $t9, {error}')
+ self.code.append('addi $v0, 1')
+ self.code.append(f'bgt $v0, ${rstart}, {end_lp}')
+ self.code.append(f'addi $t8, 1')
+ self.code.append(f'j {start}')
+ self.code.append(f'{end_lp}:')
+ self.code.append('# Saving dest to iterate over him')
+ self.code.append(f'move $v0, ${rdest}')
+
+ loop = f'loop_{self.loop_idx}'
+ end = f'end_{self.loop_idx}'
+
+ self.code.append(f'{loop}:')
+ self.code.append(f'sub $t9, $v0, ${rdest}')
+ self.code.append(f'beq $t9, ${rend}, {end}')
+ self.code.append(f'lb $t9, 0($t8)')
+ self.code.append(f'beqz $t9, {error}')
+ self.code.append(f'sb $t9, 0($v0)')
+ self.code.append('addi $t8, $t8, 1')
+ self.code.append(f'addi $v0, $v0, 1')
+ self.code.append(f'j {loop}')
+ self.code.append(f'{error}:')
+ self.code.append('la $a0, index_error')
+ self.code.append('li $v0, 4')
+ self.code.append(f'move $a0, ${rself}')
+ self.code.append('syscall')
+ self.code.append('li $v0, 1')
+ self.code.append(f'move $a0, ${rstart}')
+ self.code.append('syscall')
+ self.code.append('li $v0, 1')
+ self.code.append(f'move $a0, ${rend}')
+ self.code.append('syscall')
+ self.code.append('j .raise')
+ self.code.append(f'{end}:')
+ self.code.append('sb $0, 0($v0)')
+ self.load_var_if_occupied(var)
+ self.loop_idx += 1
+
+ @visitor.when(OutStringNode)
+ def visit(self, node: OutStringNode):
+ self.code.append('#debug: OutStringNode')
+ reg = self.addr_desc.get_var_reg(node.value)
+ self.code.append('# Printing a string')
+ self.code.append('li $v0, 4')
+ self.code.append(f'move $a0, ${reg}')
+ self.code.append('syscall')
+
+ @visitor.when(OutIntNode)
+ def visit(self, node: OutIntNode):
+ self.code.append('#debug: OutIntNode')
+ if self.is_variable(node.value):
+ reg = self.addr_desc.get_var_reg(node.value)
+ elif self.is_int(node.value):
+ reg = 't8'
+ self.code.append(f'li $t8, ${node.value}')
+
+ self.code.append('# Printing an int')
+ self.code.append('li $v0, 1')
+ self.code.append(f'move $a0, ${reg}')
+ self.code.append('syscall')
+
+ @visitor.when(ReadStringNode)
+ def visit(self, node: ReadStringNode):
+ self.code.append('#debug: ReadStringNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ self.code.append('# Allocating memory for the buffer')
+ self.code.append('li $a0, 356')
+ self.code.append('li $v0, 9')
+ self.code.append('syscall')
+ self.code.append(f'move ${rdest}, $v0')
+ self.code.append('# Reading a string')
+ var = self.save_reg_if_occupied('a1')
+ self.code.append('# Putting buffer in a0')
+ self.code.append(f'move $a0, ${rdest}') # Get length of the string
+ self.code.append('# Putting length of string in a1')
+ self.code.append(f'li $a1, 356')
+ self.code.append('li $v0, 8')
+ self.code.append('syscall')
+ start = f'start_{self.loop_idx}'
+ end = f'end_{self.loop_idx}'
+
+ self.code.append(f'move $t9, ${rdest}')
+ self.code.append(f'{start}:')
+ self.code.append('lb $t8, 0($t9)')
+ self.code.append(f"beqz $t8, {end}")
+ self.code.append('add $t9, $t9, 1')
+ self.code.append(f'j {start}')
+ self.code.append(f'{end}:')
+ self.code.append('addiu $t9, $t9, -1')
+ self.code.append('sb $0, ($t9)')
+ self.loop_idx += 1
+ self.load_var_if_occupied(var)
+
+ @visitor.when(ReadIntNode)
+ def visit(self, node: ReadIntNode):
+ self.code.append('#debug: ReadIntNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ self.code.append('# Reading a int')
+ self.code.append('li $v0, 5')
+ self.code.append('syscall')
+ self.code.append(f'move ${rdest}, $v0')
+
+ @visitor.when(ExitNode)
+ def visit(self, node: ExitNode):
+ self.code.append('#debug: ExitNode')
+ self.code.append('# Exiting the program')
+ if self.is_variable(node.value):
+ reg = self.addr_desc.get_var_reg(node.value)
+ elif self.is_int(node.value):
+ reg = 't8'
+ self.code.append(f'li $t8, {node.value}')
+
+ rself = self.addr_desc.get_var_reg(node.classx)
+ if self.var_address[node.classx] == AddrType.REF:
+ self.code.append('# Printing abort message')
+ self.code.append('li $v0, 4')
+ self.code.append(f'la $a0, abort_msg')
+ self.code.append('syscall')
+ self.code.append('li $v0, 4')
+ self.code.append(f'lw $a0, 0(${rself})')
+ self.code.append('syscall')
+ self.code.append('li $v0, 4')
+ self.code.append(f'la $a0, new_line')
+ self.code.append('syscall')
+
+ self.code.append('li $v0, 17')
+ self.code.append(f'move $a0, ${reg}')
+ self.code.append('syscall')
+
+ @visitor.when(CopyNode)
+ def visit(self, node: CopyNode):
+ self.code.append('#debug: CopyNode')
+
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ rsrc = self.addr_desc.get_var_reg(node.source)
+
+ self.code.append(f'lw $t9, 4(${rsrc})')
+ self.code.append('# Syscall to allocate memory of the object entry in heap')
+ self.code.append('li $v0, 9')
+ self.code.append(f'move $a0, $t9')
+ self.code.append('syscall')
+ self.code.append(f'move ${rdest}, $v0')
+ self.code.append('# Loop to copy every field of the previous object')
+ self.code.append('# t8 the register to loop')
+ self.code.append('li $t8, 0')
+ self.code.append(f'loop_{self.loop_idx}:')
+ self.code.append('# In t9 is stored the size of the object')
+ self.code.append(f'bge $t8, $t9, exit_{self.loop_idx}')
+ self.code.append(f'lw $a0, (${rsrc})')
+ self.code.append('sw $a0, ($v0)')
+ self.code.append('addi $v0, $v0, 4')
+ self.code.append(f'addi ${rsrc}, ${rsrc}, 4')
+ self.code.append('# Increase loop counter')
+ self.code.append('addi $t8, $t8, 4')
+ self.code.append(f'j loop_{self.loop_idx}')
+ self.code.append(f'exit_{self.loop_idx}:')
+ self.loop_idx += 1
+
+ @visitor.when(ConformsNode)
+ def visit(self, node: ConformsNode):
+ self.code.append('#debug: ConformsNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ if self.is_variable(node.expr):
+ rsrc = self.addr_desc.get_var_reg(node.expr)
+ if self.var_address[node.expr] == AddrType.REF:
+ self.conforms_to(rsrc, rdest, node.type)
+ elif self.var_address[node.expr] == AddrType.STR:
+ self.value_conforms_to_obj(rdest, 'String', node.type)
+ elif self.var_address[node.expr] == AddrType.INT:
+ self.value_conforms_to_obj(rdest, 'Int', node.type)
+ elif self.var_address[node.expr] == AddrType.BOOL:
+ self.value_conforms_to_obj(rdest, 'Bool', node.type)
+ elif self.is_int(node.expr):
+ self.value_conforms_to_obj(rdest, 'Int', node.type)
+
+ @visitor.when(ErrorNode)
+ def visit(self, node: ErrorNode):
+ self.code.append('#debug: ErrorNode')
+ self.code.append(f'la $a0, {node.type}')
+ self.code.append('j .raise')
+
+ @visitor.when(VoidConstantNode)
+ def visit(self, node: VoidConstantNode):
+ self.code.append('#debug: VoidConstantNode')
+ rdest = self.addr_desc.get_var_reg(node.out)
+ self.code.append('# Initialize void node')
+ self.code.append(f'li $a0, 4')
+ self.code.append('li $v0, 9')
+ self.code.append('syscall')
+ self.code.append('# Loads the name of the variable and saves the name like the first field')
+ self.code.append(f'la $t9, type_{VOID_NAME}')
+ self.code.append('sw $t9, 0($v0)')
+ self.code.append(f'move ${rdest}, $v0')
+ self.var_address[node.obj] = AddrType.REF
+
+ @visitor.when(BoxingNode)
+ def visit(self, node: BoxingNode):
+ self.code.append('#debug: BoxingNode')
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ self.code.append('# Initialize new node')
+ self.code.append('li $a0, 12')
+ self.code.append('li $v0, 9')
+ self.code.append('syscall')
+ self.code.append(f'la $t9, type_{node.type}')
+ self.code.append('sw $t9, 0($v0)')
+ self.code.append('li $t9, 12')
+ self.code.append('sw $t9, 4($v0)')
+ self.code.append(f'move ${rdest}, $v0')
+ self.code.append('# Saving the methods of object')
+ idx = self.types.index('Object')
+ self.code.append('# Adding Type Info addr')
+ self.code.append('la $t8, types')
+ self.code.append(f'lw $v0, {4 * idx}($t8)')
+ self.code.append(f'sw $v0, 8(${rdest})')
+ self.var_address[node.dest] = AddrType.REF
diff --git a/src/cool/codegen/mipsgen.py b/src/cool/codegen/mipsgen.py
new file mode 100644
index 000000000..57d97e9b4
--- /dev/null
+++ b/src/cool/codegen/mipsgen.py
@@ -0,0 +1,418 @@
+from .utils.tools import *
+from typing import List
+from ..semantic.helpers import VariableInfo
+from ..semantic.types import Attribute
+from .utils.ast_cil import *
+
+
+class BaseMips:
+ def __init__(self, inherit_graph):
+ self.code: list = ['.text', '.globl main', 'main:']
+ self.data_code = ['.data']
+ self.symbol_table = SymbolTable()
+ self.reg_desc = RegisterDescriptor()
+ self.addr_desc = AddrDescriptor()
+ self.dispatch_table: DispatchTable = DispatchTable()
+ self.obj_table: ObjTable = ObjTable(self.dispatch_table)
+ self.initialize_methods()
+ self.get_abort_messages()
+ self.var_address = {'self': AddrType.REF}
+ self.loop_idx = 0
+ self.first_defined = {'strcopier': True}
+ self.inherit_graph = inherit_graph
+ self.space_idx = 0
+
+ def initialize_methods(self):
+ self.methods = []
+ for entry in self.obj_table:
+ entry: ObjTabEntry
+ self.methods.extend(entry.dispatch_table_entry)
+
+ def initialize_runtime_errors(self):
+ self.code.append('# Raise exception method')
+ self.code.append('.raise:')
+ self.code.append('li $v0, 4')
+ self.code.append('syscall')
+ self.code.append('li $v0, 17')
+ self.code.append('li $a0, 1')
+ self.code.append('syscall\n')
+ self.data_code.append('zero_error: .asciiz \"Division by zero error\n\"')
+ self.data_code.append('case_void_error: .asciiz \"Case on void error\n\"')
+ self.data_code.append('dispatch_error: .asciiz \"Dispatch on void error\n\"')
+ self.data_code.append('case_error: .asciiz \"Case statement without a matching branch error\n\"')
+ self.data_code.append('index_error: .asciiz \"Substring out of range error\n\"')
+ self.data_code.append('heap_error: .asciiz \"Heap overflow error\n\"') # no idea how to check for this
+
+ def get_abort_messages(self):
+ self.data_code.append("abort_msg: .asciiz \"Abort called from class \"")
+ self.data_code.append(f"new_line: .asciiz \"\n\"")
+ self.data_code.append('string_abort: .asciiz \"Abort called from class String\n\"')
+ self.data_code.append('int_abort: .asciiz \"Abort called from class Int\n\"')
+ self.data_code.append('bool_abort: .asciiz \"Abort called from class Bool\n\"')
+
+ def get_basic_blocks(self, instructions: List[InstructionNode]):
+ leaders = self.find_leaders(instructions)
+ blocks = [instructions[leaders[i - 1]:leaders[i]] for i in range(1, len(leaders))]
+ return blocks
+
+ def find_leaders(self, instructions: List[InstructionNode]):
+ leaders = {0, len(instructions)}
+ for i, inst in enumerate(instructions):
+ if isinstance(inst, GotoNode) or isinstance(inst, GotoIfNode) or isinstance(inst, ReturnNode) \
+ or isinstance(inst, StaticCallNode) or isinstance(inst, DynamicCallNode):
+ leaders.add(i + 1)
+ elif isinstance(inst, LabelNode) or isinstance(inst, FunctionNode):
+ leaders.add(i)
+ return sorted(list(leaders))
+
+ def is_variable(self, expr):
+ return isinstance(expr, str)
+
+ def is_int(self, expr):
+ return isinstance(expr, int)
+
+ def is_void(self, expr):
+ return isinstance(expr, VoidConstantNode)
+
+ def add_entry_symb_tab(self, name):
+ self.symbol_table.insert(name)
+
+ def construct_next_use(self, basic_blocks: List[List[InstructionNode]]):
+ next_use = {}
+ for basic_block in basic_blocks:
+ for x in self.symbol_table:
+ self.symbol_table[x].is_live = False
+ self.symbol_table[x].next_use = None
+
+ for inst in reversed(basic_block):
+ in1 = inst.in1 if self.is_variable(inst.in1) else None
+ in2 = inst.in2 if self.is_variable(inst.in2) else None
+ out = inst.out if self.is_variable(inst.out) else None
+
+ in1nextuse, in2nextuse, outnextuse = None, None, None
+ in1islive, in2islive, outislive = False, False, False
+
+ entry_in1 = self.symbol_table.lookup(in1)
+ entry_in2 = self.symbol_table.lookup(in2)
+ entry_out = self.symbol_table.lookup(out)
+ if out is not None:
+ if entry_out is not None:
+ outnextuse = entry_out.next_use
+ outislive = entry_out.is_live
+ else:
+ entry_out = SymbolTabEntry(out)
+ entry_out.next_use = None
+ entry_out.is_live = False
+ self.symbol_table.insert(entry_out)
+ if in1 is not None:
+ if entry_in1 is not None:
+ in1nextuse = entry_in1.next_use
+ in1islive = entry_in1.is_live
+ else:
+ entry_in1 = SymbolTabEntry(out)
+ entry_in1.next_use = inst.index
+ entry_in1.is_live = True
+ self.symbol_table.insert(entry_in1)
+ if in2 is not None:
+ if entry_in2 is not None:
+ in2nextuse = entry_in2.next_use
+ in2islive = entry_in2.is_live
+ else:
+ entry_in2 = SymbolTabEntry(in2)
+ entry_in2.next_use = inst.index
+ entry_in2.is_live = True
+
+ self.symbol_table.insert(entry_in2)
+
+ n_entry = NextUseEntry(in1, in2, out, in1nextuse, in2nextuse, outnextuse, in1islive, in2islive,
+ outislive)
+ next_use[inst.index] = n_entry
+ return next_use
+
+ def get_reg(self, inst: InstructionNode):
+ if self.is_variable(inst.in1):
+ in1_reg = self.get_reg_var(inst.in1)
+ if self.is_variable(inst.in2):
+ in2_reg = self.get_reg_var(inst.in2)
+
+ nu_entry = self.next_use[inst.index]
+ if nu_entry.in1islive and nu_entry.in1nextuse < inst.index:
+ self.update_register(inst.out, in1_reg)
+ return
+ if nu_entry.in2islive and nu_entry.in2nextuse < inst.index:
+ self.update_register(inst.out, in2_reg)
+ return
+ if self.is_variable(inst.out):
+ self.get_reg_var(inst.out)
+
+ def get_reg_var(self, var):
+ curr_inst = self.inst
+ register = self.addr_desc.get_var_reg(var)
+ if register is not None:
+ return register
+
+ register = self.reg_desc.find_empty_reg()
+ if register is not None:
+ self.update_register(var, register)
+ self.load_var_code(var)
+ return register
+
+ next_use = self.next_use[curr_inst.index]
+ score = self.initialize_score()
+ for inst in self.block[1:]:
+ inst: InstructionNode
+ if self.is_variable(inst.in1) and inst.in1 not in [curr_inst.in1, curr_inst.in2,
+ curr_inst.out] and next_use.in1islive:
+ self._update_score(score, inst.in1)
+ if self.is_variable(inst.in2) and inst.in2 not in [curr_inst.in1, curr_inst.in2,
+ curr_inst.out] and next_use.in2islive:
+ self._update_score(score, inst.in2)
+ if self.is_variable(inst.out) and inst.out not in [curr_inst.in1, curr_inst.in2,
+ curr_inst.out] and next_use.outislive:
+ self._update_score(score, inst.out)
+
+ register = min(score, key=lambda x: score[x])
+
+ self.update_register(var, register)
+ self.load_var_code(var)
+ return register
+
+ def initialize_score(self):
+ score = {}
+ for reg in self.reg_desc.registers:
+ score[reg] = 0
+ try:
+ reg = self.addr_desc.get_var_reg(self.inst.in1)
+ if reg:
+ score[reg] = 999
+ except:
+ pass
+ try:
+ reg = self.addr_desc.get_var_reg(self.inst.in2)
+ if reg:
+ score[reg] = 999
+ except:
+ pass
+ try:
+ reg = self.addr_desc.get_var_reg(self.inst.out)
+ if reg:
+ score[reg] = 999
+ except:
+ pass
+ return score
+
+ def _update_score(self, score, var):
+ reg = self.addr_desc.get_var_reg(var)
+ if reg is None:
+ return
+ try:
+ score[reg] += 1
+ except:
+ score[reg] = 1
+
+ def update_register(self, var, register):
+ content = self.reg_desc.get_content(register)
+ if content is not None:
+ self.save_var_code(content)
+ self.addr_desc.set_var_reg(content, None)
+ self.reg_desc.insert_register(register, var)
+ self.addr_desc.set_var_reg(var, register)
+
+ def save_var_code(self, var):
+ memory, register, _ = self.addr_desc.get_var_storage(var)
+ self.code.append(f"sw ${register}, -{memory}($fp)")
+
+ def load_var_code(self, var):
+ memory, register, _ = self.addr_desc.get_var_storage(var)
+ self.code.append(f'lw ${register}, -{memory}($fp)')
+
+ def load_used_reg(self, registers):
+ for reg in registers:
+ self.code.append('addiu $sp, $sp, 4')
+ self.code.append(f'lw ${reg}, ($sp)')
+
+ def empty_registers(self, save=True):
+ registers = self.reg_desc.used_registers()
+ for reg, var in registers:
+ if save:
+ self.save_var_code(var)
+ self.addr_desc.set_var_reg(var, None)
+ self.reg_desc.insert_register(reg, None)
+
+ def push_register(self, register):
+ self.code.append(f'sw ${register}, ($sp)')
+ self.code.append('addiu $sp, $sp, -4')
+
+ def pop_register(self, register):
+ self.code.append('addiu $sp, $sp, 4')
+ self.code.append(f'lw ${register}, ($sp)')
+
+ def save_to_register(self, expr):
+ if self.is_int(expr):
+ self.code.append(f'li $t9, {expr}')
+ return 't9'
+ elif self.is_variable(expr):
+ return self.addr_desc.get_var_reg(expr)
+
+ def get_attr_offset(self, attr_name: str, type_name: str):
+ return self.obj_table[type_name].attr_offset(attr_name)
+
+ def get_method_offset(self, type_name, method_name):
+ self.obj_table[type_name].method_offset(method_name)
+
+ def save_meth_addr(self, func_nodes: List[FunctionNode]):
+ self.methods += [funct.name for funct in func_nodes]
+ words = 'methods: .word ' + ', '.join(map(lambda x: '0', self.methods))
+ self.data_code.append(words)
+ self.code.append('# Save method directions in the methods array')
+ self.code.append('la $v0, methods')
+ for i, meth in enumerate(self.methods):
+ self.code.append(f'la $t9, {meth}')
+ self.code.append(f'sw $t9, {4 * i}($v0)')
+
+ def save_types_addr(self, type_nodes: List[FunctionNode]):
+ words = 'types: .word ' + ', '.join(map(lambda x: '0', self.inherit_graph))
+ self.data_code.append(words)
+ self.code.append('# Save types directions in the types array')
+ self.code.append('la $t9, types')
+ self.types = []
+ self.code.append('# Save space to locate the type info')
+ for i, (ntype, nparent) in enumerate(self.inherit_graph.items()):
+ self.code.append('# Allocating memory')
+ self.code.append('li $v0, 9')
+ self.code.append(f'li $a0, 12')
+ self.code.append('syscall')
+ self.types.append(ntype)
+ self.code.append('# Filling table methods')
+ self.code.append(f'la $t8, type_{ntype}')
+ self.code.append(f'sw $t8, 0($v0)')
+ self.code.append('# Copying direction to array')
+ self.code.append(f'sw $v0, {4 * i}($t9)')
+ self.code.append('# Table addr is now stored in t8')
+ self.code.append('move $t8, $v0')
+ self.code.append('# Creating the dispatch table')
+ self.create_dispatch_table(ntype) # table addr is stored in $v0
+ self.code.append('sw $v0, 8($t8)')
+
+ self.code.append('# Copying parents')
+ for i, ntype in enumerate(self.types):
+ self.code.append(f'lw $v0, {4 * i}($t9)')
+ nparent = self.inherit_graph[ntype]
+ if nparent is not None:
+ parent_idx = self.types.index(nparent)
+
+ self.code.append(f'lw $t8, {4 * parent_idx}($t9)')
+ else:
+ self.code.append('li $t8, 0')
+ self.code.append('sw $t8, 4($v0)')
+
+ def create_dispatch_table(self, type_name):
+ methods = self.dispatch_table.get_methods(type_name)
+ self.code.append('# Allocate dispatch table in the heap')
+ self.code.append('li $v0, 9') # code to request memory
+ dispatch_table_size = 4 * len(methods)
+ self.code.append(f'li $a0, {dispatch_table_size + 4}')
+ self.code.append('syscall')
+
+ var = self.save_reg_if_occupied('v1')
+
+ self.code.append(f'# I save the offset of every one of the methods of this type')
+ self.code.append('# Save the direction of methods')
+ self.code.append('la $v1, methods')
+ for i, meth in enumerate(methods, 1):
+ offset = 4 * self.methods.index(meth)
+ self.code.append(f'# Save the direction of the method {meth} in a0')
+ self.code.append(f'lw $a0, {offset}($v1)')
+ self.code.append('# Save the direction of the method in his position in the dispatch table')
+ self.code.append(
+ f'sw $a0, {4 * i}($v0)')
+ self.load_var_if_occupied(var)
+
+ def get_type(self, xtype):
+ if xtype == 'Int':
+ return AddrType.INT
+ elif xtype == 'Bool':
+ return AddrType.BOOL
+ elif xtype == 'String':
+ return AddrType.STR
+ return AddrType.REF
+
+ def save_reg_if_occupied(self, reg):
+ var = self.reg_desc.get_content(reg)
+ if var is not None:
+ self.code.append(f'# Saving content of {reg} to memory to use that register')
+ self.save_var_code(var)
+ return var
+
+ def load_var_if_occupied(self, var):
+ if var is not None:
+ self.code.append(f'# Restore the variable of {var}')
+ self.load_var_code(var)
+
+ def compare_strings(self, node: EqualNode):
+ rdest = self.addr_desc.get_var_reg(node.dest)
+ rleft = self.addr_desc.get_var_reg(node.left)
+ rright = self.addr_desc.get_var_reg(node.right)
+
+ var = self.save_reg_if_occupied('a1')
+ loop_idx = self.loop_idx
+
+ self.code.append(f'move $t8, ${rleft}') # counter
+ self.code.append(f'move $t9, ${rright}')
+ self.code.append(f'loop_{loop_idx}:')
+ self.code.append(f'lb $a0, ($t8)')
+ self.code.append(f'lb $a1, ($t9)')
+ self.code.append(f'beqz $a0, check_{loop_idx}')
+ self.code.append(f'beqz $a1, mismatch_{loop_idx}')
+ self.code.append('seq $v0, $a0, $a1')
+ self.code.append(f'beqz $v0, mismatch_{loop_idx}')
+ self.code.append('addi $t8, $t8, 1')
+ self.code.append('addi $t9, $t9, 1')
+ self.code.append(f'j loop_{loop_idx}')
+ self.code.append(f'mismatch_{loop_idx}:')
+ self.code.append('li $v0, 0')
+ self.code.append(f'j end_{loop_idx}')
+ self.code.append(f'check_{loop_idx}:')
+ self.code.append(f'bnez $a1, mismatch_{loop_idx}')
+ self.code.append('li $v0, 1')
+ self.code.append(f'end_{loop_idx}:')
+ self.code.append(f'move ${rdest}, $v0')
+ self.load_var_if_occupied(var)
+ self.loop_idx += 1
+
+ def conforms_to(self, rsrc, rdest, type_name):
+ self.code.append(f'la $t9, type_{type_name}')
+
+ loop_idx = self.loop_idx
+ self.code.append(f'lw $v0, 8(${rsrc})')
+ self.code.append(f'loop_{loop_idx}:')
+ self.code.append(f'move $t8, $v0')
+ self.code.append(f'beqz $t8, false_{loop_idx}')
+ self.code.append('lw $v1, 0($t8)')
+ self.code.append(f'beq $t9, $v1, true_{loop_idx}')
+ self.code.append('lw $v0, 4($t8)')
+ self.code.append(f'j loop_{loop_idx}')
+
+ self.code.append(f'true_{loop_idx}:')
+ self.code.append(f'li ${rdest}, 1')
+ self.code.append(f'j end_{loop_idx}')
+ self.code.append(f'false_{loop_idx}:')
+ self.code.append(f'li ${rdest}, 0')
+ self.code.append(f'end_{loop_idx}:')
+ self.loop_idx += 1
+
+ def value_conforms_to_obj(self, rdest, typex, branch_type):
+ self.code.append('# Comparing value types in case node')
+ true_label = f'true_{self.loop_idx}'
+ end_label = f'end_{self.loop_idx}'
+ self.code.append('la $t9, type_Object')
+ self.code.append(f'la $t8, type_{branch_type}')
+ self.code.append(f'beq $t9, $t8, {true_label}')
+ self.code.append(f'la $t9, type_{typex}')
+ self.code.append(f'beq $t9, $t8, {true_label}')
+ self.code.append(f'li ${rdest}, 0')
+ self.code.append(f'j {end_label}')
+ self.code.append(f'{true_label}:')
+ self.code.append(f'li ${rdest}, 1')
+ self.code.append(f'{end_label}:')
+ self.loop_idx += 1
diff --git a/src/cool/codegen/utils/__init__.py b/src/cool/codegen/utils/__init__.py
new file mode 100644
index 000000000..22aaf749e
--- /dev/null
+++ b/src/cool/codegen/utils/__init__.py
@@ -0,0 +1 @@
+from .ast_cil import *
diff --git a/src/cool/codegen/utils/__main__.py b/src/cool/codegen/utils/__main__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/cool/codegen/utils/ast_cil.py b/src/cool/codegen/utils/ast_cil.py
new file mode 100644
index 000000000..7bafd86fa
--- /dev/null
+++ b/src/cool/codegen/utils/ast_cil.py
@@ -0,0 +1,404 @@
+class Node:
+ pass
+
+
+class ProgramNode(Node):
+ def __init__(self, type_node, data, func_node, idx=None):
+ self.type_node = type_node
+ self.data = data
+ self.func_node = func_node
+ self.index = idx
+
+
+class TypeNode(Node):
+ def __init__(self, name, attributes=None, methods=None, idx=None):
+ self.name = name
+ self.attributes = attributes if attributes is not None else []
+ self.methods = methods if methods is not None else []
+ self.index = idx
+
+
+class DataNode(Node):
+ def __init__(self, vname, value, idx=None):
+ self.name = vname
+ self.value = value
+ self.index = idx
+
+
+class FunctionNode(Node):
+ def __init__(self, fname, params, localvars, instructions, idx=None):
+ self.name = fname
+ self.params = params
+ self.localvars = localvars
+ self.instructions = instructions
+ self.index = idx
+
+
+class ParamNode(Node):
+ def __init__(self, name, typex, idx=None):
+ self.name = name
+ self.type = typex
+ self.index = idx
+
+
+class LocalNode(Node):
+ def __init__(self, name, idx=None):
+ self.name = name
+ self.index = idx
+
+
+class InstructionNode(Node):
+ def __init__(self, idx=None):
+ self.in1 = None
+ self.in2 = None
+ self.out = None
+ self.index = idx
+
+
+class AssignNode(InstructionNode):
+ def __init__(self, dest, source, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.source = source
+
+ self.in1 = source
+ self.out = dest
+
+
+class UnaryNode(InstructionNode):
+ def __init__(self, dest, expr, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.expr = expr
+
+ self.in1 = expr
+ self.out = dest
+
+
+class NotNode(UnaryNode):
+ pass
+
+
+class LogicalNotNode(UnaryNode):
+ pass
+
+
+class BinaryNode(InstructionNode):
+ def __init__(self, dest, left, right, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.left = left
+ self.right = right
+
+ self.in1 = left
+ self.in2 = right
+ self.out = dest
+
+
+class PlusNode(BinaryNode):
+ pass
+
+
+class MinusNode(BinaryNode):
+ pass
+
+
+class StarNode(BinaryNode):
+ pass
+
+
+class DivNode(BinaryNode):
+ pass
+
+
+class LessNode(BinaryNode):
+ pass
+
+
+class LessEqNode(BinaryNode):
+ pass
+
+
+class EqualNode(BinaryNode):
+ pass
+
+
+class GetAttribNode(InstructionNode):
+ def __init__(self, obj, attr, typex, dest, attr_type, idx=None):
+ super().__init__(idx)
+ self.obj = obj
+ self.attr = attr
+ self.type_name = typex
+ # self.attr_offset = offset
+ self.dest = dest
+ self.attr_type = attr_type
+
+ self.out = dest
+ self.in1 = obj
+
+
+class SetAttribNode(InstructionNode):
+ def __init__(self, obj, attr, typex, value, idx=None):
+ super().__init__(idx)
+ self.obj = obj
+ self.attr = attr
+ # self.attr_offset = offset
+ self.value = value
+ self.type_name = typex
+
+ self.out = obj
+ self.in1 = value
+
+
+class GetIndexNode(InstructionNode):
+ pass
+
+
+class SetIndexNode(InstructionNode):
+ pass
+
+
+class AllocateNode(InstructionNode):
+ def __init__(self, itype, dest, idx=None):
+ super().__init__(idx)
+ self.type = itype
+ self.dest = dest
+
+ self.out = dest
+
+
+class ArrayNode(InstructionNode):
+ pass
+
+
+class TypeOfNode(InstructionNode):
+ def __init__(self, obj, dest, idx=None):
+ super().__init__(idx)
+ self.obj = obj
+ self.dest = dest
+
+ self.out = dest
+ self.in1 = obj
+
+
+class LabelNode(InstructionNode):
+ def __init__(self, label, idx=None):
+ super().__init__(idx)
+ self.label = label
+
+
+class GotoNode(InstructionNode):
+ def __init__(self, label, idx=None):
+ super().__init__(idx)
+ self.label = label
+
+
+class GotoIfNode(InstructionNode):
+ def __init__(self, cond, label, idx=None):
+ super().__init__(idx)
+ self.cond = cond
+ self.label = label
+
+ self.in1 = cond
+
+
+class GotoIfFalseNode(InstructionNode):
+ def __init__(self, cond, label, idx=None):
+ super().__init__(idx)
+ self.cond = cond
+ self.label = label
+
+ self.in1 = cond
+
+
+class StaticCallNode(InstructionNode):
+ def __init__(self, xtype, function, dest, args, return_type, idx=None):
+ super().__init__(idx)
+ self.type = xtype
+ self.function = function
+ self.dest = dest
+ self.args = args
+ self.return_type = return_type
+
+ self.out = dest
+
+
+class DynamicCallNode(InstructionNode):
+ def __init__(self, xtype, obj, method, dest, args, return_type, idx=None):
+ super().__init__(idx)
+ self.type = xtype
+ self.method = method
+ self.dest = dest
+ self.args = args
+ self.return_type = return_type
+ self.obj = obj
+
+ self.out = dest
+ self.in1 = obj
+
+
+class ArgNode(InstructionNode):
+ def __init__(self, name, idx=None):
+ super().__init__(idx)
+ self.dest = name
+
+ self.out = name
+
+
+class ReturnNode(InstructionNode):
+ def __init__(self, value, idx=None):
+ super().__init__(idx)
+ self.value = value
+
+ self.out = value
+
+
+class LoadNode(InstructionNode):
+ def __init__(self, dest, msg, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.msg = msg
+
+ self.out = dest
+
+
+class LengthNode(InstructionNode):
+ def __init__(self, dest, arg, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.arg = arg
+
+ self.out = dest
+ self.in1 = arg
+
+
+class ConcatNode(InstructionNode):
+ def __init__(self, dest, arg1, arg2, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.arg1 = arg1
+ self.arg2 = arg2
+
+ self.out = dest
+ self.in1 = arg1
+ self.in2 = arg2
+
+
+class PrefixNode(InstructionNode):
+ def __init__(self, dest, word, n, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.word = word
+ self.n = n
+
+ self.out = dest
+ self.in1 = word
+ self.in2 = n
+
+
+class SubstringNode(InstructionNode):
+ def __init__(self, dest, word, begin, end, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.begin = begin
+ self.word = word
+ self.end = end
+
+ self.out = dest
+ self.in1 = begin
+ self.in2 = end
+
+
+class ToStrNode(InstructionNode):
+ def __init__(self, dest, ivalue, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.ivalue = ivalue
+
+ self.out = dest
+ self.in1 = ivalue
+
+
+class OutStringNode(InstructionNode):
+ def __init__(self, value, idx=None):
+ super().__init__(idx)
+ self.value = value
+
+ self.in1 = value
+
+
+class OutIntNode(InstructionNode):
+ def __init__(self, value, idx=None):
+ super().__init__(idx)
+ self.value = value
+
+ self.in1 = value
+
+
+class ReadStringNode(InstructionNode):
+ def __init__(self, dest, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+
+ self.out = dest
+
+
+class ReadIntNode(InstructionNode):
+ def __init__(self, dest, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+
+ self.out = dest
+
+
+class ExitNode(InstructionNode):
+ def __init__(self, classx, value=0, idx=None):
+ super().__init__(idx)
+ self.classx = classx
+ self.value = value
+
+ self.in1 = value
+ self.in2 = classx
+
+
+class CopyNode(InstructionNode):
+ def __init__(self, dest, source, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.source = source
+
+ self.out = dest
+ self.in1 = source
+
+
+class ConformsNode(InstructionNode):
+ def __init__(self, dest, expr, type2, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.expr = expr
+ self.type = type2
+
+ self.out = dest
+ self.in1 = expr
+
+
+class VoidConstantNode(InstructionNode):
+ def __init__(self, obj, idx=None):
+ super().__init__(idx)
+ self.obj = obj
+
+ self.out = obj
+
+
+class ErrorNode(InstructionNode):
+ def __init__(self, typex, idx=None):
+ super().__init__(idx)
+ self.type = typex
+
+
+class BoxingNode(InstructionNode):
+ def __init__(self, dest, type_name, idx=None):
+ super().__init__(idx)
+ self.dest = dest
+ self.type = type_name
+ self.out = dest
diff --git a/src/cool/codegen/utils/print_ast.py b/src/cool/codegen/utils/print_ast.py
new file mode 100644
index 000000000..c7c725fa8
--- /dev/null
+++ b/src/cool/codegen/utils/print_ast.py
@@ -0,0 +1,193 @@
+from utils import visitor
+from .ast_cil import *
+
+
+def get_formatter():
+ class PrintVisitor(object):
+ @visitor.on('node')
+ def visit(self, node):
+ pass
+
+ @visitor.when(ProgramNode)
+ def visit(self, node: ProgramNode):
+ dottypes = '\n'.join(self.visit(t) for t in node.type_node)
+ dotdata = '\n'.join(self.visit(t) for t in node.data)
+ dotcode = '\n'.join(self.visit(t) for t in node.func_node)
+
+ return f'.TYPES\n{dottypes}\n\n.DATA\n{dotdata}\n\n.CODE\n{dotcode}'
+
+ @visitor.when(TypeNode)
+ def visit(self, node: TypeNode):
+ attributes = '\n\t'.join(f'attribute {x}: {y}' for x, y in node.attributes)
+ methods = '\n\t'.join(f'method {x}: {y}' for x, y in node.methods)
+
+ return f'type {node.name} {{\n\t{attributes}\n\n\t{methods}\n}}'
+
+ @visitor.when(FunctionNode)
+ def visit(self, node: FunctionNode):
+ params = '\n\t'.join(self.visit(x) for x in node.params)
+ localvars = '\n\t'.join(self.visit(x) for x in node.localvars)
+ instructions = '\n\t'.join(self.visit(x) for x in node.instructions)
+
+ return f'function {node.name} {{\n\t{params}\n\n\t{localvars}\n\n\t{instructions}\n}}'
+
+ @visitor.when(DataNode)
+ def visit(self, node: DataNode):
+ return f'{node.name} = "{node.value}"'
+
+ @visitor.when(ParamNode)
+ def visit(self, node: ParamNode):
+ return f'PARAM {node.name}'
+
+ @visitor.when(LocalNode)
+ def visit(self, node: LocalNode):
+ return f'LOCAL {node.name}'
+
+ @visitor.when(AssignNode)
+ def visit(self, node: AssignNode):
+ return f'{node.dest} = {node.source}'
+
+ @visitor.when(NotNode)
+ def visit(self, node: NotNode):
+ return f'{node.dest} = ~{node.expr}'
+
+ @visitor.when(LogicalNotNode)
+ def visit(self, node: LogicalNotNode):
+ return f'{node.dest} = NOT {node.expr}'
+
+ @visitor.when(VoidConstantNode)
+ def visit(self, node: VoidConstantNode):
+ return f'{node.obj} = Void'
+
+ @visitor.when(PlusNode)
+ def visit(self, node: PlusNode):
+ return f'{node.dest} = {node.left} + {node.right}'
+
+ @visitor.when(MinusNode)
+ def visit(self, node: MinusNode):
+ return f'{node.dest} = {node.left} - {node.right}'
+
+ @visitor.when(StarNode)
+ def visit(self, node: StarNode):
+ return f'{node.dest} = {node.left} * {node.right}'
+
+ @visitor.when(DivNode)
+ def visit(self, node: DivNode):
+ return f'{node.dest} = {node.left} / {node.right}'
+
+ @visitor.when(LessEqNode)
+ def visit(self, node: LessEqNode):
+ return f'{node.dest} = {node.left} <= {node.right}'
+
+ @visitor.when(LessNode)
+ def visit(self, node: LessNode):
+ return f'{node.dest} = {node.left} < {node.right}'
+
+ @visitor.when(EqualNode)
+ def visit(self, node: StarNode):
+ return f'{node.dest} = {node.left} = {node.right}'
+
+ @visitor.when(AllocateNode)
+ def visit(self, node: AllocateNode):
+ return f'{node.dest} = ALLOCATE {node.type}'
+
+ @visitor.when(TypeOfNode)
+ def visit(self, node: TypeOfNode):
+ return f'{node.dest} = TYPEOF {node.obj}'
+
+ @visitor.when(GotoNode)
+ def visit(self, node: GotoNode):
+ return f'GOTO {node.label}'
+
+ @visitor.when(GotoIfNode)
+ def visit(self, node: GotoIfNode):
+ return f'IF {node.cond} GOTO {node.label}'
+
+ @visitor.when(GotoIfFalseNode)
+ def visit(self, node: GotoIfFalseNode):
+ return f'IF NOT {node.cond} GOTO {node.label}'
+
+ @visitor.when(LabelNode)
+ def visit(self, node: LabelNode):
+ return f'LABEL {node.label}'
+
+ @visitor.when(StaticCallNode)
+ def visit(self, node: StaticCallNode):
+ args = '\n\t'.join(self.visit(arg) for arg in node.args)
+ return f'{args}\n' + f'\t{node.dest} = CALL {node.function}'
+
+ @visitor.when(LoadNode)
+ def visit(self, node: LoadNode):
+ return f'{node.dest} = LOAD {node.msg}'
+
+ @visitor.when(DynamicCallNode)
+ def visit(self, node: DynamicCallNode):
+ args = '\n\t'.join(self.visit(arg) for arg in node.args)
+ return f'{args}\n' + f'\t{node.dest} = VCALL {node.type} {node.method}'
+
+ @visitor.when(ArgNode)
+ def visit(self, node: ArgNode):
+ return f'ARG {node.dest}'
+
+ @visitor.when(ReturnNode)
+ def visit(self, node: ReturnNode):
+ return f'RETURN {node.value if node.value is not None else ""}'
+
+ @visitor.when(GetAttribNode)
+ def visit(self, node: GetAttribNode):
+ return f'{node.dest} = GETATTR {node.obj} {node.attr}'
+
+ @visitor.when(SetAttribNode)
+ def visit(self, node: SetAttribNode):
+ return f'SETATTR {node.obj} {node.attr} = {node.value}'
+
+ @visitor.when(LengthNode)
+ def visit(self, node: LengthNode):
+ return f'{node.dest} = LENGTH {node.arg}'
+
+ @visitor.when(ConcatNode)
+ def visit(self, node: ConcatNode):
+ return f'{node.dest} = CONCAT {node.arg1} {node.arg2}'
+
+ @visitor.when(SubstringNode)
+ def visit(self, node: SubstringNode):
+ return f'{node.dest} = SUBSTRING {node.word} {node.begin} {node.end}'
+
+ @visitor.when(ToStrNode)
+ def visit(self, node: ToStrNode):
+ return f'{node.dest} = STR {node.ivalue}'
+
+ @visitor.when(OutStringNode)
+ def visit(self, node: OutStringNode):
+ return f'OUT_STR {node.value}'
+
+ @visitor.when(OutIntNode)
+ def visit(self, node: OutIntNode):
+ return f'OUT_INT {node.value}'
+
+ @visitor.when(ReadStringNode)
+ def visit(self, node: ReadStringNode):
+ return f'{node.dest} = READ_STR'
+
+ @visitor.when(ReadIntNode)
+ def visit(self, node: ReadIntNode):
+ return f'{node.dest} = READ_INT'
+
+ @visitor.when(ExitNode)
+ def visit(self, node: ExitNode):
+ return f'EXIT {node.value}'
+
+ @visitor.when(CopyNode)
+ def visit(self, node: CopyNode):
+ return f'{node.dest} = COPY {node.source}'
+
+ @visitor.when(ConformsNode)
+ def visit(self, node: ConformsNode):
+ return f'{node.dest} = CONFORMS {node.expr} {node.type}'
+
+ @visitor.when(ErrorNode)
+ def visit(self, node: ErrorNode):
+ return f'ERROR {node.type}'
+
+ printer = PrintVisitor()
+ return lambda ast: printer.visit(ast)
diff --git a/src/cool/codegen/utils/tools.py b/src/cool/codegen/utils/tools.py
new file mode 100644
index 000000000..2c4a3fea2
--- /dev/null
+++ b/src/cool/codegen/utils/tools.py
@@ -0,0 +1,216 @@
+from typing import List, Dict
+from enum import Enum
+from collections import OrderedDict
+import re
+
+
+class SymbolTabEntry:
+ def __init__(self, name, is_live=False, next_use=None):
+ self.name = name
+ self.is_live = is_live
+ self.next_use = next_use
+
+
+class SymbolTable:
+ def __init__(self, entries: List[SymbolTabEntry] = None):
+ values = entries if entries is not None else []
+ self.entries = {v.name: v for v in values}
+
+ def lookup(self, entry_name: str) -> SymbolTabEntry:
+ if entry_name != None:
+ if entry_name in self.entries.keys():
+ return self.entries[entry_name]
+
+ def insert(self, entry: SymbolTabEntry):
+ self.entries[entry.name] = entry
+
+ def insert_name(self, name):
+ self.entries[name] = SymbolTabEntry(name)
+
+ def __getitem__(self, item):
+ return self.entries[item]
+
+ def __iter__(self):
+ return iter(self.entries)
+
+
+class NextUseEntry:
+ def __init__(self, in1, in2, out, in1nextuse, in2nextuse, outnextuse, in1islive, in2islive, outislive):
+ self.in1 = in1
+ self.in2 = in2
+ self.out = out
+ self.in1nextuse = in1nextuse
+ self.in2nextuse = in2nextuse
+ self.outnextuse = outnextuse
+ self.in1islive = in1islive
+ self.in2islive = in2islive
+ self.outislive = outislive
+
+
+class AddrType(Enum):
+ REF = 1,
+ STR = 2,
+ BOOL = 3,
+ INT = 4,
+ VOID = 5
+
+
+class AddrDescriptor:
+ def __init__(self):
+ self.vars = {}
+
+ def insert_var(self, name, address, register=None, stack=None):
+ if address is not None:
+ self.vars[name] = [4 * address, register, stack]
+ else:
+ self.vars[name] = [address, register, stack]
+
+ def get_var_addr(self, name):
+ return self.vars[name][0]
+
+ def set_var_addr(self, name, addr):
+ self.vars[name][0] = 4 * addr
+
+ def get_var_reg(self, var):
+ return self.vars[var][1]
+
+ def set_var_reg(self, name, reg):
+ self.vars[name][1] = reg
+
+ def get_var_stack(self, name):
+ return self.vars[name][2]
+
+ def set_var_stack(self, name, stack_pos):
+ self.vars[name][1] = stack_pos
+
+ def get_var_storage(self, name):
+ return self.vars[name]
+
+
+class RegisterType(Enum):
+ TEMP = 0
+ GLOBAL = 1
+ ARG = 2
+ RETURN = 3
+
+
+class RegisterDescriptor:
+ def __init__(self):
+ registers = ['t0', 't1', 't2', 't3', 't4', 't5', 't6', 't7', 'a1', 'a2', 'a3', \
+ 's0', 's1', 's2', 's3', 's4', 's5', 's6', 's7', 'v1']
+ self.registers = {reg: None for reg in registers}
+
+ def insert_register(self, register: str, content: str):
+ self.registers[register] = content
+
+ def get_content(self, register: str):
+ return self.registers[register]
+
+ def find_empty_reg(self):
+ for k, v in self.registers.items():
+ if v is None:
+ return k
+
+ def used_registers(self):
+ return [(k, v) for k, v in self.registers.items() if v is not None]
+
+ def empty_registers(self):
+ for k in self.registers:
+ self.registers[k] = None
+
+
+class DispatchTable:
+ def __init__(self):
+ self.classes = OrderedDict()
+ self.regex = re.compile(r'function_(.+)_\w+')
+
+ def add_class(self, type_name, methods):
+ self.classes[type_name] = methods
+
+ def get_offset(self, type_name, method):
+ return self.classes[type_name].index(method)
+
+ def find_full_name(self, type_name, mth_name):
+ for meth in self.classes[type_name]:
+ # format of methods: 'function_{method_name}_{type_name}'
+ name = self.regex.search(meth).groups()[0]
+ if name == mth_name:
+ return meth
+ return None
+
+ def get_methods(self, type_name):
+ return self.classes[type_name]
+
+ def __len__(self):
+ return len(self.classes)
+
+
+class ObjTabEntry:
+ def __init__(self, name, methods, attrs):
+ self.class_tag: str = name
+ self.size: int = 3 + len(attrs)
+ self.dispatch_table_size = len(methods)
+ self.dispatch_table_entry = methods
+ self.attrs = attrs
+
+ @property
+ def class_tag_offset(self):
+ return 0
+
+ @property
+ def size_offset(self):
+ return 1
+
+ @property
+ def dispatch_ptr_offset(self):
+ return 2
+
+ def attr_offset(self, attr):
+ return self.attrs.index(attr) + 3
+
+ def method_offset(self, meth):
+ return self.dispatch_table_entry.index(meth)
+
+
+class ObjTable:
+ def __init__(self, dispatch_table: DispatchTable):
+ self.objects: Dict[str, ObjTabEntry] = {} # self.initialize_built_in()
+ self.dispatch_table = dispatch_table
+
+ def initialize_built_in(self):
+ object_methods = [
+ 'function_abort_Object',
+ 'function_type_name_Object',
+ 'function_copy_Object']
+ io_methods = [
+ 'function_out_string_IO',
+ 'function_out_int_IO',
+ 'function_in_string_IO',
+ 'function_in_int_IO']
+ str_methods = [
+ 'function_length_String',
+ 'function_concat_String',
+ 'function_substr_String']
+ return {
+ 'Int': ObjTabEntry('Int', [], []),
+ 'Bool': ObjTabEntry('Bool', [], []),
+ 'IO': ObjTabEntry('IO', io_methods, []),
+ 'String': ObjTabEntry('String', str_methods, []),
+ 'Object': ObjTabEntry('Object', object_methods, [])
+ }
+
+ def add_entry(self, name, methods, attrs):
+ methods = [y for x, y in methods]
+ attrs = [x for x, y in attrs]
+ self.objects[name] = ObjTabEntry(name, methods, attrs)
+ # Adding the methods in the dispatch table
+ self.dispatch_table.add_class(name, methods)
+
+ def size_of_entry(self, name):
+ return self.objects[name].size
+
+ def __getitem__(self, item) -> ObjTabEntry:
+ return self.objects[item]
+
+ def __iter__(self):
+ return iter(self.objects.values())
diff --git a/src/cool/lexer/__init__.py b/src/cool/lexer/__init__.py
new file mode 100644
index 000000000..df84368f5
--- /dev/null
+++ b/src/cool/lexer/__init__.py
@@ -0,0 +1 @@
+from .lexer import *
diff --git a/src/cool/lexer/__main__.py b/src/cool/lexer/__main__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/cool/lexer/lexer.py b/src/cool/lexer/lexer.py
new file mode 100644
index 000000000..5607ea391
--- /dev/null
+++ b/src/cool/lexer/lexer.py
@@ -0,0 +1,317 @@
+from pathlib import Path
+from pprint import pprint
+from typing import List
+import ply.lex as lex
+from ..utils import Token, errors, ignored, literals, reservedKeywords, tokens, CoolError
+
+
+class CoolLexer:
+ def __init__(self, **kwargs):
+ self.reserved = reservedKeywords
+ self.tokens = tokens
+ self.errors = []
+ self.lexer = lex.lex(self, **kwargs)
+ self.lexer.lineno = 1
+ self.lexer.linestart = 0
+
+ def update_column(self, t):
+ t.column = t.lexpos - t.lexer.linestart + 1
+
+ states = (
+ ('comments', 'exclusive'),
+ ('strings', 'exclusive')
+ )
+
+ # Comments
+ def t_comment(self, t):
+ r'--.*($|\n)'
+ t.lexer.lineno += 1
+ t.lexer.linestart = t.lexer.lexpos
+
+ def t_comments(self, t):
+ r'\(\*'
+ t.lexer.level = 1
+ t.lexer.begin('comments')
+
+ def t_comments_open(self, t):
+ r'\(\*'
+ t.lexer.level += 1
+
+ def t_comments_close(self, t):
+ r'\*\)'
+ t.lexer.level -= 1
+
+ if t.lexer.level == 0:
+ t.lexer.begin('INITIAL')
+
+ def t_comments_newline(self, t):
+ r'\n+'
+ t.lexer.lineno += len(t.value)
+ t.lexer.linestart = t.lexer.lexpos
+
+ t_comments_ignore = ' \t\f\r\t\v'
+
+ def t_comments_error(self, t):
+ t.lexer.skip(1)
+
+ def t_comments_eof(self, t):
+ self.update_column(t)
+ if t.lexer.level > 0:
+ error_text = errors.LexicographicError.EOF_COMMENT
+ self.errors.append(errors.LexicographicError(error_text, t.lineno, t.column))
+
+ # Strings
+ t_strings_ignore = ''
+
+ def t_strings(self, t):
+ r'\"'
+ t.lexer.str_start = t.lexer.lexpos
+ t.lexer.myString = ''
+ t.lexer.backslash = False
+ t.lexer.begin('strings')
+
+ def t_strings_end(self, t):
+ r'\"'
+ self.update_column(t)
+
+ if t.lexer.backslash:
+ t.lexer.myString += '"'
+ t.lexer.backslash = False
+ else:
+ t.value = t.lexer.myString
+ t.type = 'string'
+ t.lexer.begin('INITIAL')
+ return t
+
+ def t_strings_newline(self, t):
+ r'\n'
+ t.lexer.lineno += 1
+ self.update_column(t)
+
+ t.lexer.linestart = t.lexer.lexpos
+
+ if not t.lexer.backslash:
+ error_text = errors.LexicographicError.UNDETERMINED_STRING
+ self.errors.append(errors.LexicographicError(error_text, t.lineno, t.column))
+ t.lexer.begin('INITIAL')
+
+ def t_strings_nill(self, t):
+ r'\0'
+ error_text = errors.LexicographicError.NULL_STRING
+ self.update_column(t)
+
+ self.errors.append(errors.LexicographicError(error_text, t.lineno, t.column))
+
+ def t_strings_consume(self, t):
+ r'[^\n]'
+ # self._update_column(t)
+
+ if t.lexer.backslash:
+ if t.value == 'b':
+ t.lexer.myString += '\b'
+
+ elif t.value == 't':
+ t.lexer.myString += '\t'
+
+
+ elif t.value == 'f':
+ t.lexer.myString += '\f'
+
+
+ elif t.value == 'n':
+ t.lexer.myString += '\n'
+
+ elif t.value == '\\':
+ t.lexer.myString += '\\'
+ else:
+ t.lexer.myString += t.value
+ t.lexer.backslash = False
+ else:
+ if t.value != '\\':
+ t.lexer.myString += t.value
+ else:
+ t.lexer.backslash = True
+
+ def t_strings_error(self, t):
+ pass
+
+ def t_strings_eof(self, t):
+ self.update_column(t)
+
+ error_text = errors.LexicographicError.EOF_STRING
+ self.errors.append(errors.LexicographicError(error_text, t.lineno, t.column))
+
+ t_ignore = ' \t\f\r\t\v'
+
+ def t_semi(self, t):
+ r';'
+ self.update_column(t)
+ return t
+
+ def t_colon(self, t):
+ r':'
+ self.update_column(t)
+ return t
+
+ def t_comma(self, t):
+ r','
+ self.update_column(t)
+ return t
+
+ def t_dot(self, t):
+ r'\.'
+ self.update_column(t)
+ return t
+
+ def t_opar(self, t):
+ r'\('
+ self.update_column(t)
+ return t
+
+ def t_cpar(self, t):
+ r'\)'
+ self.update_column(t)
+ return t
+
+ def t_ocur(self, t):
+ r'\{'
+ self.update_column(t)
+ return t
+
+ def t_ccur(self, t):
+ r'\}'
+ self.update_column(t)
+ return t
+
+ def t_larrow(self, t):
+ r'<-'
+ self.update_column(t)
+ return t
+
+ def t_arroba(self, t):
+ r'@'
+ self.update_column(t)
+ return t
+
+ def t_rarrow(self, t):
+ r'=>'
+ self.update_column(t)
+ return t
+
+ def t_nox(self, t):
+ r'~'
+ self.update_column(t)
+ return t
+
+ def t_equal(self, t):
+ r'='
+ self.update_column(t)
+ return t
+
+ def t_plus(self, t):
+ r'\+'
+ self.update_column(t)
+ return t
+
+ def t_of(self, t):
+ r'of'
+ self.update_column(t)
+ return t
+
+ def t_minus(self, t):
+ r'-'
+ self.update_column(t)
+ return t
+
+ def t_star(self, t):
+ r'\*'
+ self.update_column(t)
+ return t
+
+ def t_div(self, t):
+ r'/'
+ self.update_column(t)
+ return t
+
+ def t_lesseq(self, t):
+ r'<='
+ self.update_column(t)
+ return t
+
+ def t_less(self, t):
+ r'<'
+ self.update_column(t)
+ return t
+
+ def t_inherits(self, t):
+ r'inherits'
+ self.update_column(t)
+ return t
+
+ def t_type(self, t):
+ r'[A-Z][a-zA-Z_0-9]*'
+ t.type = self.reserved.get(t.value.lower(), 'type')
+ self.update_column(t)
+ return t
+
+ # Check for reserved words:
+ def t_id(self, t):
+ r'[a-z][a-zA-Z_0-9]*'
+ t.type = self.reserved.get(t.value.lower(), 'id')
+ self.update_column(t)
+ return t
+
+ # Get Numbers
+ def t_num(self, t):
+ r'\d+(\.\d+)? '
+ t.value = float(t.value)
+ self.update_column(t)
+ return t
+
+ # Define a rule so we can track line numbers
+ def t_newline(self, t):
+ r'\n+'
+ t.lexer.lineno += len(t.value)
+ t.lexer.linestart = t.lexer.lexpos
+
+ # Error handling rule
+
+ def t_error(self, t):
+ self.update_column(t)
+ error_text = errors.LexicographicError.UNKNOWN_TOKEN % t.value[0]
+
+ self.errors.append(errors.LexicographicError(error_text, t.lineno, t.column))
+ # print(f'Report Error {len(self.errors)} {self.errors[0]}')
+ t.lexer.skip(1)
+ # t.lexer.skip(len(t.value))
+
+ def tokenize(self, text: str) -> List[Token]:
+ self.lexer.input(text)
+ tokens: List[Token] = []
+
+ for t in self.lexer:
+ tokens.append(Token(t.type, t.value, t.lineno, t.column))
+
+ return tokens
+
+
+def main(text: str, output=None):
+ lexer = CoolLexer()
+
+ # print(f'Path: {input}')
+
+ a = lexer.tokenize(text)
+
+ # for i in a:
+ # print(i)
+
+ if lexer.errors:
+ for e in lexer.errors:
+ print(e)
+ raise Exception()
+
+ return lexer
+
+
+if __name__ == '__main__':
+ main()
diff --git a/src/cool/parser/__init__.py b/src/cool/parser/__init__.py
new file mode 100644
index 000000000..bd753cc34
--- /dev/null
+++ b/src/cool/parser/__init__.py
@@ -0,0 +1 @@
+from .parser import *
diff --git a/src/cool/parser/__main__.py b/src/cool/parser/__main__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/cool/parser/output/debug.txt b/src/cool/parser/output/debug.txt
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/cool/parser/output/parselog.txt b/src/cool/parser/output/parselog.txt
new file mode 100644
index 000000000..415c83661
--- /dev/null
+++ b/src/cool/parser/output/parselog.txt
@@ -0,0 +1,6343 @@
+ yacc.py:3317:Created by PLY version 3.11 (http://www.dabeaz.com/ply)
+ yacc.py:3377:
+ yacc.py:3378:Grammar
+ yacc.py:3379:
+ yacc.py:3381:Rule 0 S' -> program
+ yacc.py:3381:Rule 1 program -> class_list
+ yacc.py:3381:Rule 2 class_list -> def_class class_list
+ yacc.py:3381:Rule 3 class_list -> def_class
+ yacc.py:3381:Rule 4 class_list -> error class_list
+ yacc.py:3381:Rule 5 epsilon ->
+ yacc.py:3381:Rule 6 def_class -> class type ocur feature_list ccur semi
+ yacc.py:3381:Rule 7 def_class -> class type inherits type ocur feature_list ccur semi
+ yacc.py:3381:Rule 8 def_class -> class error ocur feature_list ccur semi
+ yacc.py:3381:Rule 9 def_class -> class type ocur feature_list ccur error
+ yacc.py:3381:Rule 10 def_class -> class error inherits type ocur feature_list ccur semi
+ yacc.py:3381:Rule 11 def_class -> class error inherits error ocur feature_list ccur semi
+ yacc.py:3381:Rule 12 def_class -> class type inherits error ocur feature_list ccur semi
+ yacc.py:3381:Rule 13 def_class -> class type inherits type ocur feature_list ccur error
+ yacc.py:3381:Rule 14 feature_list -> epsilon
+ yacc.py:3381:Rule 15 feature_list -> def_attr semi feature_list
+ yacc.py:3381:Rule 16 feature_list -> def_func semi feature_list
+ yacc.py:3381:Rule 17 feature_list -> error feature_list
+ yacc.py:3381:Rule 18 def_attr -> id colon type
+ yacc.py:3381:Rule 19 def_attr -> id colon type larrow expr
+ yacc.py:3381:Rule 20 def_attr -> error colon type
+ yacc.py:3381:Rule 21 def_attr -> id colon error
+ yacc.py:3381:Rule 22 def_attr -> error colon type larrow expr
+ yacc.py:3381:Rule 23 def_attr -> id colon error larrow expr
+ yacc.py:3381:Rule 24 def_attr -> id colon type larrow error
+ yacc.py:3381:Rule 25 def_func -> id opar formals cpar colon type ocur expr ccur
+ yacc.py:3381:Rule 26 def_func -> error opar formals cpar colon type ocur expr ccur
+ yacc.py:3381:Rule 27 def_func -> id opar error cpar colon type ocur expr ccur
+ yacc.py:3381:Rule 28 def_func -> id opar formals cpar colon error ocur expr ccur
+ yacc.py:3381:Rule 29 def_func -> id opar formals cpar colon type ocur error ccur
+ yacc.py:3381:Rule 30 formals -> param_list
+ yacc.py:3381:Rule 31 formals -> param_list_empty
+ yacc.py:3381:Rule 32 param_list -> param
+ yacc.py:3381:Rule 33 param_list -> param comma param_list
+ yacc.py:3381:Rule 34 param_list_empty -> epsilon
+ yacc.py:3381:Rule 35 param -> id colon type
+ yacc.py:3381:Rule 36 let_list -> let_assign
+ yacc.py:3381:Rule 37 let_list -> let_assign comma let_list
+ yacc.py:3381:Rule 38 let_assign -> param larrow expr
+ yacc.py:3381:Rule 39 let_assign -> param
+ yacc.py:3381:Rule 40 cases_list -> casep semi
+ yacc.py:3381:Rule 41 cases_list -> casep semi cases_list
+ yacc.py:3381:Rule 42 cases_list -> error cases_list
+ yacc.py:3381:Rule 43 cases_list -> error semi
+ yacc.py:3381:Rule 44 casep -> id colon type rarrow expr
+ yacc.py:3381:Rule 45 expr -> id larrow expr
+ yacc.py:3381:Rule 46 expr -> comp
+ yacc.py:3381:Rule 47 comp -> comp less op
+ yacc.py:3381:Rule 48 comp -> comp lesseq op
+ yacc.py:3381:Rule 49 comp -> comp equal op
+ yacc.py:3381:Rule 50 comp -> op
+ yacc.py:3381:Rule 51 op -> op plus term
+ yacc.py:3381:Rule 52 op -> op minus term
+ yacc.py:3381:Rule 53 op -> term
+ yacc.py:3381:Rule 54 term -> term star base_call
+ yacc.py:3381:Rule 55 term -> term div base_call
+ yacc.py:3381:Rule 56 term -> base_call
+ yacc.py:3381:Rule 57 term -> term star error
+ yacc.py:3381:Rule 58 term -> term div error
+ yacc.py:3381:Rule 59 base_call -> factor arroba type dot func_call
+ yacc.py:3381:Rule 60 base_call -> factor
+ yacc.py:3381:Rule 61 base_call -> error arroba type dot func_call
+ yacc.py:3381:Rule 62 base_call -> factor arroba error dot func_call
+ yacc.py:3381:Rule 63 factor -> atom
+ yacc.py:3381:Rule 64 factor -> opar expr cpar
+ yacc.py:3381:Rule 65 factor -> factor dot func_call
+ yacc.py:3381:Rule 66 factor -> not expr
+ yacc.py:3381:Rule 67 factor -> func_call
+ yacc.py:3381:Rule 68 factor -> isvoid base_call
+ yacc.py:3381:Rule 69 factor -> nox base_call
+ yacc.py:3381:Rule 70 factor -> let let_list in expr
+ yacc.py:3381:Rule 71 factor -> case expr of cases_list esac
+ yacc.py:3381:Rule 72 factor -> if expr then expr else expr fi
+ yacc.py:3381:Rule 73 factor -> while expr loop expr pool
+ yacc.py:3381:Rule 74 atom -> num
+ yacc.py:3381:Rule 75 atom -> id
+ yacc.py:3381:Rule 76 atom -> new type
+ yacc.py:3381:Rule 77 atom -> ocur block ccur
+ yacc.py:3381:Rule 78 atom -> error block ccur
+ yacc.py:3381:Rule 79 atom -> ocur error ccur
+ yacc.py:3381:Rule 80 atom -> ocur block error
+ yacc.py:3381:Rule 81 atom -> true
+ yacc.py:3381:Rule 82 atom -> false
+ yacc.py:3381:Rule 83 atom -> string
+ yacc.py:3381:Rule 84 block -> expr semi
+ yacc.py:3381:Rule 85 block -> expr semi block
+ yacc.py:3381:Rule 86 block -> error block
+ yacc.py:3381:Rule 87 block -> error semi
+ yacc.py:3381:Rule 88 func_call -> id opar args cpar
+ yacc.py:3381:Rule 89 func_call -> id opar error cpar
+ yacc.py:3381:Rule 90 func_call -> error opar args cpar
+ yacc.py:3381:Rule 91 args -> arg_list
+ yacc.py:3381:Rule 92 args -> arg_list_empty
+ yacc.py:3381:Rule 93 arg_list -> expr
+ yacc.py:3381:Rule 94 arg_list -> expr comma arg_list
+ yacc.py:3381:Rule 95 arg_list -> error arg_list
+ yacc.py:3381:Rule 96 arg_list_empty -> epsilon
+ yacc.py:3399:
+ yacc.py:3400:Terminals, with rules where they appear
+ yacc.py:3401:
+ yacc.py:3405:arroba : 59 61 62
+ yacc.py:3405:case : 71
+ yacc.py:3405:ccur : 6 7 8 9 10 11 12 13 25 26 27 28 29 77 78 79
+ yacc.py:3405:class : 6 7 8 9 10 11 12 13
+ yacc.py:3405:colon : 18 19 20 21 22 23 24 25 26 27 28 29 35 44
+ yacc.py:3405:comma : 33 37 94
+ yacc.py:3405:cpar : 25 26 27 28 29 64 88 89 90
+ yacc.py:3405:div : 55 58
+ yacc.py:3405:dot : 59 61 62 65
+ yacc.py:3405:else : 72
+ yacc.py:3405:equal : 49
+ yacc.py:3405:error : 4 8 9 10 11 11 12 13 17 20 21 22 23 24 26 27 28 29 42 43 57 58 61 62 78 79 80 86 87 89 90 95
+ yacc.py:3405:esac : 71
+ yacc.py:3405:false : 82
+ yacc.py:3405:fi : 72
+ yacc.py:3405:id : 18 19 21 23 24 25 27 28 29 35 44 45 75 88 89
+ yacc.py:3405:if : 72
+ yacc.py:3405:in : 70
+ yacc.py:3405:inherits : 7 10 11 12 13
+ yacc.py:3405:isvoid : 68
+ yacc.py:3405:larrow : 19 22 23 24 38 45
+ yacc.py:3405:less : 47
+ yacc.py:3405:lesseq : 48
+ yacc.py:3405:let : 70
+ yacc.py:3405:loop : 73
+ yacc.py:3405:minus : 52
+ yacc.py:3405:new : 76
+ yacc.py:3405:not : 66
+ yacc.py:3405:nox : 69
+ yacc.py:3405:num : 74
+ yacc.py:3405:ocur : 6 7 8 9 10 11 12 13 25 26 27 28 29 77 79 80
+ yacc.py:3405:of : 71
+ yacc.py:3405:opar : 25 26 27 28 29 64 88 89 90
+ yacc.py:3405:plus : 51
+ yacc.py:3405:pool : 73
+ yacc.py:3405:rarrow : 44
+ yacc.py:3405:semi : 6 7 8 10 11 12 15 16 40 41 43 84 85 87
+ yacc.py:3405:star : 54 57
+ yacc.py:3405:string : 83
+ yacc.py:3405:then : 72
+ yacc.py:3405:true : 81
+ yacc.py:3405:type : 6 7 7 9 10 12 13 13 18 19 20 22 24 25 26 27 29 35 44 59 61 76
+ yacc.py:3405:while : 73
+ yacc.py:3407:
+ yacc.py:3408:Nonterminals, with rules where they appear
+ yacc.py:3409:
+ yacc.py:3413:arg_list : 91 94 95
+ yacc.py:3413:arg_list_empty : 92
+ yacc.py:3413:args : 88 90
+ yacc.py:3413:atom : 63
+ yacc.py:3413:base_call : 54 55 56 68 69
+ yacc.py:3413:block : 77 78 80 85 86
+ yacc.py:3413:casep : 40 41
+ yacc.py:3413:cases_list : 41 42 71
+ yacc.py:3413:class_list : 1 2 4
+ yacc.py:3413:comp : 46 47 48 49
+ yacc.py:3413:def_attr : 15
+ yacc.py:3413:def_class : 2 3
+ yacc.py:3413:def_func : 16
+ yacc.py:3413:epsilon : 14 34 96
+ yacc.py:3413:expr : 19 22 23 25 26 27 28 38 44 45 64 66 70 71 72 72 72 73 73 84 85 93 94
+ yacc.py:3413:factor : 59 60 62 65
+ yacc.py:3413:feature_list : 6 7 8 9 10 11 12 13 15 16 17
+ yacc.py:3413:formals : 25 26 28 29
+ yacc.py:3413:func_call : 59 61 62 65 67
+ yacc.py:3413:let_assign : 36 37
+ yacc.py:3413:let_list : 37 70
+ yacc.py:3413:op : 47 48 49 50 51 52
+ yacc.py:3413:param : 32 33 38 39
+ yacc.py:3413:param_list : 30 33
+ yacc.py:3413:param_list_empty : 31
+ yacc.py:3413:program : 0
+ yacc.py:3413:term : 51 52 53 54 55 57 58
+ yacc.py:3414:
+ yacc.py:3436:Generating LALR tables
+ yacc.py:2543:Parsing method: LALR
+ yacc.py:2561:
+ yacc.py:2562:state 0
+ yacc.py:2563:
+ yacc.py:2565: (0) S' -> . program
+ yacc.py:2565: (1) program -> . class_list
+ yacc.py:2565: (2) class_list -> . def_class class_list
+ yacc.py:2565: (3) class_list -> . def_class
+ yacc.py:2565: (4) class_list -> . error class_list
+ yacc.py:2565: (6) def_class -> . class type ocur feature_list ccur semi
+ yacc.py:2565: (7) def_class -> . class type inherits type ocur feature_list ccur semi
+ yacc.py:2565: (8) def_class -> . class error ocur feature_list ccur semi
+ yacc.py:2565: (9) def_class -> . class type ocur feature_list ccur error
+ yacc.py:2565: (10) def_class -> . class error inherits type ocur feature_list ccur semi
+ yacc.py:2565: (11) def_class -> . class error inherits error ocur feature_list ccur semi
+ yacc.py:2565: (12) def_class -> . class type inherits error ocur feature_list ccur semi
+ yacc.py:2565: (13) def_class -> . class type inherits type ocur feature_list ccur error
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 4
+ yacc.py:2687: class shift and go to state 5
+ yacc.py:2689:
+ yacc.py:2714: program shift and go to state 1
+ yacc.py:2714: class_list shift and go to state 2
+ yacc.py:2714: def_class shift and go to state 3
+ yacc.py:2561:
+ yacc.py:2562:state 1
+ yacc.py:2563:
+ yacc.py:2565: (0) S' -> program .
+ yacc.py:2566:
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 2
+ yacc.py:2563:
+ yacc.py:2565: (1) program -> class_list .
+ yacc.py:2566:
+ yacc.py:2687: $end reduce using rule 1 (program -> class_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 3
+ yacc.py:2563:
+ yacc.py:2565: (2) class_list -> def_class . class_list
+ yacc.py:2565: (3) class_list -> def_class .
+ yacc.py:2565: (2) class_list -> . def_class class_list
+ yacc.py:2565: (3) class_list -> . def_class
+ yacc.py:2565: (4) class_list -> . error class_list
+ yacc.py:2565: (6) def_class -> . class type ocur feature_list ccur semi
+ yacc.py:2565: (7) def_class -> . class type inherits type ocur feature_list ccur semi
+ yacc.py:2565: (8) def_class -> . class error ocur feature_list ccur semi
+ yacc.py:2565: (9) def_class -> . class type ocur feature_list ccur error
+ yacc.py:2565: (10) def_class -> . class error inherits type ocur feature_list ccur semi
+ yacc.py:2565: (11) def_class -> . class error inherits error ocur feature_list ccur semi
+ yacc.py:2565: (12) def_class -> . class type inherits error ocur feature_list ccur semi
+ yacc.py:2565: (13) def_class -> . class type inherits type ocur feature_list ccur error
+ yacc.py:2566:
+ yacc.py:2687: $end reduce using rule 3 (class_list -> def_class .)
+ yacc.py:2687: error shift and go to state 4
+ yacc.py:2687: class shift and go to state 5
+ yacc.py:2689:
+ yacc.py:2714: def_class shift and go to state 3
+ yacc.py:2714: class_list shift and go to state 6
+ yacc.py:2561:
+ yacc.py:2562:state 4
+ yacc.py:2563:
+ yacc.py:2565: (4) class_list -> error . class_list
+ yacc.py:2565: (2) class_list -> . def_class class_list
+ yacc.py:2565: (3) class_list -> . def_class
+ yacc.py:2565: (4) class_list -> . error class_list
+ yacc.py:2565: (6) def_class -> . class type ocur feature_list ccur semi
+ yacc.py:2565: (7) def_class -> . class type inherits type ocur feature_list ccur semi
+ yacc.py:2565: (8) def_class -> . class error ocur feature_list ccur semi
+ yacc.py:2565: (9) def_class -> . class type ocur feature_list ccur error
+ yacc.py:2565: (10) def_class -> . class error inherits type ocur feature_list ccur semi
+ yacc.py:2565: (11) def_class -> . class error inherits error ocur feature_list ccur semi
+ yacc.py:2565: (12) def_class -> . class type inherits error ocur feature_list ccur semi
+ yacc.py:2565: (13) def_class -> . class type inherits type ocur feature_list ccur error
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 4
+ yacc.py:2687: class shift and go to state 5
+ yacc.py:2689:
+ yacc.py:2714: class_list shift and go to state 7
+ yacc.py:2714: def_class shift and go to state 3
+ yacc.py:2561:
+ yacc.py:2562:state 5
+ yacc.py:2563:
+ yacc.py:2565: (6) def_class -> class . type ocur feature_list ccur semi
+ yacc.py:2565: (7) def_class -> class . type inherits type ocur feature_list ccur semi
+ yacc.py:2565: (8) def_class -> class . error ocur feature_list ccur semi
+ yacc.py:2565: (9) def_class -> class . type ocur feature_list ccur error
+ yacc.py:2565: (10) def_class -> class . error inherits type ocur feature_list ccur semi
+ yacc.py:2565: (11) def_class -> class . error inherits error ocur feature_list ccur semi
+ yacc.py:2565: (12) def_class -> class . type inherits error ocur feature_list ccur semi
+ yacc.py:2565: (13) def_class -> class . type inherits type ocur feature_list ccur error
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 8
+ yacc.py:2687: error shift and go to state 9
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 6
+ yacc.py:2563:
+ yacc.py:2565: (2) class_list -> def_class class_list .
+ yacc.py:2566:
+ yacc.py:2687: $end reduce using rule 2 (class_list -> def_class class_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 7
+ yacc.py:2563:
+ yacc.py:2565: (4) class_list -> error class_list .
+ yacc.py:2566:
+ yacc.py:2687: $end reduce using rule 4 (class_list -> error class_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 8
+ yacc.py:2563:
+ yacc.py:2565: (6) def_class -> class type . ocur feature_list ccur semi
+ yacc.py:2565: (7) def_class -> class type . inherits type ocur feature_list ccur semi
+ yacc.py:2565: (9) def_class -> class type . ocur feature_list ccur error
+ yacc.py:2565: (12) def_class -> class type . inherits error ocur feature_list ccur semi
+ yacc.py:2565: (13) def_class -> class type . inherits type ocur feature_list ccur error
+ yacc.py:2566:
+ yacc.py:2687: ocur shift and go to state 10
+ yacc.py:2687: inherits shift and go to state 11
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 9
+ yacc.py:2563:
+ yacc.py:2565: (8) def_class -> class error . ocur feature_list ccur semi
+ yacc.py:2565: (10) def_class -> class error . inherits type ocur feature_list ccur semi
+ yacc.py:2565: (11) def_class -> class error . inherits error ocur feature_list ccur semi
+ yacc.py:2566:
+ yacc.py:2687: ocur shift and go to state 12
+ yacc.py:2687: inherits shift and go to state 13
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 10
+ yacc.py:2563:
+ yacc.py:2565: (6) def_class -> class type ocur . feature_list ccur semi
+ yacc.py:2565: (9) def_class -> class type ocur . feature_list ccur error
+ yacc.py:2565: (14) feature_list -> . epsilon
+ yacc.py:2565: (15) feature_list -> . def_attr semi feature_list
+ yacc.py:2565: (16) feature_list -> . def_func semi feature_list
+ yacc.py:2565: (17) feature_list -> . error feature_list
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (18) def_attr -> . id colon type
+ yacc.py:2565: (19) def_attr -> . id colon type larrow expr
+ yacc.py:2565: (20) def_attr -> . error colon type
+ yacc.py:2565: (21) def_attr -> . id colon error
+ yacc.py:2565: (22) def_attr -> . error colon type larrow expr
+ yacc.py:2565: (23) def_attr -> . id colon error larrow expr
+ yacc.py:2565: (24) def_attr -> . id colon type larrow error
+ yacc.py:2565: (25) def_func -> . id opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (26) def_func -> . error opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (27) def_func -> . id opar error cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> . id opar formals cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> . id opar formals cpar colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 15
+ yacc.py:2687: ccur reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: id shift and go to state 19
+ yacc.py:2689:
+ yacc.py:2714: feature_list shift and go to state 14
+ yacc.py:2714: epsilon shift and go to state 16
+ yacc.py:2714: def_attr shift and go to state 17
+ yacc.py:2714: def_func shift and go to state 18
+ yacc.py:2561:
+ yacc.py:2562:state 11
+ yacc.py:2563:
+ yacc.py:2565: (7) def_class -> class type inherits . type ocur feature_list ccur semi
+ yacc.py:2565: (12) def_class -> class type inherits . error ocur feature_list ccur semi
+ yacc.py:2565: (13) def_class -> class type inherits . type ocur feature_list ccur error
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 20
+ yacc.py:2687: error shift and go to state 21
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 12
+ yacc.py:2563:
+ yacc.py:2565: (8) def_class -> class error ocur . feature_list ccur semi
+ yacc.py:2565: (14) feature_list -> . epsilon
+ yacc.py:2565: (15) feature_list -> . def_attr semi feature_list
+ yacc.py:2565: (16) feature_list -> . def_func semi feature_list
+ yacc.py:2565: (17) feature_list -> . error feature_list
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (18) def_attr -> . id colon type
+ yacc.py:2565: (19) def_attr -> . id colon type larrow expr
+ yacc.py:2565: (20) def_attr -> . error colon type
+ yacc.py:2565: (21) def_attr -> . id colon error
+ yacc.py:2565: (22) def_attr -> . error colon type larrow expr
+ yacc.py:2565: (23) def_attr -> . id colon error larrow expr
+ yacc.py:2565: (24) def_attr -> . id colon type larrow error
+ yacc.py:2565: (25) def_func -> . id opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (26) def_func -> . error opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (27) def_func -> . id opar error cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> . id opar formals cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> . id opar formals cpar colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 15
+ yacc.py:2687: ccur reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: id shift and go to state 19
+ yacc.py:2689:
+ yacc.py:2714: feature_list shift and go to state 22
+ yacc.py:2714: epsilon shift and go to state 16
+ yacc.py:2714: def_attr shift and go to state 17
+ yacc.py:2714: def_func shift and go to state 18
+ yacc.py:2561:
+ yacc.py:2562:state 13
+ yacc.py:2563:
+ yacc.py:2565: (10) def_class -> class error inherits . type ocur feature_list ccur semi
+ yacc.py:2565: (11) def_class -> class error inherits . error ocur feature_list ccur semi
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 24
+ yacc.py:2687: error shift and go to state 23
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 14
+ yacc.py:2563:
+ yacc.py:2565: (6) def_class -> class type ocur feature_list . ccur semi
+ yacc.py:2565: (9) def_class -> class type ocur feature_list . ccur error
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 25
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 15
+ yacc.py:2563:
+ yacc.py:2565: (17) feature_list -> error . feature_list
+ yacc.py:2565: (20) def_attr -> error . colon type
+ yacc.py:2565: (22) def_attr -> error . colon type larrow expr
+ yacc.py:2565: (26) def_func -> error . opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (14) feature_list -> . epsilon
+ yacc.py:2565: (15) feature_list -> . def_attr semi feature_list
+ yacc.py:2565: (16) feature_list -> . def_func semi feature_list
+ yacc.py:2565: (17) feature_list -> . error feature_list
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (18) def_attr -> . id colon type
+ yacc.py:2565: (19) def_attr -> . id colon type larrow expr
+ yacc.py:2565: (20) def_attr -> . error colon type
+ yacc.py:2565: (21) def_attr -> . id colon error
+ yacc.py:2565: (22) def_attr -> . error colon type larrow expr
+ yacc.py:2565: (23) def_attr -> . id colon error larrow expr
+ yacc.py:2565: (24) def_attr -> . id colon type larrow error
+ yacc.py:2565: (25) def_func -> . id opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (26) def_func -> . error opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (27) def_func -> . id opar error cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> . id opar formals cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> . id opar formals cpar colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: colon shift and go to state 27
+ yacc.py:2687: opar shift and go to state 28
+ yacc.py:2687: error shift and go to state 15
+ yacc.py:2687: ccur reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: id shift and go to state 19
+ yacc.py:2689:
+ yacc.py:2714: feature_list shift and go to state 26
+ yacc.py:2714: epsilon shift and go to state 16
+ yacc.py:2714: def_attr shift and go to state 17
+ yacc.py:2714: def_func shift and go to state 18
+ yacc.py:2561:
+ yacc.py:2562:state 16
+ yacc.py:2563:
+ yacc.py:2565: (14) feature_list -> epsilon .
+ yacc.py:2566:
+ yacc.py:2687: ccur reduce using rule 14 (feature_list -> epsilon .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 17
+ yacc.py:2563:
+ yacc.py:2565: (15) feature_list -> def_attr . semi feature_list
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 29
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 18
+ yacc.py:2563:
+ yacc.py:2565: (16) feature_list -> def_func . semi feature_list
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 30
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 19
+ yacc.py:2563:
+ yacc.py:2565: (18) def_attr -> id . colon type
+ yacc.py:2565: (19) def_attr -> id . colon type larrow expr
+ yacc.py:2565: (21) def_attr -> id . colon error
+ yacc.py:2565: (23) def_attr -> id . colon error larrow expr
+ yacc.py:2565: (24) def_attr -> id . colon type larrow error
+ yacc.py:2565: (25) def_func -> id . opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (27) def_func -> id . opar error cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> id . opar formals cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> id . opar formals cpar colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: colon shift and go to state 31
+ yacc.py:2687: opar shift and go to state 32
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 20
+ yacc.py:2563:
+ yacc.py:2565: (7) def_class -> class type inherits type . ocur feature_list ccur semi
+ yacc.py:2565: (13) def_class -> class type inherits type . ocur feature_list ccur error
+ yacc.py:2566:
+ yacc.py:2687: ocur shift and go to state 33
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 21
+ yacc.py:2563:
+ yacc.py:2565: (12) def_class -> class type inherits error . ocur feature_list ccur semi
+ yacc.py:2566:
+ yacc.py:2687: ocur shift and go to state 34
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 22
+ yacc.py:2563:
+ yacc.py:2565: (8) def_class -> class error ocur feature_list . ccur semi
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 35
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 23
+ yacc.py:2563:
+ yacc.py:2565: (11) def_class -> class error inherits error . ocur feature_list ccur semi
+ yacc.py:2566:
+ yacc.py:2687: ocur shift and go to state 36
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 24
+ yacc.py:2563:
+ yacc.py:2565: (10) def_class -> class error inherits type . ocur feature_list ccur semi
+ yacc.py:2566:
+ yacc.py:2687: ocur shift and go to state 37
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 25
+ yacc.py:2563:
+ yacc.py:2565: (6) def_class -> class type ocur feature_list ccur . semi
+ yacc.py:2565: (9) def_class -> class type ocur feature_list ccur . error
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 38
+ yacc.py:2687: error shift and go to state 39
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 26
+ yacc.py:2563:
+ yacc.py:2565: (17) feature_list -> error feature_list .
+ yacc.py:2566:
+ yacc.py:2687: ccur reduce using rule 17 (feature_list -> error feature_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 27
+ yacc.py:2563:
+ yacc.py:2565: (20) def_attr -> error colon . type
+ yacc.py:2565: (22) def_attr -> error colon . type larrow expr
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 40
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 28
+ yacc.py:2563:
+ yacc.py:2565: (26) def_func -> error opar . formals cpar colon type ocur expr ccur
+ yacc.py:2565: (30) formals -> . param_list
+ yacc.py:2565: (31) formals -> . param_list_empty
+ yacc.py:2565: (32) param_list -> . param
+ yacc.py:2565: (33) param_list -> . param comma param_list
+ yacc.py:2565: (34) param_list_empty -> . epsilon
+ yacc.py:2565: (35) param -> . id colon type
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 46
+ yacc.py:2687: cpar reduce using rule 5 (epsilon -> .)
+ yacc.py:2689:
+ yacc.py:2714: formals shift and go to state 41
+ yacc.py:2714: param_list shift and go to state 42
+ yacc.py:2714: param_list_empty shift and go to state 43
+ yacc.py:2714: param shift and go to state 44
+ yacc.py:2714: epsilon shift and go to state 45
+ yacc.py:2561:
+ yacc.py:2562:state 29
+ yacc.py:2563:
+ yacc.py:2565: (15) feature_list -> def_attr semi . feature_list
+ yacc.py:2565: (14) feature_list -> . epsilon
+ yacc.py:2565: (15) feature_list -> . def_attr semi feature_list
+ yacc.py:2565: (16) feature_list -> . def_func semi feature_list
+ yacc.py:2565: (17) feature_list -> . error feature_list
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (18) def_attr -> . id colon type
+ yacc.py:2565: (19) def_attr -> . id colon type larrow expr
+ yacc.py:2565: (20) def_attr -> . error colon type
+ yacc.py:2565: (21) def_attr -> . id colon error
+ yacc.py:2565: (22) def_attr -> . error colon type larrow expr
+ yacc.py:2565: (23) def_attr -> . id colon error larrow expr
+ yacc.py:2565: (24) def_attr -> . id colon type larrow error
+ yacc.py:2565: (25) def_func -> . id opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (26) def_func -> . error opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (27) def_func -> . id opar error cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> . id opar formals cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> . id opar formals cpar colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 15
+ yacc.py:2687: ccur reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: id shift and go to state 19
+ yacc.py:2689:
+ yacc.py:2714: def_attr shift and go to state 17
+ yacc.py:2714: feature_list shift and go to state 47
+ yacc.py:2714: epsilon shift and go to state 16
+ yacc.py:2714: def_func shift and go to state 18
+ yacc.py:2561:
+ yacc.py:2562:state 30
+ yacc.py:2563:
+ yacc.py:2565: (16) feature_list -> def_func semi . feature_list
+ yacc.py:2565: (14) feature_list -> . epsilon
+ yacc.py:2565: (15) feature_list -> . def_attr semi feature_list
+ yacc.py:2565: (16) feature_list -> . def_func semi feature_list
+ yacc.py:2565: (17) feature_list -> . error feature_list
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (18) def_attr -> . id colon type
+ yacc.py:2565: (19) def_attr -> . id colon type larrow expr
+ yacc.py:2565: (20) def_attr -> . error colon type
+ yacc.py:2565: (21) def_attr -> . id colon error
+ yacc.py:2565: (22) def_attr -> . error colon type larrow expr
+ yacc.py:2565: (23) def_attr -> . id colon error larrow expr
+ yacc.py:2565: (24) def_attr -> . id colon type larrow error
+ yacc.py:2565: (25) def_func -> . id opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (26) def_func -> . error opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (27) def_func -> . id opar error cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> . id opar formals cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> . id opar formals cpar colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 15
+ yacc.py:2687: ccur reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: id shift and go to state 19
+ yacc.py:2689:
+ yacc.py:2714: def_func shift and go to state 18
+ yacc.py:2714: feature_list shift and go to state 48
+ yacc.py:2714: epsilon shift and go to state 16
+ yacc.py:2714: def_attr shift and go to state 17
+ yacc.py:2561:
+ yacc.py:2562:state 31
+ yacc.py:2563:
+ yacc.py:2565: (18) def_attr -> id colon . type
+ yacc.py:2565: (19) def_attr -> id colon . type larrow expr
+ yacc.py:2565: (21) def_attr -> id colon . error
+ yacc.py:2565: (23) def_attr -> id colon . error larrow expr
+ yacc.py:2565: (24) def_attr -> id colon . type larrow error
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 49
+ yacc.py:2687: error shift and go to state 50
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 32
+ yacc.py:2563:
+ yacc.py:2565: (25) def_func -> id opar . formals cpar colon type ocur expr ccur
+ yacc.py:2565: (27) def_func -> id opar . error cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> id opar . formals cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> id opar . formals cpar colon type ocur error ccur
+ yacc.py:2565: (30) formals -> . param_list
+ yacc.py:2565: (31) formals -> . param_list_empty
+ yacc.py:2565: (32) param_list -> . param
+ yacc.py:2565: (33) param_list -> . param comma param_list
+ yacc.py:2565: (34) param_list_empty -> . epsilon
+ yacc.py:2565: (35) param -> . id colon type
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 52
+ yacc.py:2687: id shift and go to state 46
+ yacc.py:2687: cpar reduce using rule 5 (epsilon -> .)
+ yacc.py:2689:
+ yacc.py:2714: formals shift and go to state 51
+ yacc.py:2714: param_list shift and go to state 42
+ yacc.py:2714: param_list_empty shift and go to state 43
+ yacc.py:2714: param shift and go to state 44
+ yacc.py:2714: epsilon shift and go to state 45
+ yacc.py:2561:
+ yacc.py:2562:state 33
+ yacc.py:2563:
+ yacc.py:2565: (7) def_class -> class type inherits type ocur . feature_list ccur semi
+ yacc.py:2565: (13) def_class -> class type inherits type ocur . feature_list ccur error
+ yacc.py:2565: (14) feature_list -> . epsilon
+ yacc.py:2565: (15) feature_list -> . def_attr semi feature_list
+ yacc.py:2565: (16) feature_list -> . def_func semi feature_list
+ yacc.py:2565: (17) feature_list -> . error feature_list
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (18) def_attr -> . id colon type
+ yacc.py:2565: (19) def_attr -> . id colon type larrow expr
+ yacc.py:2565: (20) def_attr -> . error colon type
+ yacc.py:2565: (21) def_attr -> . id colon error
+ yacc.py:2565: (22) def_attr -> . error colon type larrow expr
+ yacc.py:2565: (23) def_attr -> . id colon error larrow expr
+ yacc.py:2565: (24) def_attr -> . id colon type larrow error
+ yacc.py:2565: (25) def_func -> . id opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (26) def_func -> . error opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (27) def_func -> . id opar error cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> . id opar formals cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> . id opar formals cpar colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 15
+ yacc.py:2687: ccur reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: id shift and go to state 19
+ yacc.py:2689:
+ yacc.py:2714: feature_list shift and go to state 53
+ yacc.py:2714: epsilon shift and go to state 16
+ yacc.py:2714: def_attr shift and go to state 17
+ yacc.py:2714: def_func shift and go to state 18
+ yacc.py:2561:
+ yacc.py:2562:state 34
+ yacc.py:2563:
+ yacc.py:2565: (12) def_class -> class type inherits error ocur . feature_list ccur semi
+ yacc.py:2565: (14) feature_list -> . epsilon
+ yacc.py:2565: (15) feature_list -> . def_attr semi feature_list
+ yacc.py:2565: (16) feature_list -> . def_func semi feature_list
+ yacc.py:2565: (17) feature_list -> . error feature_list
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (18) def_attr -> . id colon type
+ yacc.py:2565: (19) def_attr -> . id colon type larrow expr
+ yacc.py:2565: (20) def_attr -> . error colon type
+ yacc.py:2565: (21) def_attr -> . id colon error
+ yacc.py:2565: (22) def_attr -> . error colon type larrow expr
+ yacc.py:2565: (23) def_attr -> . id colon error larrow expr
+ yacc.py:2565: (24) def_attr -> . id colon type larrow error
+ yacc.py:2565: (25) def_func -> . id opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (26) def_func -> . error opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (27) def_func -> . id opar error cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> . id opar formals cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> . id opar formals cpar colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 15
+ yacc.py:2687: ccur reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: id shift and go to state 19
+ yacc.py:2689:
+ yacc.py:2714: feature_list shift and go to state 54
+ yacc.py:2714: epsilon shift and go to state 16
+ yacc.py:2714: def_attr shift and go to state 17
+ yacc.py:2714: def_func shift and go to state 18
+ yacc.py:2561:
+ yacc.py:2562:state 35
+ yacc.py:2563:
+ yacc.py:2565: (8) def_class -> class error ocur feature_list ccur . semi
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 55
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 36
+ yacc.py:2563:
+ yacc.py:2565: (11) def_class -> class error inherits error ocur . feature_list ccur semi
+ yacc.py:2565: (14) feature_list -> . epsilon
+ yacc.py:2565: (15) feature_list -> . def_attr semi feature_list
+ yacc.py:2565: (16) feature_list -> . def_func semi feature_list
+ yacc.py:2565: (17) feature_list -> . error feature_list
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (18) def_attr -> . id colon type
+ yacc.py:2565: (19) def_attr -> . id colon type larrow expr
+ yacc.py:2565: (20) def_attr -> . error colon type
+ yacc.py:2565: (21) def_attr -> . id colon error
+ yacc.py:2565: (22) def_attr -> . error colon type larrow expr
+ yacc.py:2565: (23) def_attr -> . id colon error larrow expr
+ yacc.py:2565: (24) def_attr -> . id colon type larrow error
+ yacc.py:2565: (25) def_func -> . id opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (26) def_func -> . error opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (27) def_func -> . id opar error cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> . id opar formals cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> . id opar formals cpar colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 15
+ yacc.py:2687: ccur reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: id shift and go to state 19
+ yacc.py:2689:
+ yacc.py:2714: feature_list shift and go to state 56
+ yacc.py:2714: epsilon shift and go to state 16
+ yacc.py:2714: def_attr shift and go to state 17
+ yacc.py:2714: def_func shift and go to state 18
+ yacc.py:2561:
+ yacc.py:2562:state 37
+ yacc.py:2563:
+ yacc.py:2565: (10) def_class -> class error inherits type ocur . feature_list ccur semi
+ yacc.py:2565: (14) feature_list -> . epsilon
+ yacc.py:2565: (15) feature_list -> . def_attr semi feature_list
+ yacc.py:2565: (16) feature_list -> . def_func semi feature_list
+ yacc.py:2565: (17) feature_list -> . error feature_list
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (18) def_attr -> . id colon type
+ yacc.py:2565: (19) def_attr -> . id colon type larrow expr
+ yacc.py:2565: (20) def_attr -> . error colon type
+ yacc.py:2565: (21) def_attr -> . id colon error
+ yacc.py:2565: (22) def_attr -> . error colon type larrow expr
+ yacc.py:2565: (23) def_attr -> . id colon error larrow expr
+ yacc.py:2565: (24) def_attr -> . id colon type larrow error
+ yacc.py:2565: (25) def_func -> . id opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (26) def_func -> . error opar formals cpar colon type ocur expr ccur
+ yacc.py:2565: (27) def_func -> . id opar error cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> . id opar formals cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> . id opar formals cpar colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 15
+ yacc.py:2687: ccur reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: id shift and go to state 19
+ yacc.py:2689:
+ yacc.py:2714: feature_list shift and go to state 57
+ yacc.py:2714: epsilon shift and go to state 16
+ yacc.py:2714: def_attr shift and go to state 17
+ yacc.py:2714: def_func shift and go to state 18
+ yacc.py:2561:
+ yacc.py:2562:state 38
+ yacc.py:2563:
+ yacc.py:2565: (6) def_class -> class type ocur feature_list ccur semi .
+ yacc.py:2566:
+ yacc.py:2687: error reduce using rule 6 (def_class -> class type ocur feature_list ccur semi .)
+ yacc.py:2687: class reduce using rule 6 (def_class -> class type ocur feature_list ccur semi .)
+ yacc.py:2687: $end reduce using rule 6 (def_class -> class type ocur feature_list ccur semi .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 39
+ yacc.py:2563:
+ yacc.py:2565: (9) def_class -> class type ocur feature_list ccur error .
+ yacc.py:2566:
+ yacc.py:2687: error reduce using rule 9 (def_class -> class type ocur feature_list ccur error .)
+ yacc.py:2687: class reduce using rule 9 (def_class -> class type ocur feature_list ccur error .)
+ yacc.py:2687: $end reduce using rule 9 (def_class -> class type ocur feature_list ccur error .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 40
+ yacc.py:2563:
+ yacc.py:2565: (20) def_attr -> error colon type .
+ yacc.py:2565: (22) def_attr -> error colon type . larrow expr
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 20 (def_attr -> error colon type .)
+ yacc.py:2687: larrow shift and go to state 58
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 41
+ yacc.py:2563:
+ yacc.py:2565: (26) def_func -> error opar formals . cpar colon type ocur expr ccur
+ yacc.py:2566:
+ yacc.py:2687: cpar shift and go to state 59
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 42
+ yacc.py:2563:
+ yacc.py:2565: (30) formals -> param_list .
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 30 (formals -> param_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 43
+ yacc.py:2563:
+ yacc.py:2565: (31) formals -> param_list_empty .
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 31 (formals -> param_list_empty .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 44
+ yacc.py:2563:
+ yacc.py:2565: (32) param_list -> param .
+ yacc.py:2565: (33) param_list -> param . comma param_list
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 32 (param_list -> param .)
+ yacc.py:2687: comma shift and go to state 60
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 45
+ yacc.py:2563:
+ yacc.py:2565: (34) param_list_empty -> epsilon .
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 34 (param_list_empty -> epsilon .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 46
+ yacc.py:2563:
+ yacc.py:2565: (35) param -> id . colon type
+ yacc.py:2566:
+ yacc.py:2687: colon shift and go to state 61
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 47
+ yacc.py:2563:
+ yacc.py:2565: (15) feature_list -> def_attr semi feature_list .
+ yacc.py:2566:
+ yacc.py:2687: ccur reduce using rule 15 (feature_list -> def_attr semi feature_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 48
+ yacc.py:2563:
+ yacc.py:2565: (16) feature_list -> def_func semi feature_list .
+ yacc.py:2566:
+ yacc.py:2687: ccur reduce using rule 16 (feature_list -> def_func semi feature_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 49
+ yacc.py:2563:
+ yacc.py:2565: (18) def_attr -> id colon type .
+ yacc.py:2565: (19) def_attr -> id colon type . larrow expr
+ yacc.py:2565: (24) def_attr -> id colon type . larrow error
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 18 (def_attr -> id colon type .)
+ yacc.py:2687: larrow shift and go to state 62
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 50
+ yacc.py:2563:
+ yacc.py:2565: (21) def_attr -> id colon error .
+ yacc.py:2565: (23) def_attr -> id colon error . larrow expr
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 21 (def_attr -> id colon error .)
+ yacc.py:2687: larrow shift and go to state 63
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 51
+ yacc.py:2563:
+ yacc.py:2565: (25) def_func -> id opar formals . cpar colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> id opar formals . cpar colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> id opar formals . cpar colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: cpar shift and go to state 64
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 52
+ yacc.py:2563:
+ yacc.py:2565: (27) def_func -> id opar error . cpar colon type ocur expr ccur
+ yacc.py:2566:
+ yacc.py:2687: cpar shift and go to state 65
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 53
+ yacc.py:2563:
+ yacc.py:2565: (7) def_class -> class type inherits type ocur feature_list . ccur semi
+ yacc.py:2565: (13) def_class -> class type inherits type ocur feature_list . ccur error
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 66
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 54
+ yacc.py:2563:
+ yacc.py:2565: (12) def_class -> class type inherits error ocur feature_list . ccur semi
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 67
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 55
+ yacc.py:2563:
+ yacc.py:2565: (8) def_class -> class error ocur feature_list ccur semi .
+ yacc.py:2566:
+ yacc.py:2687: error reduce using rule 8 (def_class -> class error ocur feature_list ccur semi .)
+ yacc.py:2687: class reduce using rule 8 (def_class -> class error ocur feature_list ccur semi .)
+ yacc.py:2687: $end reduce using rule 8 (def_class -> class error ocur feature_list ccur semi .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 56
+ yacc.py:2563:
+ yacc.py:2565: (11) def_class -> class error inherits error ocur feature_list . ccur semi
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 68
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 57
+ yacc.py:2563:
+ yacc.py:2565: (10) def_class -> class error inherits type ocur feature_list . ccur semi
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 69
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 58
+ yacc.py:2563:
+ yacc.py:2565: (22) def_attr -> error colon type larrow . expr
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 71
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 59
+ yacc.py:2563:
+ yacc.py:2565: (26) def_func -> error opar formals cpar . colon type ocur expr ccur
+ yacc.py:2566:
+ yacc.py:2687: colon shift and go to state 94
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 60
+ yacc.py:2563:
+ yacc.py:2565: (33) param_list -> param comma . param_list
+ yacc.py:2565: (32) param_list -> . param
+ yacc.py:2565: (33) param_list -> . param comma param_list
+ yacc.py:2565: (35) param -> . id colon type
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 46
+ yacc.py:2689:
+ yacc.py:2714: param shift and go to state 44
+ yacc.py:2714: param_list shift and go to state 95
+ yacc.py:2561:
+ yacc.py:2562:state 61
+ yacc.py:2563:
+ yacc.py:2565: (35) param -> id colon . type
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 96
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 62
+ yacc.py:2563:
+ yacc.py:2565: (19) def_attr -> id colon type larrow . expr
+ yacc.py:2565: (24) def_attr -> id colon type larrow . error
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 98
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 97
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 63
+ yacc.py:2563:
+ yacc.py:2565: (23) def_attr -> id colon error larrow . expr
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 99
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 64
+ yacc.py:2563:
+ yacc.py:2565: (25) def_func -> id opar formals cpar . colon type ocur expr ccur
+ yacc.py:2565: (28) def_func -> id opar formals cpar . colon error ocur expr ccur
+ yacc.py:2565: (29) def_func -> id opar formals cpar . colon type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: colon shift and go to state 100
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 65
+ yacc.py:2563:
+ yacc.py:2565: (27) def_func -> id opar error cpar . colon type ocur expr ccur
+ yacc.py:2566:
+ yacc.py:2687: colon shift and go to state 101
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 66
+ yacc.py:2563:
+ yacc.py:2565: (7) def_class -> class type inherits type ocur feature_list ccur . semi
+ yacc.py:2565: (13) def_class -> class type inherits type ocur feature_list ccur . error
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 102
+ yacc.py:2687: error shift and go to state 103
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 67
+ yacc.py:2563:
+ yacc.py:2565: (12) def_class -> class type inherits error ocur feature_list ccur . semi
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 104
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 68
+ yacc.py:2563:
+ yacc.py:2565: (11) def_class -> class error inherits error ocur feature_list ccur . semi
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 105
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 69
+ yacc.py:2563:
+ yacc.py:2565: (10) def_class -> class error inherits type ocur feature_list ccur . semi
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 106
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 70
+ yacc.py:2563:
+ yacc.py:2565: (61) base_call -> error . arroba type dot func_call
+ yacc.py:2565: (78) atom -> error . block ccur
+ yacc.py:2565: (90) func_call -> error . opar args cpar
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: arroba shift and go to state 108
+ yacc.py:2687: opar shift and go to state 110
+ yacc.py:2687: error shift and go to state 107
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: block shift and go to state 109
+ yacc.py:2714: expr shift and go to state 111
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 71
+ yacc.py:2563:
+ yacc.py:2565: (22) def_attr -> error colon type larrow expr .
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 22 (def_attr -> error colon type larrow expr .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 72
+ yacc.py:2563:
+ yacc.py:2565: (45) expr -> id . larrow expr
+ yacc.py:2565: (75) atom -> id .
+ yacc.py:2565: (88) func_call -> id . opar args cpar
+ yacc.py:2565: (89) func_call -> id . opar error cpar
+ yacc.py:2566:
+ yacc.py:2687: larrow shift and go to state 112
+ yacc.py:2687: arroba reduce using rule 75 (atom -> id .)
+ yacc.py:2687: dot reduce using rule 75 (atom -> id .)
+ yacc.py:2687: star reduce using rule 75 (atom -> id .)
+ yacc.py:2687: div reduce using rule 75 (atom -> id .)
+ yacc.py:2687: plus reduce using rule 75 (atom -> id .)
+ yacc.py:2687: minus reduce using rule 75 (atom -> id .)
+ yacc.py:2687: less reduce using rule 75 (atom -> id .)
+ yacc.py:2687: lesseq reduce using rule 75 (atom -> id .)
+ yacc.py:2687: equal reduce using rule 75 (atom -> id .)
+ yacc.py:2687: semi reduce using rule 75 (atom -> id .)
+ yacc.py:2687: cpar reduce using rule 75 (atom -> id .)
+ yacc.py:2687: of reduce using rule 75 (atom -> id .)
+ yacc.py:2687: then reduce using rule 75 (atom -> id .)
+ yacc.py:2687: loop reduce using rule 75 (atom -> id .)
+ yacc.py:2687: comma reduce using rule 75 (atom -> id .)
+ yacc.py:2687: in reduce using rule 75 (atom -> id .)
+ yacc.py:2687: else reduce using rule 75 (atom -> id .)
+ yacc.py:2687: pool reduce using rule 75 (atom -> id .)
+ yacc.py:2687: ccur reduce using rule 75 (atom -> id .)
+ yacc.py:2687: fi reduce using rule 75 (atom -> id .)
+ yacc.py:2687: opar shift and go to state 113
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 73
+ yacc.py:2563:
+ yacc.py:2565: (46) expr -> comp .
+ yacc.py:2565: (47) comp -> comp . less op
+ yacc.py:2565: (48) comp -> comp . lesseq op
+ yacc.py:2565: (49) comp -> comp . equal op
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for less resolved as shift
+ yacc.py:2666: ! shift/reduce conflict for lesseq resolved as shift
+ yacc.py:2666: ! shift/reduce conflict for equal resolved as shift
+ yacc.py:2687: semi reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: cpar reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: arroba reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: dot reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: star reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: div reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: plus reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: minus reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: of reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: then reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: loop reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: comma reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: in reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: else reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: pool reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: ccur reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: fi reduce using rule 46 (expr -> comp .)
+ yacc.py:2687: less shift and go to state 114
+ yacc.py:2687: lesseq shift and go to state 115
+ yacc.py:2687: equal shift and go to state 116
+ yacc.py:2689:
+ yacc.py:2696: ! less [ reduce using rule 46 (expr -> comp .) ]
+ yacc.py:2696: ! lesseq [ reduce using rule 46 (expr -> comp .) ]
+ yacc.py:2696: ! equal [ reduce using rule 46 (expr -> comp .) ]
+ yacc.py:2700:
+ yacc.py:2561:
+ yacc.py:2562:state 74
+ yacc.py:2563:
+ yacc.py:2565: (50) comp -> op .
+ yacc.py:2565: (51) op -> op . plus term
+ yacc.py:2565: (52) op -> op . minus term
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for plus resolved as shift
+ yacc.py:2666: ! shift/reduce conflict for minus resolved as shift
+ yacc.py:2687: less reduce using rule 50 (comp -> op .)
+ yacc.py:2687: lesseq reduce using rule 50 (comp -> op .)
+ yacc.py:2687: equal reduce using rule 50 (comp -> op .)
+ yacc.py:2687: semi reduce using rule 50 (comp -> op .)
+ yacc.py:2687: cpar reduce using rule 50 (comp -> op .)
+ yacc.py:2687: arroba reduce using rule 50 (comp -> op .)
+ yacc.py:2687: dot reduce using rule 50 (comp -> op .)
+ yacc.py:2687: star reduce using rule 50 (comp -> op .)
+ yacc.py:2687: div reduce using rule 50 (comp -> op .)
+ yacc.py:2687: of reduce using rule 50 (comp -> op .)
+ yacc.py:2687: then reduce using rule 50 (comp -> op .)
+ yacc.py:2687: loop reduce using rule 50 (comp -> op .)
+ yacc.py:2687: comma reduce using rule 50 (comp -> op .)
+ yacc.py:2687: in reduce using rule 50 (comp -> op .)
+ yacc.py:2687: else reduce using rule 50 (comp -> op .)
+ yacc.py:2687: pool reduce using rule 50 (comp -> op .)
+ yacc.py:2687: ccur reduce using rule 50 (comp -> op .)
+ yacc.py:2687: fi reduce using rule 50 (comp -> op .)
+ yacc.py:2687: plus shift and go to state 117
+ yacc.py:2687: minus shift and go to state 118
+ yacc.py:2689:
+ yacc.py:2696: ! plus [ reduce using rule 50 (comp -> op .) ]
+ yacc.py:2696: ! minus [ reduce using rule 50 (comp -> op .) ]
+ yacc.py:2700:
+ yacc.py:2561:
+ yacc.py:2562:state 75
+ yacc.py:2563:
+ yacc.py:2565: (53) op -> term .
+ yacc.py:2565: (54) term -> term . star base_call
+ yacc.py:2565: (55) term -> term . div base_call
+ yacc.py:2565: (57) term -> term . star error
+ yacc.py:2565: (58) term -> term . div error
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for star resolved as shift
+ yacc.py:2666: ! shift/reduce conflict for div resolved as shift
+ yacc.py:2687: plus reduce using rule 53 (op -> term .)
+ yacc.py:2687: minus reduce using rule 53 (op -> term .)
+ yacc.py:2687: less reduce using rule 53 (op -> term .)
+ yacc.py:2687: lesseq reduce using rule 53 (op -> term .)
+ yacc.py:2687: equal reduce using rule 53 (op -> term .)
+ yacc.py:2687: semi reduce using rule 53 (op -> term .)
+ yacc.py:2687: cpar reduce using rule 53 (op -> term .)
+ yacc.py:2687: arroba reduce using rule 53 (op -> term .)
+ yacc.py:2687: dot reduce using rule 53 (op -> term .)
+ yacc.py:2687: of reduce using rule 53 (op -> term .)
+ yacc.py:2687: then reduce using rule 53 (op -> term .)
+ yacc.py:2687: loop reduce using rule 53 (op -> term .)
+ yacc.py:2687: comma reduce using rule 53 (op -> term .)
+ yacc.py:2687: in reduce using rule 53 (op -> term .)
+ yacc.py:2687: else reduce using rule 53 (op -> term .)
+ yacc.py:2687: pool reduce using rule 53 (op -> term .)
+ yacc.py:2687: ccur reduce using rule 53 (op -> term .)
+ yacc.py:2687: fi reduce using rule 53 (op -> term .)
+ yacc.py:2687: star shift and go to state 119
+ yacc.py:2687: div shift and go to state 120
+ yacc.py:2689:
+ yacc.py:2696: ! star [ reduce using rule 53 (op -> term .) ]
+ yacc.py:2696: ! div [ reduce using rule 53 (op -> term .) ]
+ yacc.py:2700:
+ yacc.py:2561:
+ yacc.py:2562:state 76
+ yacc.py:2563:
+ yacc.py:2565: (56) term -> base_call .
+ yacc.py:2566:
+ yacc.py:2687: star reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: div reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: plus reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: minus reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: less reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: lesseq reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: equal reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: semi reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: cpar reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: arroba reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: dot reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: of reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: then reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: loop reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: comma reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: in reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: else reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: pool reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: ccur reduce using rule 56 (term -> base_call .)
+ yacc.py:2687: fi reduce using rule 56 (term -> base_call .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 77
+ yacc.py:2563:
+ yacc.py:2565: (59) base_call -> factor . arroba type dot func_call
+ yacc.py:2565: (60) base_call -> factor .
+ yacc.py:2565: (62) base_call -> factor . arroba error dot func_call
+ yacc.py:2565: (65) factor -> factor . dot func_call
+ yacc.py:2566:
+ yacc.py:2609: ! shift/reduce conflict for arroba resolved as shift
+ yacc.py:2666: ! shift/reduce conflict for dot resolved as shift
+ yacc.py:2687: arroba shift and go to state 121
+ yacc.py:2687: star reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: div reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: plus reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: minus reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: less reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: lesseq reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: equal reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: semi reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: cpar reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: of reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: then reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: loop reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: comma reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: in reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: else reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: pool reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: ccur reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: fi reduce using rule 60 (base_call -> factor .)
+ yacc.py:2687: dot shift and go to state 122
+ yacc.py:2689:
+ yacc.py:2696: ! arroba [ reduce using rule 60 (base_call -> factor .) ]
+ yacc.py:2696: ! dot [ reduce using rule 60 (base_call -> factor .) ]
+ yacc.py:2700:
+ yacc.py:2561:
+ yacc.py:2562:state 78
+ yacc.py:2563:
+ yacc.py:2565: (67) factor -> func_call .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: dot reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: star reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: div reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: plus reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: minus reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: less reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: lesseq reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: equal reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: semi reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: cpar reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: of reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: then reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: loop reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: comma reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: in reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: else reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: pool reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: ccur reduce using rule 67 (factor -> func_call .)
+ yacc.py:2687: fi reduce using rule 67 (factor -> func_call .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 79
+ yacc.py:2563:
+ yacc.py:2565: (63) factor -> atom .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: dot reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: star reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: div reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: plus reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: minus reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: less reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: lesseq reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: equal reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: semi reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: cpar reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: of reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: then reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: loop reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: comma reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: in reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: else reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: pool reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: ccur reduce using rule 63 (factor -> atom .)
+ yacc.py:2687: fi reduce using rule 63 (factor -> atom .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 80
+ yacc.py:2563:
+ yacc.py:2565: (64) factor -> opar . expr cpar
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 123
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 81
+ yacc.py:2563:
+ yacc.py:2565: (66) factor -> not . expr
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 124
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 82
+ yacc.py:2563:
+ yacc.py:2565: (68) factor -> isvoid . base_call
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: id shift and go to state 126
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: base_call shift and go to state 125
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 83
+ yacc.py:2563:
+ yacc.py:2565: (69) factor -> nox . base_call
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: id shift and go to state 126
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: base_call shift and go to state 127
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 84
+ yacc.py:2563:
+ yacc.py:2565: (70) factor -> let . let_list in expr
+ yacc.py:2565: (36) let_list -> . let_assign
+ yacc.py:2565: (37) let_list -> . let_assign comma let_list
+ yacc.py:2565: (38) let_assign -> . param larrow expr
+ yacc.py:2565: (39) let_assign -> . param
+ yacc.py:2565: (35) param -> . id colon type
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 46
+ yacc.py:2689:
+ yacc.py:2714: let_list shift and go to state 128
+ yacc.py:2714: let_assign shift and go to state 129
+ yacc.py:2714: param shift and go to state 130
+ yacc.py:2561:
+ yacc.py:2562:state 85
+ yacc.py:2563:
+ yacc.py:2565: (71) factor -> case . expr of cases_list esac
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 131
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 86
+ yacc.py:2563:
+ yacc.py:2565: (72) factor -> if . expr then expr else expr fi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 132
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 87
+ yacc.py:2563:
+ yacc.py:2565: (73) factor -> while . expr loop expr pool
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 133
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 88
+ yacc.py:2563:
+ yacc.py:2565: (74) atom -> num .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 74 (atom -> num .)
+ yacc.py:2687: dot reduce using rule 74 (atom -> num .)
+ yacc.py:2687: star reduce using rule 74 (atom -> num .)
+ yacc.py:2687: div reduce using rule 74 (atom -> num .)
+ yacc.py:2687: plus reduce using rule 74 (atom -> num .)
+ yacc.py:2687: minus reduce using rule 74 (atom -> num .)
+ yacc.py:2687: less reduce using rule 74 (atom -> num .)
+ yacc.py:2687: lesseq reduce using rule 74 (atom -> num .)
+ yacc.py:2687: equal reduce using rule 74 (atom -> num .)
+ yacc.py:2687: semi reduce using rule 74 (atom -> num .)
+ yacc.py:2687: cpar reduce using rule 74 (atom -> num .)
+ yacc.py:2687: of reduce using rule 74 (atom -> num .)
+ yacc.py:2687: then reduce using rule 74 (atom -> num .)
+ yacc.py:2687: loop reduce using rule 74 (atom -> num .)
+ yacc.py:2687: comma reduce using rule 74 (atom -> num .)
+ yacc.py:2687: in reduce using rule 74 (atom -> num .)
+ yacc.py:2687: else reduce using rule 74 (atom -> num .)
+ yacc.py:2687: pool reduce using rule 74 (atom -> num .)
+ yacc.py:2687: ccur reduce using rule 74 (atom -> num .)
+ yacc.py:2687: fi reduce using rule 74 (atom -> num .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 89
+ yacc.py:2563:
+ yacc.py:2565: (76) atom -> new . type
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 134
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 90
+ yacc.py:2563:
+ yacc.py:2565: (77) atom -> ocur . block ccur
+ yacc.py:2565: (79) atom -> ocur . error ccur
+ yacc.py:2565: (80) atom -> ocur . block error
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 136
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: block shift and go to state 135
+ yacc.py:2714: expr shift and go to state 111
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 91
+ yacc.py:2563:
+ yacc.py:2565: (81) atom -> true .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 81 (atom -> true .)
+ yacc.py:2687: dot reduce using rule 81 (atom -> true .)
+ yacc.py:2687: star reduce using rule 81 (atom -> true .)
+ yacc.py:2687: div reduce using rule 81 (atom -> true .)
+ yacc.py:2687: plus reduce using rule 81 (atom -> true .)
+ yacc.py:2687: minus reduce using rule 81 (atom -> true .)
+ yacc.py:2687: less reduce using rule 81 (atom -> true .)
+ yacc.py:2687: lesseq reduce using rule 81 (atom -> true .)
+ yacc.py:2687: equal reduce using rule 81 (atom -> true .)
+ yacc.py:2687: semi reduce using rule 81 (atom -> true .)
+ yacc.py:2687: cpar reduce using rule 81 (atom -> true .)
+ yacc.py:2687: of reduce using rule 81 (atom -> true .)
+ yacc.py:2687: then reduce using rule 81 (atom -> true .)
+ yacc.py:2687: loop reduce using rule 81 (atom -> true .)
+ yacc.py:2687: comma reduce using rule 81 (atom -> true .)
+ yacc.py:2687: in reduce using rule 81 (atom -> true .)
+ yacc.py:2687: else reduce using rule 81 (atom -> true .)
+ yacc.py:2687: pool reduce using rule 81 (atom -> true .)
+ yacc.py:2687: ccur reduce using rule 81 (atom -> true .)
+ yacc.py:2687: fi reduce using rule 81 (atom -> true .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 92
+ yacc.py:2563:
+ yacc.py:2565: (82) atom -> false .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 82 (atom -> false .)
+ yacc.py:2687: dot reduce using rule 82 (atom -> false .)
+ yacc.py:2687: star reduce using rule 82 (atom -> false .)
+ yacc.py:2687: div reduce using rule 82 (atom -> false .)
+ yacc.py:2687: plus reduce using rule 82 (atom -> false .)
+ yacc.py:2687: minus reduce using rule 82 (atom -> false .)
+ yacc.py:2687: less reduce using rule 82 (atom -> false .)
+ yacc.py:2687: lesseq reduce using rule 82 (atom -> false .)
+ yacc.py:2687: equal reduce using rule 82 (atom -> false .)
+ yacc.py:2687: semi reduce using rule 82 (atom -> false .)
+ yacc.py:2687: cpar reduce using rule 82 (atom -> false .)
+ yacc.py:2687: of reduce using rule 82 (atom -> false .)
+ yacc.py:2687: then reduce using rule 82 (atom -> false .)
+ yacc.py:2687: loop reduce using rule 82 (atom -> false .)
+ yacc.py:2687: comma reduce using rule 82 (atom -> false .)
+ yacc.py:2687: in reduce using rule 82 (atom -> false .)
+ yacc.py:2687: else reduce using rule 82 (atom -> false .)
+ yacc.py:2687: pool reduce using rule 82 (atom -> false .)
+ yacc.py:2687: ccur reduce using rule 82 (atom -> false .)
+ yacc.py:2687: fi reduce using rule 82 (atom -> false .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 93
+ yacc.py:2563:
+ yacc.py:2565: (83) atom -> string .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 83 (atom -> string .)
+ yacc.py:2687: dot reduce using rule 83 (atom -> string .)
+ yacc.py:2687: star reduce using rule 83 (atom -> string .)
+ yacc.py:2687: div reduce using rule 83 (atom -> string .)
+ yacc.py:2687: plus reduce using rule 83 (atom -> string .)
+ yacc.py:2687: minus reduce using rule 83 (atom -> string .)
+ yacc.py:2687: less reduce using rule 83 (atom -> string .)
+ yacc.py:2687: lesseq reduce using rule 83 (atom -> string .)
+ yacc.py:2687: equal reduce using rule 83 (atom -> string .)
+ yacc.py:2687: semi reduce using rule 83 (atom -> string .)
+ yacc.py:2687: cpar reduce using rule 83 (atom -> string .)
+ yacc.py:2687: of reduce using rule 83 (atom -> string .)
+ yacc.py:2687: then reduce using rule 83 (atom -> string .)
+ yacc.py:2687: loop reduce using rule 83 (atom -> string .)
+ yacc.py:2687: comma reduce using rule 83 (atom -> string .)
+ yacc.py:2687: in reduce using rule 83 (atom -> string .)
+ yacc.py:2687: else reduce using rule 83 (atom -> string .)
+ yacc.py:2687: pool reduce using rule 83 (atom -> string .)
+ yacc.py:2687: ccur reduce using rule 83 (atom -> string .)
+ yacc.py:2687: fi reduce using rule 83 (atom -> string .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 94
+ yacc.py:2563:
+ yacc.py:2565: (26) def_func -> error opar formals cpar colon . type ocur expr ccur
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 137
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 95
+ yacc.py:2563:
+ yacc.py:2565: (33) param_list -> param comma param_list .
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 33 (param_list -> param comma param_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 96
+ yacc.py:2563:
+ yacc.py:2565: (35) param -> id colon type .
+ yacc.py:2566:
+ yacc.py:2687: comma reduce using rule 35 (param -> id colon type .)
+ yacc.py:2687: cpar reduce using rule 35 (param -> id colon type .)
+ yacc.py:2687: larrow reduce using rule 35 (param -> id colon type .)
+ yacc.py:2687: in reduce using rule 35 (param -> id colon type .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 97
+ yacc.py:2563:
+ yacc.py:2565: (19) def_attr -> id colon type larrow expr .
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 19 (def_attr -> id colon type larrow expr .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 98
+ yacc.py:2563:
+ yacc.py:2565: (24) def_attr -> id colon type larrow error .
+ yacc.py:2565: (61) base_call -> error . arroba type dot func_call
+ yacc.py:2565: (78) atom -> error . block ccur
+ yacc.py:2565: (90) func_call -> error . opar args cpar
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 24 (def_attr -> id colon type larrow error .)
+ yacc.py:2687: arroba shift and go to state 108
+ yacc.py:2687: opar shift and go to state 110
+ yacc.py:2687: error shift and go to state 107
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: block shift and go to state 109
+ yacc.py:2714: expr shift and go to state 111
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 99
+ yacc.py:2563:
+ yacc.py:2565: (23) def_attr -> id colon error larrow expr .
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 23 (def_attr -> id colon error larrow expr .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 100
+ yacc.py:2563:
+ yacc.py:2565: (25) def_func -> id opar formals cpar colon . type ocur expr ccur
+ yacc.py:2565: (28) def_func -> id opar formals cpar colon . error ocur expr ccur
+ yacc.py:2565: (29) def_func -> id opar formals cpar colon . type ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 138
+ yacc.py:2687: error shift and go to state 139
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 101
+ yacc.py:2563:
+ yacc.py:2565: (27) def_func -> id opar error cpar colon . type ocur expr ccur
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 140
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 102
+ yacc.py:2563:
+ yacc.py:2565: (7) def_class -> class type inherits type ocur feature_list ccur semi .
+ yacc.py:2566:
+ yacc.py:2687: error reduce using rule 7 (def_class -> class type inherits type ocur feature_list ccur semi .)
+ yacc.py:2687: class reduce using rule 7 (def_class -> class type inherits type ocur feature_list ccur semi .)
+ yacc.py:2687: $end reduce using rule 7 (def_class -> class type inherits type ocur feature_list ccur semi .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 103
+ yacc.py:2563:
+ yacc.py:2565: (13) def_class -> class type inherits type ocur feature_list ccur error .
+ yacc.py:2566:
+ yacc.py:2687: error reduce using rule 13 (def_class -> class type inherits type ocur feature_list ccur error .)
+ yacc.py:2687: class reduce using rule 13 (def_class -> class type inherits type ocur feature_list ccur error .)
+ yacc.py:2687: $end reduce using rule 13 (def_class -> class type inherits type ocur feature_list ccur error .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 104
+ yacc.py:2563:
+ yacc.py:2565: (12) def_class -> class type inherits error ocur feature_list ccur semi .
+ yacc.py:2566:
+ yacc.py:2687: error reduce using rule 12 (def_class -> class type inherits error ocur feature_list ccur semi .)
+ yacc.py:2687: class reduce using rule 12 (def_class -> class type inherits error ocur feature_list ccur semi .)
+ yacc.py:2687: $end reduce using rule 12 (def_class -> class type inherits error ocur feature_list ccur semi .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 105
+ yacc.py:2563:
+ yacc.py:2565: (11) def_class -> class error inherits error ocur feature_list ccur semi .
+ yacc.py:2566:
+ yacc.py:2687: error reduce using rule 11 (def_class -> class error inherits error ocur feature_list ccur semi .)
+ yacc.py:2687: class reduce using rule 11 (def_class -> class error inherits error ocur feature_list ccur semi .)
+ yacc.py:2687: $end reduce using rule 11 (def_class -> class error inherits error ocur feature_list ccur semi .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 106
+ yacc.py:2563:
+ yacc.py:2565: (10) def_class -> class error inherits type ocur feature_list ccur semi .
+ yacc.py:2566:
+ yacc.py:2687: error reduce using rule 10 (def_class -> class error inherits type ocur feature_list ccur semi .)
+ yacc.py:2687: class reduce using rule 10 (def_class -> class error inherits type ocur feature_list ccur semi .)
+ yacc.py:2687: $end reduce using rule 10 (def_class -> class error inherits type ocur feature_list ccur semi .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 107
+ yacc.py:2563:
+ yacc.py:2565: (86) block -> error . block
+ yacc.py:2565: (87) block -> error . semi
+ yacc.py:2565: (61) base_call -> error . arroba type dot func_call
+ yacc.py:2565: (78) atom -> error . block ccur
+ yacc.py:2565: (90) func_call -> error . opar args cpar
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 142
+ yacc.py:2687: arroba shift and go to state 108
+ yacc.py:2687: opar shift and go to state 110
+ yacc.py:2687: error shift and go to state 107
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: block shift and go to state 141
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: expr shift and go to state 111
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 108
+ yacc.py:2563:
+ yacc.py:2565: (61) base_call -> error arroba . type dot func_call
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 143
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 109
+ yacc.py:2563:
+ yacc.py:2565: (78) atom -> error block . ccur
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 144
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 110
+ yacc.py:2563:
+ yacc.py:2565: (90) func_call -> error opar . args cpar
+ yacc.py:2565: (64) factor -> opar . expr cpar
+ yacc.py:2565: (91) args -> . arg_list
+ yacc.py:2565: (92) args -> . arg_list_empty
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (93) arg_list -> . expr
+ yacc.py:2565: (94) arg_list -> . expr comma arg_list
+ yacc.py:2565: (95) arg_list -> . error arg_list
+ yacc.py:2565: (96) arg_list_empty -> . epsilon
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 145
+ yacc.py:2687: cpar reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: args shift and go to state 146
+ yacc.py:2714: expr shift and go to state 147
+ yacc.py:2714: arg_list shift and go to state 148
+ yacc.py:2714: arg_list_empty shift and go to state 149
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: epsilon shift and go to state 150
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 111
+ yacc.py:2563:
+ yacc.py:2565: (84) block -> expr . semi
+ yacc.py:2565: (85) block -> expr . semi block
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 151
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 112
+ yacc.py:2563:
+ yacc.py:2565: (45) expr -> id larrow . expr
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 152
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 113
+ yacc.py:2563:
+ yacc.py:2565: (88) func_call -> id opar . args cpar
+ yacc.py:2565: (89) func_call -> id opar . error cpar
+ yacc.py:2565: (91) args -> . arg_list
+ yacc.py:2565: (92) args -> . arg_list_empty
+ yacc.py:2565: (93) arg_list -> . expr
+ yacc.py:2565: (94) arg_list -> . expr comma arg_list
+ yacc.py:2565: (95) arg_list -> . error arg_list
+ yacc.py:2565: (96) arg_list_empty -> . epsilon
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 154
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: cpar reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: args shift and go to state 153
+ yacc.py:2714: arg_list shift and go to state 148
+ yacc.py:2714: arg_list_empty shift and go to state 149
+ yacc.py:2714: expr shift and go to state 155
+ yacc.py:2714: epsilon shift and go to state 150
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 114
+ yacc.py:2563:
+ yacc.py:2565: (47) comp -> comp less . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: id shift and go to state 126
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: op shift and go to state 156
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 115
+ yacc.py:2563:
+ yacc.py:2565: (48) comp -> comp lesseq . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: id shift and go to state 126
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: op shift and go to state 157
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 116
+ yacc.py:2563:
+ yacc.py:2565: (49) comp -> comp equal . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: id shift and go to state 126
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: op shift and go to state 158
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 117
+ yacc.py:2563:
+ yacc.py:2565: (51) op -> op plus . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: id shift and go to state 126
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: term shift and go to state 159
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 118
+ yacc.py:2563:
+ yacc.py:2565: (52) op -> op minus . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: id shift and go to state 126
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: term shift and go to state 160
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 119
+ yacc.py:2563:
+ yacc.py:2565: (54) term -> term star . base_call
+ yacc.py:2565: (57) term -> term star . error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 162
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: id shift and go to state 126
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: base_call shift and go to state 161
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 120
+ yacc.py:2563:
+ yacc.py:2565: (55) term -> term div . base_call
+ yacc.py:2565: (58) term -> term div . error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 164
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: id shift and go to state 126
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: base_call shift and go to state 163
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 121
+ yacc.py:2563:
+ yacc.py:2565: (59) base_call -> factor arroba . type dot func_call
+ yacc.py:2565: (62) base_call -> factor arroba . error dot func_call
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 165
+ yacc.py:2687: error shift and go to state 166
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 122
+ yacc.py:2563:
+ yacc.py:2565: (65) factor -> factor dot . func_call
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 168
+ yacc.py:2687: error shift and go to state 169
+ yacc.py:2689:
+ yacc.py:2714: func_call shift and go to state 167
+ yacc.py:2561:
+ yacc.py:2562:state 123
+ yacc.py:2563:
+ yacc.py:2565: (64) factor -> opar expr . cpar
+ yacc.py:2566:
+ yacc.py:2687: cpar shift and go to state 170
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 124
+ yacc.py:2563:
+ yacc.py:2565: (66) factor -> not expr .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: dot reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: star reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: div reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: plus reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: minus reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: less reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: lesseq reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: equal reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: semi reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: cpar reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: of reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: then reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: loop reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: comma reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: in reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: else reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: pool reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: ccur reduce using rule 66 (factor -> not expr .)
+ yacc.py:2687: fi reduce using rule 66 (factor -> not expr .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 125
+ yacc.py:2563:
+ yacc.py:2565: (68) factor -> isvoid base_call .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: dot reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: star reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: div reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: plus reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: minus reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: less reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: lesseq reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: equal reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: semi reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: cpar reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: of reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: then reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: loop reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: comma reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: in reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: else reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: pool reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: ccur reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2687: fi reduce using rule 68 (factor -> isvoid base_call .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 126
+ yacc.py:2563:
+ yacc.py:2565: (75) atom -> id .
+ yacc.py:2565: (88) func_call -> id . opar args cpar
+ yacc.py:2565: (89) func_call -> id . opar error cpar
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 75 (atom -> id .)
+ yacc.py:2687: dot reduce using rule 75 (atom -> id .)
+ yacc.py:2687: star reduce using rule 75 (atom -> id .)
+ yacc.py:2687: div reduce using rule 75 (atom -> id .)
+ yacc.py:2687: plus reduce using rule 75 (atom -> id .)
+ yacc.py:2687: minus reduce using rule 75 (atom -> id .)
+ yacc.py:2687: less reduce using rule 75 (atom -> id .)
+ yacc.py:2687: lesseq reduce using rule 75 (atom -> id .)
+ yacc.py:2687: equal reduce using rule 75 (atom -> id .)
+ yacc.py:2687: semi reduce using rule 75 (atom -> id .)
+ yacc.py:2687: cpar reduce using rule 75 (atom -> id .)
+ yacc.py:2687: of reduce using rule 75 (atom -> id .)
+ yacc.py:2687: then reduce using rule 75 (atom -> id .)
+ yacc.py:2687: loop reduce using rule 75 (atom -> id .)
+ yacc.py:2687: comma reduce using rule 75 (atom -> id .)
+ yacc.py:2687: in reduce using rule 75 (atom -> id .)
+ yacc.py:2687: else reduce using rule 75 (atom -> id .)
+ yacc.py:2687: pool reduce using rule 75 (atom -> id .)
+ yacc.py:2687: ccur reduce using rule 75 (atom -> id .)
+ yacc.py:2687: fi reduce using rule 75 (atom -> id .)
+ yacc.py:2687: opar shift and go to state 113
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 127
+ yacc.py:2563:
+ yacc.py:2565: (69) factor -> nox base_call .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: dot reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: star reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: div reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: plus reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: minus reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: less reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: lesseq reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: equal reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: semi reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: cpar reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: of reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: then reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: loop reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: comma reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: in reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: else reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: pool reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: ccur reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2687: fi reduce using rule 69 (factor -> nox base_call .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 128
+ yacc.py:2563:
+ yacc.py:2565: (70) factor -> let let_list . in expr
+ yacc.py:2566:
+ yacc.py:2687: in shift and go to state 171
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 129
+ yacc.py:2563:
+ yacc.py:2565: (36) let_list -> let_assign .
+ yacc.py:2565: (37) let_list -> let_assign . comma let_list
+ yacc.py:2566:
+ yacc.py:2687: in reduce using rule 36 (let_list -> let_assign .)
+ yacc.py:2687: comma shift and go to state 172
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 130
+ yacc.py:2563:
+ yacc.py:2565: (38) let_assign -> param . larrow expr
+ yacc.py:2565: (39) let_assign -> param .
+ yacc.py:2566:
+ yacc.py:2687: larrow shift and go to state 173
+ yacc.py:2687: comma reduce using rule 39 (let_assign -> param .)
+ yacc.py:2687: in reduce using rule 39 (let_assign -> param .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 131
+ yacc.py:2563:
+ yacc.py:2565: (71) factor -> case expr . of cases_list esac
+ yacc.py:2566:
+ yacc.py:2687: of shift and go to state 174
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 132
+ yacc.py:2563:
+ yacc.py:2565: (72) factor -> if expr . then expr else expr fi
+ yacc.py:2566:
+ yacc.py:2687: then shift and go to state 175
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 133
+ yacc.py:2563:
+ yacc.py:2565: (73) factor -> while expr . loop expr pool
+ yacc.py:2566:
+ yacc.py:2687: loop shift and go to state 176
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 134
+ yacc.py:2563:
+ yacc.py:2565: (76) atom -> new type .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: dot reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: star reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: div reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: plus reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: minus reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: less reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: lesseq reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: equal reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: semi reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: cpar reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: of reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: then reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: loop reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: comma reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: in reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: else reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: pool reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: ccur reduce using rule 76 (atom -> new type .)
+ yacc.py:2687: fi reduce using rule 76 (atom -> new type .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 135
+ yacc.py:2563:
+ yacc.py:2565: (77) atom -> ocur block . ccur
+ yacc.py:2565: (80) atom -> ocur block . error
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 177
+ yacc.py:2687: error shift and go to state 178
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 136
+ yacc.py:2563:
+ yacc.py:2565: (79) atom -> ocur error . ccur
+ yacc.py:2565: (86) block -> error . block
+ yacc.py:2565: (87) block -> error . semi
+ yacc.py:2565: (61) base_call -> error . arroba type dot func_call
+ yacc.py:2565: (78) atom -> error . block ccur
+ yacc.py:2565: (90) func_call -> error . opar args cpar
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 179
+ yacc.py:2687: semi shift and go to state 142
+ yacc.py:2687: arroba shift and go to state 108
+ yacc.py:2687: opar shift and go to state 110
+ yacc.py:2687: error shift and go to state 107
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: block shift and go to state 141
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: expr shift and go to state 111
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 137
+ yacc.py:2563:
+ yacc.py:2565: (26) def_func -> error opar formals cpar colon type . ocur expr ccur
+ yacc.py:2566:
+ yacc.py:2687: ocur shift and go to state 180
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 138
+ yacc.py:2563:
+ yacc.py:2565: (25) def_func -> id opar formals cpar colon type . ocur expr ccur
+ yacc.py:2565: (29) def_func -> id opar formals cpar colon type . ocur error ccur
+ yacc.py:2566:
+ yacc.py:2687: ocur shift and go to state 181
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 139
+ yacc.py:2563:
+ yacc.py:2565: (28) def_func -> id opar formals cpar colon error . ocur expr ccur
+ yacc.py:2566:
+ yacc.py:2687: ocur shift and go to state 182
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 140
+ yacc.py:2563:
+ yacc.py:2565: (27) def_func -> id opar error cpar colon type . ocur expr ccur
+ yacc.py:2566:
+ yacc.py:2687: ocur shift and go to state 183
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 141
+ yacc.py:2563:
+ yacc.py:2565: (86) block -> error block .
+ yacc.py:2565: (78) atom -> error block . ccur
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for ccur resolved as shift
+ yacc.py:2687: error reduce using rule 86 (block -> error block .)
+ yacc.py:2687: ccur shift and go to state 144
+ yacc.py:2689:
+ yacc.py:2696: ! ccur [ reduce using rule 86 (block -> error block .) ]
+ yacc.py:2700:
+ yacc.py:2561:
+ yacc.py:2562:state 142
+ yacc.py:2563:
+ yacc.py:2565: (87) block -> error semi .
+ yacc.py:2566:
+ yacc.py:2687: ccur reduce using rule 87 (block -> error semi .)
+ yacc.py:2687: error reduce using rule 87 (block -> error semi .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 143
+ yacc.py:2563:
+ yacc.py:2565: (61) base_call -> error arroba type . dot func_call
+ yacc.py:2566:
+ yacc.py:2687: dot shift and go to state 184
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 144
+ yacc.py:2563:
+ yacc.py:2565: (78) atom -> error block ccur .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: dot reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: star reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: div reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: plus reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: minus reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: less reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: lesseq reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: equal reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: semi reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: cpar reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: of reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: then reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: loop reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: comma reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: in reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: else reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: pool reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: ccur reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2687: fi reduce using rule 78 (atom -> error block ccur .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 145
+ yacc.py:2563:
+ yacc.py:2565: (95) arg_list -> error . arg_list
+ yacc.py:2565: (61) base_call -> error . arroba type dot func_call
+ yacc.py:2565: (78) atom -> error . block ccur
+ yacc.py:2565: (90) func_call -> error . opar args cpar
+ yacc.py:2565: (93) arg_list -> . expr
+ yacc.py:2565: (94) arg_list -> . expr comma arg_list
+ yacc.py:2565: (95) arg_list -> . error arg_list
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: arroba shift and go to state 108
+ yacc.py:2687: opar shift and go to state 110
+ yacc.py:2687: error shift and go to state 185
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: arg_list shift and go to state 186
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: block shift and go to state 109
+ yacc.py:2714: expr shift and go to state 187
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 146
+ yacc.py:2563:
+ yacc.py:2565: (90) func_call -> error opar args . cpar
+ yacc.py:2566:
+ yacc.py:2687: cpar shift and go to state 188
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 147
+ yacc.py:2563:
+ yacc.py:2565: (64) factor -> opar expr . cpar
+ yacc.py:2565: (93) arg_list -> expr .
+ yacc.py:2565: (94) arg_list -> expr . comma arg_list
+ yacc.py:2566:
+ yacc.py:2609: ! shift/reduce conflict for cpar resolved as shift
+ yacc.py:2687: cpar shift and go to state 170
+ yacc.py:2687: comma shift and go to state 189
+ yacc.py:2689:
+ yacc.py:2696: ! cpar [ reduce using rule 93 (arg_list -> expr .) ]
+ yacc.py:2700:
+ yacc.py:2561:
+ yacc.py:2562:state 148
+ yacc.py:2563:
+ yacc.py:2565: (91) args -> arg_list .
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 91 (args -> arg_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 149
+ yacc.py:2563:
+ yacc.py:2565: (92) args -> arg_list_empty .
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 92 (args -> arg_list_empty .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 150
+ yacc.py:2563:
+ yacc.py:2565: (96) arg_list_empty -> epsilon .
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 96 (arg_list_empty -> epsilon .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 151
+ yacc.py:2563:
+ yacc.py:2565: (84) block -> expr semi .
+ yacc.py:2565: (85) block -> expr semi . block
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for error resolved as shift
+ yacc.py:2687: ccur reduce using rule 84 (block -> expr semi .)
+ yacc.py:2687: error shift and go to state 107
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2696: ! error [ reduce using rule 84 (block -> expr semi .) ]
+ yacc.py:2700:
+ yacc.py:2714: expr shift and go to state 111
+ yacc.py:2714: block shift and go to state 190
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 152
+ yacc.py:2563:
+ yacc.py:2565: (45) expr -> id larrow expr .
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: cpar reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: arroba reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: dot reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: star reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: div reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: plus reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: minus reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: less reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: lesseq reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: equal reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: of reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: then reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: loop reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: comma reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: in reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: else reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: pool reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: ccur reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2687: fi reduce using rule 45 (expr -> id larrow expr .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 153
+ yacc.py:2563:
+ yacc.py:2565: (88) func_call -> id opar args . cpar
+ yacc.py:2566:
+ yacc.py:2687: cpar shift and go to state 191
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 154
+ yacc.py:2563:
+ yacc.py:2565: (89) func_call -> id opar error . cpar
+ yacc.py:2565: (95) arg_list -> error . arg_list
+ yacc.py:2565: (61) base_call -> error . arroba type dot func_call
+ yacc.py:2565: (78) atom -> error . block ccur
+ yacc.py:2565: (90) func_call -> error . opar args cpar
+ yacc.py:2565: (93) arg_list -> . expr
+ yacc.py:2565: (94) arg_list -> . expr comma arg_list
+ yacc.py:2565: (95) arg_list -> . error arg_list
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: cpar shift and go to state 192
+ yacc.py:2687: arroba shift and go to state 108
+ yacc.py:2687: opar shift and go to state 110
+ yacc.py:2687: error shift and go to state 185
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: arg_list shift and go to state 186
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: block shift and go to state 109
+ yacc.py:2714: expr shift and go to state 187
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 155
+ yacc.py:2563:
+ yacc.py:2565: (93) arg_list -> expr .
+ yacc.py:2565: (94) arg_list -> expr . comma arg_list
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 93 (arg_list -> expr .)
+ yacc.py:2687: comma shift and go to state 189
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 156
+ yacc.py:2563:
+ yacc.py:2565: (47) comp -> comp less op .
+ yacc.py:2565: (51) op -> op . plus term
+ yacc.py:2565: (52) op -> op . minus term
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for plus resolved as shift
+ yacc.py:2666: ! shift/reduce conflict for minus resolved as shift
+ yacc.py:2687: less reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: lesseq reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: equal reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: semi reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: cpar reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: arroba reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: dot reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: star reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: div reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: of reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: then reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: loop reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: comma reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: in reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: else reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: pool reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: ccur reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: fi reduce using rule 47 (comp -> comp less op .)
+ yacc.py:2687: plus shift and go to state 117
+ yacc.py:2687: minus shift and go to state 118
+ yacc.py:2689:
+ yacc.py:2696: ! plus [ reduce using rule 47 (comp -> comp less op .) ]
+ yacc.py:2696: ! minus [ reduce using rule 47 (comp -> comp less op .) ]
+ yacc.py:2700:
+ yacc.py:2561:
+ yacc.py:2562:state 157
+ yacc.py:2563:
+ yacc.py:2565: (48) comp -> comp lesseq op .
+ yacc.py:2565: (51) op -> op . plus term
+ yacc.py:2565: (52) op -> op . minus term
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for plus resolved as shift
+ yacc.py:2666: ! shift/reduce conflict for minus resolved as shift
+ yacc.py:2687: less reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: lesseq reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: equal reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: semi reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: cpar reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: arroba reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: dot reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: star reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: div reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: of reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: then reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: loop reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: comma reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: in reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: else reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: pool reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: ccur reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: fi reduce using rule 48 (comp -> comp lesseq op .)
+ yacc.py:2687: plus shift and go to state 117
+ yacc.py:2687: minus shift and go to state 118
+ yacc.py:2689:
+ yacc.py:2696: ! plus [ reduce using rule 48 (comp -> comp lesseq op .) ]
+ yacc.py:2696: ! minus [ reduce using rule 48 (comp -> comp lesseq op .) ]
+ yacc.py:2700:
+ yacc.py:2561:
+ yacc.py:2562:state 158
+ yacc.py:2563:
+ yacc.py:2565: (49) comp -> comp equal op .
+ yacc.py:2565: (51) op -> op . plus term
+ yacc.py:2565: (52) op -> op . minus term
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for plus resolved as shift
+ yacc.py:2666: ! shift/reduce conflict for minus resolved as shift
+ yacc.py:2687: less reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: lesseq reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: equal reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: semi reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: cpar reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: arroba reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: dot reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: star reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: div reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: of reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: then reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: loop reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: comma reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: in reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: else reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: pool reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: ccur reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: fi reduce using rule 49 (comp -> comp equal op .)
+ yacc.py:2687: plus shift and go to state 117
+ yacc.py:2687: minus shift and go to state 118
+ yacc.py:2689:
+ yacc.py:2696: ! plus [ reduce using rule 49 (comp -> comp equal op .) ]
+ yacc.py:2696: ! minus [ reduce using rule 49 (comp -> comp equal op .) ]
+ yacc.py:2700:
+ yacc.py:2561:
+ yacc.py:2562:state 159
+ yacc.py:2563:
+ yacc.py:2565: (51) op -> op plus term .
+ yacc.py:2565: (54) term -> term . star base_call
+ yacc.py:2565: (55) term -> term . div base_call
+ yacc.py:2565: (57) term -> term . star error
+ yacc.py:2565: (58) term -> term . div error
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for star resolved as shift
+ yacc.py:2666: ! shift/reduce conflict for div resolved as shift
+ yacc.py:2687: plus reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: minus reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: less reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: lesseq reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: equal reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: semi reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: cpar reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: arroba reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: dot reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: of reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: then reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: loop reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: comma reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: in reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: else reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: pool reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: ccur reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: fi reduce using rule 51 (op -> op plus term .)
+ yacc.py:2687: star shift and go to state 119
+ yacc.py:2687: div shift and go to state 120
+ yacc.py:2689:
+ yacc.py:2696: ! star [ reduce using rule 51 (op -> op plus term .) ]
+ yacc.py:2696: ! div [ reduce using rule 51 (op -> op plus term .) ]
+ yacc.py:2700:
+ yacc.py:2561:
+ yacc.py:2562:state 160
+ yacc.py:2563:
+ yacc.py:2565: (52) op -> op minus term .
+ yacc.py:2565: (54) term -> term . star base_call
+ yacc.py:2565: (55) term -> term . div base_call
+ yacc.py:2565: (57) term -> term . star error
+ yacc.py:2565: (58) term -> term . div error
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for star resolved as shift
+ yacc.py:2666: ! shift/reduce conflict for div resolved as shift
+ yacc.py:2687: plus reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: minus reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: less reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: lesseq reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: equal reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: semi reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: cpar reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: arroba reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: dot reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: of reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: then reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: loop reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: comma reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: in reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: else reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: pool reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: ccur reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: fi reduce using rule 52 (op -> op minus term .)
+ yacc.py:2687: star shift and go to state 119
+ yacc.py:2687: div shift and go to state 120
+ yacc.py:2689:
+ yacc.py:2696: ! star [ reduce using rule 52 (op -> op minus term .) ]
+ yacc.py:2696: ! div [ reduce using rule 52 (op -> op minus term .) ]
+ yacc.py:2700:
+ yacc.py:2561:
+ yacc.py:2562:state 161
+ yacc.py:2563:
+ yacc.py:2565: (54) term -> term star base_call .
+ yacc.py:2566:
+ yacc.py:2687: star reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: div reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: plus reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: minus reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: less reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: lesseq reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: equal reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: semi reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: cpar reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: arroba reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: dot reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: of reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: then reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: loop reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: comma reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: in reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: else reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: pool reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: ccur reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2687: fi reduce using rule 54 (term -> term star base_call .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 162
+ yacc.py:2563:
+ yacc.py:2565: (57) term -> term star error .
+ yacc.py:2565: (61) base_call -> error . arroba type dot func_call
+ yacc.py:2565: (78) atom -> error . block ccur
+ yacc.py:2565: (90) func_call -> error . opar args cpar
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for arroba resolved as shift
+ yacc.py:2687: star reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: div reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: plus reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: minus reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: less reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: lesseq reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: equal reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: semi reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: cpar reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: dot reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: of reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: then reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: loop reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: comma reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: in reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: else reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: pool reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: ccur reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: fi reduce using rule 57 (term -> term star error .)
+ yacc.py:2687: arroba shift and go to state 108
+ yacc.py:2687: opar shift and go to state 110
+ yacc.py:2687: error shift and go to state 107
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2696: ! arroba [ reduce using rule 57 (term -> term star error .) ]
+ yacc.py:2700:
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: block shift and go to state 109
+ yacc.py:2714: expr shift and go to state 111
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 163
+ yacc.py:2563:
+ yacc.py:2565: (55) term -> term div base_call .
+ yacc.py:2566:
+ yacc.py:2687: star reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: div reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: plus reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: minus reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: less reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: lesseq reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: equal reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: semi reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: cpar reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: arroba reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: dot reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: of reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: then reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: loop reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: comma reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: in reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: else reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: pool reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: ccur reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2687: fi reduce using rule 55 (term -> term div base_call .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 164
+ yacc.py:2563:
+ yacc.py:2565: (58) term -> term div error .
+ yacc.py:2565: (61) base_call -> error . arroba type dot func_call
+ yacc.py:2565: (78) atom -> error . block ccur
+ yacc.py:2565: (90) func_call -> error . opar args cpar
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2666: ! shift/reduce conflict for arroba resolved as shift
+ yacc.py:2687: star reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: div reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: plus reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: minus reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: less reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: lesseq reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: equal reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: semi reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: cpar reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: dot reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: of reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: then reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: loop reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: comma reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: in reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: else reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: pool reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: ccur reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: fi reduce using rule 58 (term -> term div error .)
+ yacc.py:2687: arroba shift and go to state 108
+ yacc.py:2687: opar shift and go to state 110
+ yacc.py:2687: error shift and go to state 107
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2696: ! arroba [ reduce using rule 58 (term -> term div error .) ]
+ yacc.py:2700:
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: block shift and go to state 109
+ yacc.py:2714: expr shift and go to state 111
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 165
+ yacc.py:2563:
+ yacc.py:2565: (59) base_call -> factor arroba type . dot func_call
+ yacc.py:2566:
+ yacc.py:2687: dot shift and go to state 193
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 166
+ yacc.py:2563:
+ yacc.py:2565: (62) base_call -> factor arroba error . dot func_call
+ yacc.py:2566:
+ yacc.py:2687: dot shift and go to state 194
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 167
+ yacc.py:2563:
+ yacc.py:2565: (65) factor -> factor dot func_call .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: dot reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: star reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: div reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: plus reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: minus reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: less reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: lesseq reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: equal reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: semi reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: cpar reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: of reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: then reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: loop reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: comma reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: in reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: else reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: pool reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: ccur reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2687: fi reduce using rule 65 (factor -> factor dot func_call .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 168
+ yacc.py:2563:
+ yacc.py:2565: (88) func_call -> id . opar args cpar
+ yacc.py:2565: (89) func_call -> id . opar error cpar
+ yacc.py:2566:
+ yacc.py:2687: opar shift and go to state 113
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 169
+ yacc.py:2563:
+ yacc.py:2565: (90) func_call -> error . opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: opar shift and go to state 195
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 170
+ yacc.py:2563:
+ yacc.py:2565: (64) factor -> opar expr cpar .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: dot reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: star reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: div reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: plus reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: minus reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: less reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: lesseq reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: equal reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: semi reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: cpar reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: of reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: then reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: loop reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: comma reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: in reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: else reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: pool reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: ccur reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2687: fi reduce using rule 64 (factor -> opar expr cpar .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 171
+ yacc.py:2563:
+ yacc.py:2565: (70) factor -> let let_list in . expr
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 196
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 172
+ yacc.py:2563:
+ yacc.py:2565: (37) let_list -> let_assign comma . let_list
+ yacc.py:2565: (36) let_list -> . let_assign
+ yacc.py:2565: (37) let_list -> . let_assign comma let_list
+ yacc.py:2565: (38) let_assign -> . param larrow expr
+ yacc.py:2565: (39) let_assign -> . param
+ yacc.py:2565: (35) param -> . id colon type
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 46
+ yacc.py:2689:
+ yacc.py:2714: let_assign shift and go to state 129
+ yacc.py:2714: let_list shift and go to state 197
+ yacc.py:2714: param shift and go to state 130
+ yacc.py:2561:
+ yacc.py:2562:state 173
+ yacc.py:2563:
+ yacc.py:2565: (38) let_assign -> param larrow . expr
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 198
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 174
+ yacc.py:2563:
+ yacc.py:2565: (71) factor -> case expr of . cases_list esac
+ yacc.py:2565: (40) cases_list -> . casep semi
+ yacc.py:2565: (41) cases_list -> . casep semi cases_list
+ yacc.py:2565: (42) cases_list -> . error cases_list
+ yacc.py:2565: (43) cases_list -> . error semi
+ yacc.py:2565: (44) casep -> . id colon type rarrow expr
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 201
+ yacc.py:2687: id shift and go to state 202
+ yacc.py:2689:
+ yacc.py:2714: cases_list shift and go to state 199
+ yacc.py:2714: casep shift and go to state 200
+ yacc.py:2561:
+ yacc.py:2562:state 175
+ yacc.py:2563:
+ yacc.py:2565: (72) factor -> if expr then . expr else expr fi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 203
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 176
+ yacc.py:2563:
+ yacc.py:2565: (73) factor -> while expr loop . expr pool
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 204
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 177
+ yacc.py:2563:
+ yacc.py:2565: (77) atom -> ocur block ccur .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: dot reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: star reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: div reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: plus reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: minus reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: less reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: lesseq reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: equal reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: semi reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: cpar reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: of reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: then reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: loop reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: comma reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: in reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: else reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: pool reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: ccur reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2687: fi reduce using rule 77 (atom -> ocur block ccur .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 178
+ yacc.py:2563:
+ yacc.py:2565: (80) atom -> ocur block error .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: dot reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: star reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: div reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: plus reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: minus reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: less reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: lesseq reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: equal reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: semi reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: cpar reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: of reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: then reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: loop reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: comma reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: in reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: else reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: pool reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: ccur reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2687: fi reduce using rule 80 (atom -> ocur block error .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 179
+ yacc.py:2563:
+ yacc.py:2565: (79) atom -> ocur error ccur .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: dot reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: star reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: div reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: plus reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: minus reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: less reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: lesseq reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: equal reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: semi reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: cpar reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: of reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: then reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: loop reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: comma reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: in reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: else reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: pool reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: ccur reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2687: fi reduce using rule 79 (atom -> ocur error ccur .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 180
+ yacc.py:2563:
+ yacc.py:2565: (26) def_func -> error opar formals cpar colon type ocur . expr ccur
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 205
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 181
+ yacc.py:2563:
+ yacc.py:2565: (25) def_func -> id opar formals cpar colon type ocur . expr ccur
+ yacc.py:2565: (29) def_func -> id opar formals cpar colon type ocur . error ccur
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 207
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 206
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 182
+ yacc.py:2563:
+ yacc.py:2565: (28) def_func -> id opar formals cpar colon error ocur . expr ccur
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 208
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 183
+ yacc.py:2563:
+ yacc.py:2565: (27) def_func -> id opar error cpar colon type ocur . expr ccur
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 209
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 184
+ yacc.py:2563:
+ yacc.py:2565: (61) base_call -> error arroba type dot . func_call
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 168
+ yacc.py:2687: error shift and go to state 169
+ yacc.py:2689:
+ yacc.py:2714: func_call shift and go to state 210
+ yacc.py:2561:
+ yacc.py:2562:state 185
+ yacc.py:2563:
+ yacc.py:2565: (95) arg_list -> error . arg_list
+ yacc.py:2565: (86) block -> error . block
+ yacc.py:2565: (87) block -> error . semi
+ yacc.py:2565: (61) base_call -> error . arroba type dot func_call
+ yacc.py:2565: (78) atom -> error . block ccur
+ yacc.py:2565: (90) func_call -> error . opar args cpar
+ yacc.py:2565: (93) arg_list -> . expr
+ yacc.py:2565: (94) arg_list -> . expr comma arg_list
+ yacc.py:2565: (95) arg_list -> . error arg_list
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 142
+ yacc.py:2687: arroba shift and go to state 108
+ yacc.py:2687: opar shift and go to state 110
+ yacc.py:2687: error shift and go to state 185
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: arg_list shift and go to state 186
+ yacc.py:2714: block shift and go to state 141
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: expr shift and go to state 187
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 186
+ yacc.py:2563:
+ yacc.py:2565: (95) arg_list -> error arg_list .
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 95 (arg_list -> error arg_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 187
+ yacc.py:2563:
+ yacc.py:2565: (93) arg_list -> expr .
+ yacc.py:2565: (94) arg_list -> expr . comma arg_list
+ yacc.py:2565: (84) block -> expr . semi
+ yacc.py:2565: (85) block -> expr . semi block
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 93 (arg_list -> expr .)
+ yacc.py:2687: comma shift and go to state 189
+ yacc.py:2687: semi shift and go to state 151
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 188
+ yacc.py:2563:
+ yacc.py:2565: (90) func_call -> error opar args cpar .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: dot reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: star reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: div reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: plus reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: minus reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: less reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: lesseq reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: equal reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: semi reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: cpar reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: of reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: then reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: loop reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: comma reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: in reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: else reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: pool reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: ccur reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2687: fi reduce using rule 90 (func_call -> error opar args cpar .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 189
+ yacc.py:2563:
+ yacc.py:2565: (94) arg_list -> expr comma . arg_list
+ yacc.py:2565: (93) arg_list -> . expr
+ yacc.py:2565: (94) arg_list -> . expr comma arg_list
+ yacc.py:2565: (95) arg_list -> . error arg_list
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 145
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 155
+ yacc.py:2714: arg_list shift and go to state 211
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 190
+ yacc.py:2563:
+ yacc.py:2565: (85) block -> expr semi block .
+ yacc.py:2566:
+ yacc.py:2687: ccur reduce using rule 85 (block -> expr semi block .)
+ yacc.py:2687: error reduce using rule 85 (block -> expr semi block .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 191
+ yacc.py:2563:
+ yacc.py:2565: (88) func_call -> id opar args cpar .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: dot reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: star reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: div reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: plus reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: minus reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: less reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: lesseq reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: equal reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: semi reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: cpar reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: of reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: then reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: loop reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: comma reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: in reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: else reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: pool reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: ccur reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2687: fi reduce using rule 88 (func_call -> id opar args cpar .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 192
+ yacc.py:2563:
+ yacc.py:2565: (89) func_call -> id opar error cpar .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: dot reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: star reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: div reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: plus reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: minus reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: less reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: lesseq reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: equal reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: semi reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: cpar reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: of reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: then reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: loop reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: comma reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: in reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: else reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: pool reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: ccur reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2687: fi reduce using rule 89 (func_call -> id opar error cpar .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 193
+ yacc.py:2563:
+ yacc.py:2565: (59) base_call -> factor arroba type dot . func_call
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 168
+ yacc.py:2687: error shift and go to state 169
+ yacc.py:2689:
+ yacc.py:2714: func_call shift and go to state 212
+ yacc.py:2561:
+ yacc.py:2562:state 194
+ yacc.py:2563:
+ yacc.py:2565: (62) base_call -> factor arroba error dot . func_call
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 168
+ yacc.py:2687: error shift and go to state 169
+ yacc.py:2689:
+ yacc.py:2714: func_call shift and go to state 213
+ yacc.py:2561:
+ yacc.py:2562:state 195
+ yacc.py:2563:
+ yacc.py:2565: (90) func_call -> error opar . args cpar
+ yacc.py:2565: (91) args -> . arg_list
+ yacc.py:2565: (92) args -> . arg_list_empty
+ yacc.py:2565: (93) arg_list -> . expr
+ yacc.py:2565: (94) arg_list -> . expr comma arg_list
+ yacc.py:2565: (95) arg_list -> . error arg_list
+ yacc.py:2565: (96) arg_list_empty -> . epsilon
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (5) epsilon -> .
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: error shift and go to state 145
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: cpar reduce using rule 5 (epsilon -> .)
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: args shift and go to state 146
+ yacc.py:2714: arg_list shift and go to state 148
+ yacc.py:2714: arg_list_empty shift and go to state 149
+ yacc.py:2714: expr shift and go to state 155
+ yacc.py:2714: epsilon shift and go to state 150
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 196
+ yacc.py:2563:
+ yacc.py:2565: (70) factor -> let let_list in expr .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: dot reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: star reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: div reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: plus reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: minus reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: less reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: lesseq reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: equal reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: semi reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: cpar reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: of reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: then reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: loop reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: comma reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: in reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: else reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: pool reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: ccur reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2687: fi reduce using rule 70 (factor -> let let_list in expr .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 197
+ yacc.py:2563:
+ yacc.py:2565: (37) let_list -> let_assign comma let_list .
+ yacc.py:2566:
+ yacc.py:2687: in reduce using rule 37 (let_list -> let_assign comma let_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 198
+ yacc.py:2563:
+ yacc.py:2565: (38) let_assign -> param larrow expr .
+ yacc.py:2566:
+ yacc.py:2687: comma reduce using rule 38 (let_assign -> param larrow expr .)
+ yacc.py:2687: in reduce using rule 38 (let_assign -> param larrow expr .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 199
+ yacc.py:2563:
+ yacc.py:2565: (71) factor -> case expr of cases_list . esac
+ yacc.py:2566:
+ yacc.py:2687: esac shift and go to state 214
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 200
+ yacc.py:2563:
+ yacc.py:2565: (40) cases_list -> casep . semi
+ yacc.py:2565: (41) cases_list -> casep . semi cases_list
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 215
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 201
+ yacc.py:2563:
+ yacc.py:2565: (42) cases_list -> error . cases_list
+ yacc.py:2565: (43) cases_list -> error . semi
+ yacc.py:2565: (40) cases_list -> . casep semi
+ yacc.py:2565: (41) cases_list -> . casep semi cases_list
+ yacc.py:2565: (42) cases_list -> . error cases_list
+ yacc.py:2565: (43) cases_list -> . error semi
+ yacc.py:2565: (44) casep -> . id colon type rarrow expr
+ yacc.py:2566:
+ yacc.py:2687: semi shift and go to state 217
+ yacc.py:2687: error shift and go to state 201
+ yacc.py:2687: id shift and go to state 202
+ yacc.py:2689:
+ yacc.py:2714: cases_list shift and go to state 216
+ yacc.py:2714: casep shift and go to state 200
+ yacc.py:2561:
+ yacc.py:2562:state 202
+ yacc.py:2563:
+ yacc.py:2565: (44) casep -> id . colon type rarrow expr
+ yacc.py:2566:
+ yacc.py:2687: colon shift and go to state 218
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 203
+ yacc.py:2563:
+ yacc.py:2565: (72) factor -> if expr then expr . else expr fi
+ yacc.py:2566:
+ yacc.py:2687: else shift and go to state 219
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 204
+ yacc.py:2563:
+ yacc.py:2565: (73) factor -> while expr loop expr . pool
+ yacc.py:2566:
+ yacc.py:2687: pool shift and go to state 220
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 205
+ yacc.py:2563:
+ yacc.py:2565: (26) def_func -> error opar formals cpar colon type ocur expr . ccur
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 221
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 206
+ yacc.py:2563:
+ yacc.py:2565: (25) def_func -> id opar formals cpar colon type ocur expr . ccur
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 222
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 207
+ yacc.py:2563:
+ yacc.py:2565: (29) def_func -> id opar formals cpar colon type ocur error . ccur
+ yacc.py:2565: (61) base_call -> error . arroba type dot func_call
+ yacc.py:2565: (78) atom -> error . block ccur
+ yacc.py:2565: (90) func_call -> error . opar args cpar
+ yacc.py:2565: (84) block -> . expr semi
+ yacc.py:2565: (85) block -> . expr semi block
+ yacc.py:2565: (86) block -> . error block
+ yacc.py:2565: (87) block -> . error semi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 223
+ yacc.py:2687: arroba shift and go to state 108
+ yacc.py:2687: opar shift and go to state 110
+ yacc.py:2687: error shift and go to state 107
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: block shift and go to state 109
+ yacc.py:2714: expr shift and go to state 111
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 208
+ yacc.py:2563:
+ yacc.py:2565: (28) def_func -> id opar formals cpar colon error ocur expr . ccur
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 224
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 209
+ yacc.py:2563:
+ yacc.py:2565: (27) def_func -> id opar error cpar colon type ocur expr . ccur
+ yacc.py:2566:
+ yacc.py:2687: ccur shift and go to state 225
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 210
+ yacc.py:2563:
+ yacc.py:2565: (61) base_call -> error arroba type dot func_call .
+ yacc.py:2566:
+ yacc.py:2687: star reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: div reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: plus reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: minus reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: less reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: lesseq reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: equal reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: semi reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: cpar reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: arroba reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: dot reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: of reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: then reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: loop reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: comma reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: in reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: else reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: pool reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: ccur reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2687: fi reduce using rule 61 (base_call -> error arroba type dot func_call .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 211
+ yacc.py:2563:
+ yacc.py:2565: (94) arg_list -> expr comma arg_list .
+ yacc.py:2566:
+ yacc.py:2687: cpar reduce using rule 94 (arg_list -> expr comma arg_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 212
+ yacc.py:2563:
+ yacc.py:2565: (59) base_call -> factor arroba type dot func_call .
+ yacc.py:2566:
+ yacc.py:2687: star reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: div reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: plus reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: minus reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: less reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: lesseq reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: equal reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: semi reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: cpar reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: arroba reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: dot reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: of reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: then reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: loop reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: comma reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: in reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: else reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: pool reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: ccur reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2687: fi reduce using rule 59 (base_call -> factor arroba type dot func_call .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 213
+ yacc.py:2563:
+ yacc.py:2565: (62) base_call -> factor arroba error dot func_call .
+ yacc.py:2566:
+ yacc.py:2687: star reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: div reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: plus reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: minus reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: less reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: lesseq reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: equal reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: semi reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: cpar reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: arroba reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: dot reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: of reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: then reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: loop reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: comma reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: in reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: else reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: pool reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: ccur reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2687: fi reduce using rule 62 (base_call -> factor arroba error dot func_call .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 214
+ yacc.py:2563:
+ yacc.py:2565: (71) factor -> case expr of cases_list esac .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: dot reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: star reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: div reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: plus reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: minus reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: less reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: lesseq reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: equal reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: semi reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: cpar reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: of reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: then reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: loop reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: comma reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: in reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: else reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: pool reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: ccur reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2687: fi reduce using rule 71 (factor -> case expr of cases_list esac .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 215
+ yacc.py:2563:
+ yacc.py:2565: (40) cases_list -> casep semi .
+ yacc.py:2565: (41) cases_list -> casep semi . cases_list
+ yacc.py:2565: (40) cases_list -> . casep semi
+ yacc.py:2565: (41) cases_list -> . casep semi cases_list
+ yacc.py:2565: (42) cases_list -> . error cases_list
+ yacc.py:2565: (43) cases_list -> . error semi
+ yacc.py:2565: (44) casep -> . id colon type rarrow expr
+ yacc.py:2566:
+ yacc.py:2687: esac reduce using rule 40 (cases_list -> casep semi .)
+ yacc.py:2687: error shift and go to state 201
+ yacc.py:2687: id shift and go to state 202
+ yacc.py:2689:
+ yacc.py:2714: casep shift and go to state 200
+ yacc.py:2714: cases_list shift and go to state 226
+ yacc.py:2561:
+ yacc.py:2562:state 216
+ yacc.py:2563:
+ yacc.py:2565: (42) cases_list -> error cases_list .
+ yacc.py:2566:
+ yacc.py:2687: esac reduce using rule 42 (cases_list -> error cases_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 217
+ yacc.py:2563:
+ yacc.py:2565: (43) cases_list -> error semi .
+ yacc.py:2566:
+ yacc.py:2687: esac reduce using rule 43 (cases_list -> error semi .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 218
+ yacc.py:2563:
+ yacc.py:2565: (44) casep -> id colon . type rarrow expr
+ yacc.py:2566:
+ yacc.py:2687: type shift and go to state 227
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 219
+ yacc.py:2563:
+ yacc.py:2565: (72) factor -> if expr then expr else . expr fi
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 228
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 220
+ yacc.py:2563:
+ yacc.py:2565: (73) factor -> while expr loop expr pool .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: dot reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: star reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: div reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: plus reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: minus reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: less reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: lesseq reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: equal reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: semi reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: cpar reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: of reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: then reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: loop reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: comma reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: in reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: else reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: pool reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: ccur reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2687: fi reduce using rule 73 (factor -> while expr loop expr pool .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 221
+ yacc.py:2563:
+ yacc.py:2565: (26) def_func -> error opar formals cpar colon type ocur expr ccur .
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 26 (def_func -> error opar formals cpar colon type ocur expr ccur .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 222
+ yacc.py:2563:
+ yacc.py:2565: (25) def_func -> id opar formals cpar colon type ocur expr ccur .
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 25 (def_func -> id opar formals cpar colon type ocur expr ccur .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 223
+ yacc.py:2563:
+ yacc.py:2565: (29) def_func -> id opar formals cpar colon type ocur error ccur .
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 29 (def_func -> id opar formals cpar colon type ocur error ccur .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 224
+ yacc.py:2563:
+ yacc.py:2565: (28) def_func -> id opar formals cpar colon error ocur expr ccur .
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 28 (def_func -> id opar formals cpar colon error ocur expr ccur .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 225
+ yacc.py:2563:
+ yacc.py:2565: (27) def_func -> id opar error cpar colon type ocur expr ccur .
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 27 (def_func -> id opar error cpar colon type ocur expr ccur .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 226
+ yacc.py:2563:
+ yacc.py:2565: (41) cases_list -> casep semi cases_list .
+ yacc.py:2566:
+ yacc.py:2687: esac reduce using rule 41 (cases_list -> casep semi cases_list .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 227
+ yacc.py:2563:
+ yacc.py:2565: (44) casep -> id colon type . rarrow expr
+ yacc.py:2566:
+ yacc.py:2687: rarrow shift and go to state 229
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 228
+ yacc.py:2563:
+ yacc.py:2565: (72) factor -> if expr then expr else expr . fi
+ yacc.py:2566:
+ yacc.py:2687: fi shift and go to state 230
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 229
+ yacc.py:2563:
+ yacc.py:2565: (44) casep -> id colon type rarrow . expr
+ yacc.py:2565: (45) expr -> . id larrow expr
+ yacc.py:2565: (46) expr -> . comp
+ yacc.py:2565: (47) comp -> . comp less op
+ yacc.py:2565: (48) comp -> . comp lesseq op
+ yacc.py:2565: (49) comp -> . comp equal op
+ yacc.py:2565: (50) comp -> . op
+ yacc.py:2565: (51) op -> . op plus term
+ yacc.py:2565: (52) op -> . op minus term
+ yacc.py:2565: (53) op -> . term
+ yacc.py:2565: (54) term -> . term star base_call
+ yacc.py:2565: (55) term -> . term div base_call
+ yacc.py:2565: (56) term -> . base_call
+ yacc.py:2565: (57) term -> . term star error
+ yacc.py:2565: (58) term -> . term div error
+ yacc.py:2565: (59) base_call -> . factor arroba type dot func_call
+ yacc.py:2565: (60) base_call -> . factor
+ yacc.py:2565: (61) base_call -> . error arroba type dot func_call
+ yacc.py:2565: (62) base_call -> . factor arroba error dot func_call
+ yacc.py:2565: (63) factor -> . atom
+ yacc.py:2565: (64) factor -> . opar expr cpar
+ yacc.py:2565: (65) factor -> . factor dot func_call
+ yacc.py:2565: (66) factor -> . not expr
+ yacc.py:2565: (67) factor -> . func_call
+ yacc.py:2565: (68) factor -> . isvoid base_call
+ yacc.py:2565: (69) factor -> . nox base_call
+ yacc.py:2565: (70) factor -> . let let_list in expr
+ yacc.py:2565: (71) factor -> . case expr of cases_list esac
+ yacc.py:2565: (72) factor -> . if expr then expr else expr fi
+ yacc.py:2565: (73) factor -> . while expr loop expr pool
+ yacc.py:2565: (74) atom -> . num
+ yacc.py:2565: (75) atom -> . id
+ yacc.py:2565: (76) atom -> . new type
+ yacc.py:2565: (77) atom -> . ocur block ccur
+ yacc.py:2565: (78) atom -> . error block ccur
+ yacc.py:2565: (79) atom -> . ocur error ccur
+ yacc.py:2565: (80) atom -> . ocur block error
+ yacc.py:2565: (81) atom -> . true
+ yacc.py:2565: (82) atom -> . false
+ yacc.py:2565: (83) atom -> . string
+ yacc.py:2565: (88) func_call -> . id opar args cpar
+ yacc.py:2565: (89) func_call -> . id opar error cpar
+ yacc.py:2565: (90) func_call -> . error opar args cpar
+ yacc.py:2566:
+ yacc.py:2687: id shift and go to state 72
+ yacc.py:2687: error shift and go to state 70
+ yacc.py:2687: opar shift and go to state 80
+ yacc.py:2687: not shift and go to state 81
+ yacc.py:2687: isvoid shift and go to state 82
+ yacc.py:2687: nox shift and go to state 83
+ yacc.py:2687: let shift and go to state 84
+ yacc.py:2687: case shift and go to state 85
+ yacc.py:2687: if shift and go to state 86
+ yacc.py:2687: while shift and go to state 87
+ yacc.py:2687: num shift and go to state 88
+ yacc.py:2687: new shift and go to state 89
+ yacc.py:2687: ocur shift and go to state 90
+ yacc.py:2687: true shift and go to state 91
+ yacc.py:2687: false shift and go to state 92
+ yacc.py:2687: string shift and go to state 93
+ yacc.py:2689:
+ yacc.py:2714: expr shift and go to state 231
+ yacc.py:2714: comp shift and go to state 73
+ yacc.py:2714: op shift and go to state 74
+ yacc.py:2714: term shift and go to state 75
+ yacc.py:2714: base_call shift and go to state 76
+ yacc.py:2714: factor shift and go to state 77
+ yacc.py:2714: func_call shift and go to state 78
+ yacc.py:2714: atom shift and go to state 79
+ yacc.py:2561:
+ yacc.py:2562:state 230
+ yacc.py:2563:
+ yacc.py:2565: (72) factor -> if expr then expr else expr fi .
+ yacc.py:2566:
+ yacc.py:2687: arroba reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: dot reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: star reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: div reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: plus reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: minus reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: less reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: lesseq reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: equal reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: semi reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: cpar reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: of reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: then reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: loop reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: comma reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: in reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: else reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: pool reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: ccur reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2687: fi reduce using rule 72 (factor -> if expr then expr else expr fi .)
+ yacc.py:2689:
+ yacc.py:2561:
+ yacc.py:2562:state 231
+ yacc.py:2563:
+ yacc.py:2565: (44) casep -> id colon type rarrow expr .
+ yacc.py:2566:
+ yacc.py:2687: semi reduce using rule 44 (casep -> id colon type rarrow expr .)
+ yacc.py:2689:
+ yacc.py:3447:24 shift/reduce conflicts
+ yacc.py:3457:
+ yacc.py:3458:Conflicts:
+ yacc.py:3459:
+ yacc.py:3462:shift/reduce conflict for less in state 73 resolved as shift
+ yacc.py:3462:shift/reduce conflict for lesseq in state 73 resolved as shift
+ yacc.py:3462:shift/reduce conflict for equal in state 73 resolved as shift
+ yacc.py:3462:shift/reduce conflict for plus in state 74 resolved as shift
+ yacc.py:3462:shift/reduce conflict for minus in state 74 resolved as shift
+ yacc.py:3462:shift/reduce conflict for star in state 75 resolved as shift
+ yacc.py:3462:shift/reduce conflict for div in state 75 resolved as shift
+ yacc.py:3462:shift/reduce conflict for arroba in state 77 resolved as shift
+ yacc.py:3462:shift/reduce conflict for dot in state 77 resolved as shift
+ yacc.py:3462:shift/reduce conflict for ccur in state 141 resolved as shift
+ yacc.py:3462:shift/reduce conflict for cpar in state 147 resolved as shift
+ yacc.py:3462:shift/reduce conflict for error in state 151 resolved as shift
+ yacc.py:3462:shift/reduce conflict for plus in state 156 resolved as shift
+ yacc.py:3462:shift/reduce conflict for minus in state 156 resolved as shift
+ yacc.py:3462:shift/reduce conflict for plus in state 157 resolved as shift
+ yacc.py:3462:shift/reduce conflict for minus in state 157 resolved as shift
+ yacc.py:3462:shift/reduce conflict for plus in state 158 resolved as shift
+ yacc.py:3462:shift/reduce conflict for minus in state 158 resolved as shift
+ yacc.py:3462:shift/reduce conflict for star in state 159 resolved as shift
+ yacc.py:3462:shift/reduce conflict for div in state 159 resolved as shift
+ yacc.py:3462:shift/reduce conflict for star in state 160 resolved as shift
+ yacc.py:3462:shift/reduce conflict for div in state 160 resolved as shift
+ yacc.py:3462:shift/reduce conflict for arroba in state 162 resolved as shift
+ yacc.py:3462:shift/reduce conflict for arroba in state 164 resolved as shift
+ yacc.py:3488:Couldn't create 'cool.parser.parsetab'. [Errno 2] No such file or directory: 'parser/output/parsetab.py'
+ yacc.py: 362:PLY: PARSE DEBUG START
+ yacc.py: 410:
+ yacc.py: 411:State : 0
+ yacc.py: 434:Stack : . LexToken(class,'class',1,0)
+ yacc.py: 445:Action : Shift and goto state 5
+ yacc.py: 410:
+ yacc.py: 411:State : 5
+ yacc.py: 434:Stack : class . LexToken(type,'Main',1,6)
+ yacc.py: 445:Action : Shift and goto state 8
+ yacc.py: 410:
+ yacc.py: 411:State : 8
+ yacc.py: 434:Stack : class type . LexToken(inherits,'inherits',1,11)
+ yacc.py: 445:Action : Shift and goto state 11
+ yacc.py: 410:
+ yacc.py: 411:State : 11
+ yacc.py: 434:Stack : class type inherits . LexToken(type,'IO',1,20)
+ yacc.py: 445:Action : Shift and goto state 20
+ yacc.py: 410:
+ yacc.py: 411:State : 20
+ yacc.py: 434:Stack : class type inherits type . LexToken(ocur,'{',1,23)
+ yacc.py: 445:Action : Shift and goto state 33
+ yacc.py: 410:
+ yacc.py: 411:State : 33
+ yacc.py: 434:Stack : class type inherits type ocur . LexToken(id,'main',2,28)
+ yacc.py: 445:Action : Shift and goto state 19
+ yacc.py: 410:
+ yacc.py: 411:State : 19
+ yacc.py: 434:Stack : class type inherits type ocur id . LexToken(opar,'(',2,32)
+ yacc.py: 445:Action : Shift and goto state 32
+ yacc.py: 410:
+ yacc.py: 411:State : 32
+ yacc.py: 434:Stack : class type inherits type ocur id opar . LexToken(cpar,')',2,33)
+ yacc.py: 473:Action : Reduce rule [epsilon -> ] with [] and goto state 45
+ yacc.py: 548:Result : (None)
+ yacc.py: 410:
+ yacc.py: 411:State : 45
+ yacc.py: 430:Defaulted state 45: Reduce using 34
+ yacc.py: 434:Stack : class type inherits type ocur id opar epsilon . LexToken(cpar,')',2,33)
+ yacc.py: 469:Action : Reduce rule [param_list_empty -> epsilon] with [None] and goto state 43
+ yacc.py: 506:Result : ([])
+ yacc.py: 410:
+ yacc.py: 411:State : 43
+ yacc.py: 430:Defaulted state 43: Reduce using 31
+ yacc.py: 434:Stack : class type inherits type ocur id opar param_list_empty . LexToken(cpar,')',2,33)
+ yacc.py: 469:Action : Reduce rule [formals -> param_list_empty] with [[]] and goto state 51
+ yacc.py: 506:Result : ([])
+ yacc.py: 410:
+ yacc.py: 411:State : 51
+ yacc.py: 434:Stack : class type inherits type ocur id opar formals . LexToken(cpar,')',2,33)
+ yacc.py: 445:Action : Shift and goto state 64
+ yacc.py: 410:
+ yacc.py: 411:State : 64
+ yacc.py: 434:Stack : class type inherits type ocur id opar formals cpar . LexToken(colon,':',2,34)
+ yacc.py: 445:Action : Shift and goto state 100
+ yacc.py: 410:
+ yacc.py: 411:State : 100
+ yacc.py: 434:Stack : class type inherits type ocur id opar formals cpar colon . LexToken(type,'IO',2,36)
+ yacc.py: 445:Action : Shift and goto state 138
+ yacc.py: 410:
+ yacc.py: 411:State : 138
+ yacc.py: 434:Stack : class type inherits type ocur id opar formals cpar colon type . LexToken(ocur,'{',2,39)
+ yacc.py: 445:Action : Shift and goto state 181
+ yacc.py: 410:
+ yacc.py: 411:State : 181
+ yacc.py: 434:Stack : class type inherits type ocur id opar formals cpar colon type ocur . LexToken(id,'out_string',3,42)
+ yacc.py: 445:Action : Shift and goto state 72
+ yacc.py: 410:
+ yacc.py: 411:State : 72
+ yacc.py: 434:Stack : class type inherits type ocur id opar formals cpar colon type ocur id . LexToken(opar,'(',3,52)
+ yacc.py: 445:Action : Shift and goto state 113
+ yacc.py: 410:
+ yacc.py: 411:State : 113
+ yacc.py: 434:Stack : class type inherits type ocur id opar formals cpar colon type ocur id opar . LexToken(string,'Hello, World.\n',3,69)
+ yacc.py: 445:Action : Shift and goto state 93
+ yacc.py: 410:
+ yacc.py: 411:State : 93
+ yacc.py: 434:Stack : class type inherits type ocur id opar formals cpar colon type ocur id opar string . LexToken(cpar,')',3,70)
+ yacc.py: 469:Action : Reduce rule [atom -> string] with [] and goto state 79
+ yacc.py: 506:Result : ( atom] with [] and goto state 77
+ yacc.py: 506:Result : ( factor] with [] and goto state 76
+ yacc.py: 506:Result : ( base_call] with [] and goto state 75
+ yacc.py: 506:Result : ( term] with [] and goto state 74
+ yacc.py: 506:Result : ( op] with [] and goto state 73
+ yacc.py: 506:Result : ( comp] with [] and goto state 155
+ yacc.py: 506:Result : ( expr] with [] and goto state 148
+ yacc.py: 506:Result : ([ arg_list] with [] and goto state 153
+ yacc.py: 506:Result : ([ id opar args cpar] with ['out_string','(',,')'] and goto state 78
+ yacc.py: 506:Result : ((LexToken(id,'out_string',3,42), [ func_call] with [] and goto state 77
+ yacc.py: 506:Result : ( factor] with [] and goto state 76
+ yacc.py: 506:Result : ( base_call] with [] and goto state 75
+ yacc.py: 506:Result : ( term] with [] and goto state 74
+ yacc.py: 506:Result : ( op] with [] and goto state 73
+ yacc.py: 506:Result : ( comp] with [] and goto state 206
+ yacc.py: 506:Result : ( id opar formals cpar colon type ocur expr ccur] with ['main','(',[],')',':','IO','{',,'}'] and goto state 18
+ yacc.py: 506:Result : (] with [] and goto state 16
+ yacc.py: 548:Result : (None)
+ yacc.py: 410:
+ yacc.py: 411:State : 16
+ yacc.py: 430:Defaulted state 16: Reduce using 14
+ yacc.py: 434:Stack : class type inherits type ocur def_func semi epsilon . LexToken(ccur,'}',5,78)
+ yacc.py: 469:Action : Reduce rule [feature_list -> epsilon] with [None] and goto state 48
+ yacc.py: 506:Result : ([])
+ yacc.py: 410:
+ yacc.py: 411:State : 48
+ yacc.py: 430:Defaulted state 48: Reduce using 16
+ yacc.py: 434:Stack : class type inherits type ocur def_func semi feature_list . LexToken(ccur,'}',5,78)
+ yacc.py: 469:Action : Reduce rule [feature_list -> def_func semi feature_list] with [,';',[]] and goto state 53
+ yacc.py: 506:Result : ([ class type inherits type ocur feature_list ccur semi] with ['class','Main','inherits','IO','{',,'}',';'] and goto state 3
+ yacc.py: 506:Result : ( def_class] with [] and goto state 2
+ yacc.py: 506:Result : ([ class_list] with [] and goto state 1
+ yacc.py: 506:Result : ( ( program","S'",1,None,None,None),
+ ('program -> class_list','program',1,'p_program','parser.py',30),
+ ('class_list -> def_class class_list','class_list',2,'p_class_list','parser.py',35),
+ ('class_list -> def_class','class_list',1,'p_class_list','parser.py',36),
+ ('class_list -> error class_list','class_list',2,'p_class_list_error','parser.py',41),
+ ('epsilon -> ','epsilon',0,'p_epsilon','parser.py',46),
+ ('def_class -> class type ocur feature_list ccur semi','def_class',6,'p_def_class','parser.py',50),
+ ('def_class -> class type inherits type ocur feature_list ccur semi','def_class',8,'p_def_class','parser.py',51),
+ ('def_class -> class error ocur feature_list ccur semi','def_class',6,'p_def_class_error','parser.py',57),
+ ('def_class -> class type ocur feature_list ccur error','def_class',6,'p_def_class_error','parser.py',58),
+ ('def_class -> class error inherits type ocur feature_list ccur semi','def_class',8,'p_def_class_error','parser.py',59),
+ ('def_class -> class error inherits error ocur feature_list ccur semi','def_class',8,'p_def_class_error','parser.py',60),
+ ('def_class -> class type inherits error ocur feature_list ccur semi','def_class',8,'p_def_class_error','parser.py',61),
+ ('def_class -> class type inherits type ocur feature_list ccur error','def_class',8,'p_def_class_error','parser.py',62),
+ ('feature_list -> epsilon','feature_list',1,'p_feature_list','parser.py',67),
+ ('feature_list -> def_attr semi feature_list','feature_list',3,'p_feature_list','parser.py',68),
+ ('feature_list -> def_func semi feature_list','feature_list',3,'p_feature_list','parser.py',69),
+ ('feature_list -> error feature_list','feature_list',2,'p_feature_list_error','parser.py',74),
+ ('def_attr -> id colon type','def_attr',3,'p_def_attr','parser.py',79),
+ ('def_attr -> id colon type larrow expr','def_attr',5,'p_def_attr','parser.py',80),
+ ('def_attr -> error colon type','def_attr',3,'p_def_attr_error','parser.py',86),
+ ('def_attr -> id colon error','def_attr',3,'p_def_attr_error','parser.py',87),
+ ('def_attr -> error colon type larrow expr','def_attr',5,'p_def_attr_error','parser.py',88),
+ ('def_attr -> id colon error larrow expr','def_attr',5,'p_def_attr_error','parser.py',89),
+ ('def_attr -> id colon type larrow error','def_attr',5,'p_def_attr_error','parser.py',90),
+ ('def_func -> id opar formals cpar colon type ocur expr ccur','def_func',9,'p_def_func','parser.py',95),
+ ('def_func -> error opar formals cpar colon type ocur expr ccur','def_func',9,'p_def_func_error','parser.py',100),
+ ('def_func -> id opar error cpar colon type ocur expr ccur','def_func',9,'p_def_func_error','parser.py',101),
+ ('def_func -> id opar formals cpar colon error ocur expr ccur','def_func',9,'p_def_func_error','parser.py',102),
+ ('def_func -> id opar formals cpar colon type ocur error ccur','def_func',9,'p_def_func_error','parser.py',103),
+ ('formals -> param_list','formals',1,'p_formals','parser.py',108),
+ ('formals -> param_list_empty','formals',1,'p_formals','parser.py',109),
+ ('param_list -> param','param_list',1,'p_param_list','parser.py',114),
+ ('param_list -> param comma param_list','param_list',3,'p_param_list','parser.py',115),
+ ('param_list_empty -> epsilon','param_list_empty',1,'p_param_list_empty','parser.py',120),
+ ('param -> id colon type','param',3,'p_param','parser.py',125),
+ ('let_list -> let_assign','let_list',1,'p_let_list','parser.py',130),
+ ('let_list -> let_assign comma let_list','let_list',3,'p_let_list','parser.py',131),
+ ('let_assign -> param larrow expr','let_assign',3,'p_let_assign','parser.py',136),
+ ('let_assign -> param','let_assign',1,'p_let_assign','parser.py',137),
+ ('cases_list -> casep semi','cases_list',2,'p_cases_list','parser.py',143),
+ ('cases_list -> casep semi cases_list','cases_list',3,'p_cases_list','parser.py',144),
+ ('cases_list -> error cases_list','cases_list',2,'p_cases_list_error','parser.py',149),
+ ('cases_list -> error semi','cases_list',2,'p_cases_list_error','parser.py',150),
+ ('casep -> id colon type rarrow expr','casep',5,'p_case','parser.py',155),
+ ('expr -> id larrow expr','expr',3,'p_expr','parser.py',160),
+ ('expr -> comp','expr',1,'p_expr','parser.py',161),
+ ('comp -> comp less op','comp',3,'p_comp','parser.py',166),
+ ('comp -> comp lesseq op','comp',3,'p_comp','parser.py',167),
+ ('comp -> comp equal op','comp',3,'p_comp','parser.py',168),
+ ('comp -> op','comp',1,'p_comp','parser.py',169),
+ ('op -> op plus term','op',3,'p_op','parser.py',181),
+ ('op -> op minus term','op',3,'p_op','parser.py',182),
+ ('op -> term','op',1,'p_op','parser.py',183),
+ ('term -> term star base_call','term',3,'p_term','parser.py',193),
+ ('term -> term div base_call','term',3,'p_term','parser.py',194),
+ ('term -> base_call','term',1,'p_term','parser.py',195),
+ ('term -> term star error','term',3,'p_term_error','parser.py',205),
+ ('term -> term div error','term',3,'p_term_error','parser.py',206),
+ ('base_call -> factor arroba type dot func_call','base_call',5,'p_base_call','parser.py',211),
+ ('base_call -> factor','base_call',1,'p_base_call','parser.py',212),
+ ('base_call -> error arroba type dot func_call','base_call',5,'p_base_call_error','parser.py',217),
+ ('base_call -> factor arroba error dot func_call','base_call',5,'p_base_call_error','parser.py',218),
+ ('factor -> atom','factor',1,'p_factor1','parser.py',223),
+ ('factor -> opar expr cpar','factor',3,'p_factor1','parser.py',224),
+ ('factor -> factor dot func_call','factor',3,'p_factor2','parser.py',229),
+ ('factor -> not expr','factor',2,'p_factor2','parser.py',230),
+ ('factor -> func_call','factor',1,'p_factor2','parser.py',231),
+ ('factor -> isvoid base_call','factor',2,'p_factor3','parser.py',241),
+ ('factor -> nox base_call','factor',2,'p_factor3','parser.py',242),
+ ('factor -> let let_list in expr','factor',4,'p_expr_let','parser.py',247),
+ ('factor -> case expr of cases_list esac','factor',5,'p_expr_case','parser.py',252),
+ ('factor -> if expr then expr else expr fi','factor',7,'p_expr_if','parser.py',257),
+ ('factor -> while expr loop expr pool','factor',5,'p_expr_while','parser.py',262),
+ ('atom -> num','atom',1,'p_atom_num','parser.py',267),
+ ('atom -> id','atom',1,'p_atom_id','parser.py',272),
+ ('atom -> new type','atom',2,'p_atom_new','parser.py',277),
+ ('atom -> ocur block ccur','atom',3,'p_atom_block','parser.py',282),
+ ('atom -> error block ccur','atom',3,'p_atom_block_error','parser.py',287),
+ ('atom -> ocur error ccur','atom',3,'p_atom_block_error','parser.py',288),
+ ('atom -> ocur block error','atom',3,'p_atom_block_error','parser.py',289),
+ ('atom -> true','atom',1,'p_atom_boolean','parser.py',294),
+ ('atom -> false','atom',1,'p_atom_boolean','parser.py',295),
+ ('atom -> string','atom',1,'p_atom_string','parser.py',300),
+ ('block -> expr semi','block',2,'p_block','parser.py',305),
+ ('block -> expr semi block','block',3,'p_block','parser.py',306),
+ ('block -> error block','block',2,'p_block_error','parser.py',311),
+ ('block -> error semi','block',2,'p_block_error','parser.py',312),
+ ('func_call -> id opar args cpar','func_call',4,'p_func_call','parser.py',317),
+ ('func_call -> id opar error cpar','func_call',4,'p_func_call_error','parser.py',322),
+ ('func_call -> error opar args cpar','func_call',4,'p_func_call_error','parser.py',323),
+ ('args -> arg_list','args',1,'p_args','parser.py',328),
+ ('args -> arg_list_empty','args',1,'p_args','parser.py',329),
+ ('arg_list -> expr','arg_list',1,'p_arg_list','parser.py',334),
+ ('arg_list -> expr comma arg_list','arg_list',3,'p_arg_list','parser.py',335),
+ ('arg_list -> error arg_list','arg_list',2,'p_arg_list_error','parser.py',341),
+ ('arg_list_empty -> epsilon','arg_list_empty',1,'p_arg_list_empty','parser.py',346),
+]
diff --git a/src/cool/parser/parser.py b/src/cool/parser/parser.py
new file mode 100644
index 000000000..a6e1d7f6b
--- /dev/null
+++ b/src/cool/parser/parser.py
@@ -0,0 +1,366 @@
+import ply.yacc as yacc
+
+from ..lexer.lexer import CoolLexer
+from ..utils.ast import *
+from ..utils.errors import SyntacticError
+from ..utils.helpers import find_column
+from ..utils.tokens import tokens
+from ..utils.logger import log
+
+
+class Parser:
+ def __init__(self, lexer=None):
+ self.lexer = lexer if lexer else CoolLexer()
+ self.outputdir = 'parser/output'
+ self.tokens = tokens
+ self.errors = False
+ self.parser = yacc.yacc(start='program',
+ module=self,
+ outputdir=self.outputdir,
+ optimize=1,
+ debuglog=log,
+ errorlog=log)
+
+ def parse(self, program, debug=False):
+ self.errors = False
+ return self.parser.parse(program, self.lexer.lexer, debug=log)
+
+
+class CoolParser(Parser):
+ def p_program(self, p):
+ 'program : class_list'
+
+ p[0] = ProgramNode(p[1])
+
+ def p_class_list(self, p):
+ '''class_list : def_class class_list
+ | def_class'''
+
+ p[0] = [p[1]] if len(p) == 2 else [p[1]] + p[2]
+
+ def p_class_list_error(self, p):
+ 'class_list : error class_list'
+
+ p[0] = [p[1]] if len(p) == 2 else [p[1]] + p[2]
+
+ def p_epsilon(self, p):
+ 'epsilon :'
+ pass
+
+ def p_def_class(self, p):
+ '''def_class : class type ocur feature_list ccur semi
+ | class type inherits type ocur feature_list ccur semi'''
+
+ p[0] = ClassDeclarationNode(p.slice[2], p[4]) if len(p) == 7 else \
+ ClassDeclarationNode(p.slice[2], p[6], p.slice[4])
+
+ def p_def_class_error(self, p):
+ '''def_class : class error ocur feature_list ccur semi
+ | class type ocur feature_list ccur error
+ | class error inherits type ocur feature_list ccur semi
+ | class error inherits error ocur feature_list ccur semi
+ | class type inherits error ocur feature_list ccur semi
+ | class type inherits type ocur feature_list ccur error'''
+
+ p[0] = ErrorNode()
+
+ def p_feature_list(self, p):
+ '''feature_list : epsilon
+ | def_attr semi feature_list
+ | def_func semi feature_list'''
+
+ p[0] = [] if len(p) == 2 else [p[1]] + p[3]
+
+ def p_feature_list_error(self, p):
+ 'feature_list : error feature_list'
+
+ p[0] = [p[1]] + p[2]
+
+ def p_def_attr(self, p):
+ '''def_attr : id colon type
+ | id colon type larrow expr'''
+
+ p[0] = AttrDeclarationNode(p.slice[1], p.slice[3]) if len(p) == 4 else \
+ AttrDeclarationNode(p.slice[1], p.slice[3], p[5])
+
+ def p_def_attr_error(self, p):
+ '''def_attr : error colon type
+ | id colon error
+ | error colon type larrow expr
+ | id colon error larrow expr
+ | id colon type larrow error'''
+
+ p[0] = ErrorNode()
+
+ def p_def_func(self, p):
+ 'def_func : id opar formals cpar colon type ocur expr ccur'
+
+ p[0] = FuncDeclarationNode(p.slice[1], p[3], p.slice[6], p[8])
+
+ def p_def_func_error(self, p):
+ '''def_func : error opar formals cpar colon type ocur expr ccur
+ | id opar error cpar colon type ocur expr ccur
+ | id opar formals cpar colon error ocur expr ccur
+ | id opar formals cpar colon type ocur error ccur'''
+
+ p[0] = ErrorNode()
+
+ def p_formals(self, p):
+ '''formals : param_list
+ | param_list_empty'''
+
+ p[0] = p[1]
+
+ def p_param_list(self, p):
+ '''param_list : param
+ | param comma param_list'''
+
+ p[0] = [p[1]] if len(p) == 2 else [p[1]] + p[3]
+
+ def p_param_list_empty(self, p):
+ 'param_list_empty : epsilon'
+
+ p[0] = []
+
+ def p_param(self, p):
+ 'param : id colon type'
+
+ p[0] = (p.slice[1], p.slice[3])
+
+ def p_let_list(self, p):
+ '''let_list : let_assign
+ | let_assign comma let_list'''
+
+ p[0] = [p[1]] if len(p) == 2 else [p[1]] + p[3]
+
+ def p_let_assign(self, p):
+ '''let_assign : param larrow expr
+ | param'''
+
+ p[0] = VarDeclarationNode(p[1][0], p[1][1]) if len(p) == 2 else \
+ VarDeclarationNode(p[1][0], p[1][1], p[3])
+
+ def p_cases_list(self, p):
+ '''cases_list : casep semi
+ | casep semi cases_list'''
+
+ p[0] = [p[1]] if len(p) == 3 else [p[1]] + p[3]
+
+ def p_cases_list_error(self, p):
+ '''cases_list : error cases_list
+ | error semi'''
+
+ p[0] = [ErrorNode()]
+
+ def p_case(self, p):
+ 'casep : id colon type rarrow expr'
+
+ p[0] = OptionNode(p.slice[1], p.slice[3], p[5])
+
+ def p_expr(self, p):
+ '''expr : id larrow expr
+ | comp'''
+
+ p[0] = AssignNode(p.slice[1], p[3]) if len(p) == 4 else p[1]
+
+ def p_comp(self, p):
+ '''comp : comp less op
+ | comp lesseq op
+ | comp equal op
+ | op'''
+
+ if len(p) == 2:
+ p[0] = p[1]
+ elif p[2] == '<':
+ p[0] = LessNode(p[1], p[3])
+ elif p[2] == '<=':
+ p[0] = LessEqNode(p[1], p[3])
+ elif p[2] == '=':
+ p[0] = EqualNode(p[1], p[3])
+
+ def p_op(self, p):
+ '''op : op plus term
+ | op minus term
+ | term'''
+
+ if len(p) == 2:
+ p[0] = p[1]
+ elif p[2] == '+':
+ p[0] = PlusNode(p[1], p[3])
+ elif p[2] == '-':
+ p[0] = MinusNode(p[1], p[3])
+
+ def p_term(self, p):
+ '''term : term star base_call
+ | term div base_call
+ | base_call'''
+
+ if len(p) == 2:
+ p[0] = p[1]
+ elif p[2] == '*':
+ p[0] = StarNode(p[1], p[3])
+ elif p[2] == '/':
+ p[0] = DivNode(p[1], p[3])
+
+ def p_term_error(self, p):
+ '''term : term star error
+ | term div error'''
+
+ p[0] = ErrorNode()
+
+ def p_base_call(self, p):
+ '''base_call : factor arroba type dot func_call
+ | factor'''
+
+ p[0] = p[1] if len(p) == 2 else BaseCallNode(p[1], p.slice[3], *p[5])
+
+ def p_base_call_error(self, p):
+ '''base_call : error arroba type dot func_call
+ | factor arroba error dot func_call'''
+
+ p[0] = ErrorNode()
+
+ def p_factor1(self, p):
+ '''factor : atom
+ | opar expr cpar'''
+
+ p[0] = p[1] if len(p) == 2 else p[2]
+
+ def p_factor2(self, p):
+ '''factor : factor dot func_call
+ | not expr
+ | func_call'''
+
+ if len(p) == 2:
+ p[0] = StaticCallNode(*p[1])
+ elif p[1] == 'not':
+ p[0] = NotNode(p[2], p.slice[1])
+ else:
+ p[0] = CallNode(p[1], *p[3])
+
+ def p_factor3(self, p):
+ '''factor : isvoid base_call
+ | nox base_call'''
+
+ p[0] = IsVoidNode(p[2], p.slice[1]) if p[1] == 'isvoid' else BinaryNotNode(p[2], p.slice[1])
+
+ def p_expr_let(self, p):
+ 'factor : let let_list in expr'
+
+ p[0] = LetNode(p[2], p[4], p.slice[1])
+
+ def p_expr_case(self, p):
+ 'factor : case expr of cases_list esac'
+
+ p[0] = CaseNode(p[2], p[4], p.slice[1])
+
+ def p_expr_if(self, p):
+ 'factor : if expr then expr else expr fi'
+
+ p[0] = ConditionalNode(p[2], p[4], p[6], p.slice[1])
+
+ def p_expr_while(self, p):
+ 'factor : while expr loop expr pool'
+
+ p[0] = WhileNode(p[2], p[4], p.slice[1])
+
+ def p_atom_num(self, p):
+ 'atom : num'
+
+ p[0] = ConstantNumNode(p.slice[1])
+
+ def p_atom_id(self, p):
+ 'atom : id'
+
+ p[0] = VariableNode(p.slice[1])
+
+ def p_atom_new(self, p):
+ 'atom : new type'
+
+ p[0] = InstantiateNode(p.slice[2])
+
+ def p_atom_block(self, p):
+ 'atom : ocur block ccur'
+
+ p[0] = BlockNode(p[2], p.slice[1])
+
+ def p_atom_block_error(self, p):
+ '''atom : error block ccur
+ | ocur error ccur
+ | ocur block error'''
+
+ p[0] = ErrorNode()
+
+ def p_atom_boolean(self, p):
+ '''atom : true
+ | false'''
+
+ p[0] = ConstantBoolNode(p.slice[1])
+
+ def p_atom_string(self, p):
+ 'atom : string'
+
+ p[0] = ConstantStrNode(p.slice[1])
+
+ def p_block(self, p):
+ '''block : expr semi
+ | expr semi block'''
+
+ p[0] = [p[1]] if len(p) == 3 else [p[1]] + p[3]
+
+ def p_block_error(self, p):
+ '''block : error block
+ | error semi'''
+
+ p[0] = [ErrorNode()]
+
+ def p_func_call(self, p):
+ 'func_call : id opar args cpar'
+
+ p[0] = (p.slice[1], p[3])
+
+ def p_func_call_error(self, p):
+ '''func_call : id opar error cpar
+ | error opar args cpar'''
+
+ p[0] = (ErrorNode(), ErrorNode())
+
+ def p_args(self, p):
+ '''args : arg_list
+ | arg_list_empty'''
+
+ p[0] = p[1]
+
+ def p_arg_list(self, p):
+ '''arg_list : expr
+ | expr comma arg_list'''
+
+ p[0] = [p[1]] if len(p) == 2 else \
+ [p[1]] + p[3]
+
+ def p_arg_list_error(self, p):
+ 'arg_list : error arg_list'
+
+ p[0] = [ErrorNode()]
+
+ def p_arg_list_empty(self, p):
+ 'arg_list_empty : epsilon'
+
+ p[0] = []
+
+ def p_error(self, p):
+ self.errors = True
+ if p:
+ self.print_error(p)
+ else:
+ error_text = SyntacticError.ERROR % 'EOF'
+ column = find_column(self.lexer.lexer, self.lexer.lexer)
+ line = self.lexer.lexer.lineno
+ print(SyntacticError(error_text, line, column - 1))
+
+ raise Exception()
+
+ def print_error(self, tok):
+ error_text = SyntacticError.ERROR % tok.value
+ line, column = tok.lineno, tok.column
+ print(SyntacticError(error_text, line, column))
diff --git a/src/cool/semantic/__init__.py b/src/cool/semantic/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/cool/semantic/__main__.py b/src/cool/semantic/__main__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/cool/semantic/collectVariables.py b/src/cool/semantic/collectVariables.py
new file mode 100644
index 000000000..b35bcac29
--- /dev/null
+++ b/src/cool/semantic/collectVariables.py
@@ -0,0 +1,227 @@
+from .helpers import Context, Scope
+from .types import *
+from ..utils import visitor
+from ..utils.ast import *
+
+
+class VariableCollector:
+ def __init__(self, context: Context, errors=[]):
+ self.context: Context = context
+ self.current_type: Type = None
+ self.current_method: Method = None
+ self.errors = errors
+ self.current_index = None
+
+ @visitor.on('node')
+ def visit(self, node, scope):
+ pass
+
+ @visitor.when(ProgramNode)
+ def visit(self, node: ProgramNode, scope: Scope = None):
+ scope = Scope()
+
+ for declaration in node.declarations:
+ self.visit(declaration, scope.create_child())
+
+ return scope
+
+ def copy_scope(self, scope: Scope, parent: Type):
+ if parent is None:
+ return
+ for attr in parent.attributes.values():
+ if scope.find_variable(attr.name) is None:
+ scope.define_attribute(attr)
+ self.copy_scope(scope, parent.parent)
+
+ @visitor.when(ClassDeclarationNode)
+ def visit(self, node: ClassDeclarationNode, scope: Scope):
+ self.current_type = self._get_type(node.id, node.pos)
+ scope.define_variable('self', self.current_type)
+
+ for feat in node.features:
+ if isinstance(feat, AttrDeclarationNode):
+ self.visit(feat, scope)
+
+ for attr, _ in self.current_type.all_attributes():
+ if scope.find_attribute(attr.name) is None:
+ scope.define_attribute(attr)
+
+ for feat in node.features:
+ if isinstance(feat, FuncDeclarationNode):
+ self.visit(feat, scope)
+
+ def _set_default_value(self, _type, node):
+ if _type == IntType():
+ node.expr = ConstantNumNode(0)
+ elif _type == StringType():
+ node.expr = ConstantStrNode("")
+ elif _type == BoolType():
+ node.expr = ConstantBoolNode('false')
+ else:
+ node.expr = ConstantVoidNode(node.id)
+
+ @visitor.when(AttrDeclarationNode)
+ def visit(self, node: AttrDeclarationNode, scope: Scope):
+ attr = self.current_type.get_attribute(node.id, node.pos)
+ if node.expr is None:
+ self._set_default_value(attr.type, node)
+ else:
+ self.visit(node.expr, scope)
+ attr.expr = node.expr
+ scope.define_attribute(attr)
+
+ @visitor.when(FuncDeclarationNode)
+ def visit(self, node: FuncDeclarationNode, scope: Scope):
+ parent = self.current_type.parent
+
+ pnames = [param[0] for param in node.params]
+ ptypes = [param[1] for param in node.params]
+
+ self.current_method = self.current_type.get_method(node.id, node.pos)
+
+ new_scope = scope.create_child()
+ scope.functions[node.id] = new_scope
+
+ for pname, ptype in node.params:
+ if pname == 'self':
+ self.errors.append(SemanticError(SemanticError.SELF_PARAM, *ptype.pos))
+ new_scope.define_variable(pname, self._get_type(ptype.value, ptype.pos))
+
+ self.visit(node.body, new_scope)
+
+ def _get_type(self, ntype, pos):
+ try:
+ return self.context.get_type(ntype, pos)
+ except SemanticError as e:
+ self.errors.append(e)
+ return ErrorType()
+
+ @visitor.when(VarDeclarationNode)
+ def visit(self, node: VarDeclarationNode, scope: Scope):
+ if node.id == 'self':
+ error_text = SemanticError.SELF_IN_LET
+ self.errors.append(SemanticError(error_text, *node.pos))
+ return
+
+ try:
+ vtype = self.context.get_type(node.type, node.pos)
+ except SemanticError:
+ error_text = TypesError.UNDEFINED_TYPE_LET % (node.type, node.id)
+ self.errors.append(TypesError(error_text, *node.type_pos))
+ vtype = ErrorType()
+
+ vtype = self._get_type(node.type, node.type_pos)
+ var_info = scope.define_variable(node.id, vtype)
+
+ if node.expr is not None:
+ self.visit(node.expr, scope)
+ else:
+ self._set_default_value(vtype, node)
+
+ @visitor.when(AssignNode)
+ def visit(self, node: AssignNode, scope: Scope):
+ if node.id == 'self':
+ error_text = SemanticError.SELF_IS_READONLY
+ self.errors.append(SemanticError(error_text, *node.pos))
+ return
+
+ vinfo = scope.find_variable(node.id)
+ if vinfo is None:
+ var_info = scope.find_attribute(node.id)
+ if var_info is None:
+ error_text = NamesError.VARIABLE_NOT_DEFINED % (node.id)
+ self.errors.append(NamesError(error_text, *node.pos))
+ vtype = ErrorType()
+ scope.define_variable(node.id, vtype)
+
+ self.visit(node.expr, scope)
+
+ @visitor.when(BlockNode)
+ def visit(self, node: BlockNode, scope: Scope):
+ for exp in node.expr_list:
+ self.visit(exp, scope)
+
+ @visitor.when(LetNode)
+ def visit(self, node: LetNode, scope: Scope):
+ n_scope = scope.create_child()
+ scope.expr_dict[node] = n_scope
+ for init in node.init_list:
+ self.visit(init, n_scope)
+
+ self.visit(node.expr, n_scope)
+
+ @visitor.when(BinaryNode)
+ def visit(self, node: BinaryNode, scope: Scope):
+ self.visit(node.left, scope)
+ self.visit(node.right, scope)
+
+ @visitor.when(UnaryNode)
+ def visit(self, node: UnaryNode, scope: Scope):
+ self.visit(node.expr, scope)
+
+ @visitor.when(VariableNode)
+ def visit(self, node: VariableNode, scope: Scope):
+ try:
+ return self.current_type.get_attribute(node.lex, node.pos).type
+ except AttributesError:
+ if not scope.is_defined(node.lex):
+ error_text = NamesError.VARIABLE_NOT_DEFINED % (node.lex)
+ self.errors.append(NamesError(error_text, *node.pos))
+ vinfo = scope.define_variable(node.lex, ErrorType(node.pos))
+ else:
+ vinfo = scope.find_variable(node.lex)
+ return vinfo.type
+
+ @visitor.when(WhileNode)
+ def visit(self, node: WhileNode, scope: Scope):
+ self.visit(node.cond, scope)
+ self.visit(node.expr, scope)
+
+ @visitor.when(ConditionalNode)
+ def visit(self, node: ConditionalNode, scope: Scope):
+ self.visit(node.cond, scope)
+ self.visit(node.stm, scope)
+ self.visit(node.else_stm, scope)
+
+ @visitor.when(IsVoidNode)
+ def visit(self, node: IsVoidNode, scope: Scope):
+ self.visit(node.expr, scope)
+
+ @visitor.when(CallNode)
+ def visit(self, node: CallNode, scope: Scope):
+ self.visit(node.obj, scope)
+ for arg in node.args:
+ self.visit(arg, scope)
+
+ @visitor.when(BaseCallNode)
+ def visit(self, node: BaseCallNode, scope: Scope):
+ self.visit(node.obj, scope)
+ for arg in node.args:
+ self.visit(arg, scope)
+
+ @visitor.when(StaticCallNode)
+ def visit(self, node: StaticCallNode, scope: Scope):
+ for arg in node.args:
+ self.visit(arg, scope)
+
+ @visitor.when(CaseNode)
+ def visit(self, node: CaseNode, scope: Scope):
+ self.visit(node.expr, scope)
+
+ new_scp = scope.create_child()
+ scope.expr_dict[node] = new_scp
+
+ for case in node.case_list:
+ self.visit(case, new_scp.create_child())
+
+ @visitor.when(OptionNode)
+ def visit(self, node: OptionNode, scope: Scope):
+ try:
+ typex = self.context.get_type(node.typex, node.type_pos)
+ except TypesError:
+ error_txt = TypesError.CLASS_CASE_BRANCH_UNDEFINED % node.typex
+ self.errors.append(TypesError(error_txt, *node.type_pos))
+ typex = ErrorType()
+
+ scope.define_variable(node.id, typex)
+ self.visit(node.expr, scope)
diff --git a/src/cool/semantic/helpers.py b/src/cool/semantic/helpers.py
new file mode 100644
index 000000000..1faf6ccf0
--- /dev/null
+++ b/src/cool/semantic/helpers.py
@@ -0,0 +1,141 @@
+from ..utils.errors import SemanticError, AttributesError, TypesError, NamesError
+import itertools as itt
+from .types import Type
+
+
+class Context:
+ def __init__(self):
+ self.types = {}
+
+ def get_depth(self, class_name):
+ typex = self.types[class_name]
+ if typex.parent is None:
+ return 0
+ return 1 + self.get_depth(typex.parent.name)
+
+ def build_inheritance_graph(self):
+ graph = {}
+ for type_name, typex in self.types.items():
+ if typex.parent is not None:
+ graph[type_name] = typex.parent.name
+ else:
+ if type_name == 'SELF_TYPE':
+ continue
+ graph[type_name] = None
+ return graph
+
+ def create_type(self, name: str, pos) -> Type:
+ if name in self.types:
+ error_text = SemanticError.TYPE_ALREADY_DEFINED
+ raise SemanticError(error_text, *pos)
+ typex = self.types[name] = Type(name, pos)
+ return typex
+
+ def get_type(self, name: str, pos) -> Type:
+ try:
+ return self.types[name]
+ except KeyError:
+ error_text = TypesError.TYPE_NOT_DEFINED % name
+ raise TypesError(error_text, *pos)
+
+ def __str__(self):
+ return '{\n\t' + '\n\t'.join(y for x in self.types.values() for y in str(x).split('\n')) + '\n}'
+
+ def __repr__(self):
+ return str(self)
+
+
+class VariableInfo:
+ def __init__(self, name, vtype, index=None):
+ self.name = name
+ self.type = vtype
+ self.index = index # saves the index in the scope of the variable
+
+ def __str__(self):
+ return f'{self.name} : {self.type.name}'
+
+ def __repr__(self):
+ return str(self)
+
+
+class Scope:
+ def __init__(self, parent=None):
+ self.locals = []
+ self.attributes = []
+ self.parent = parent
+ self.children = []
+ self.expr_dict = {}
+ self.functions = {}
+ self.index = 0 if parent is None else len(parent)
+
+ def __len__(self):
+ return len(self.locals)
+
+ def __str__(self):
+ res = ''
+ for scope in self.children:
+ try:
+ classx = scope.locals[0]
+ name = classx.type.name
+ except:
+ name = '1'
+ res += name + scope.tab_level(1, '', 1)
+ return res
+
+ def tab_level(self, tabs, name, num) -> str:
+ res = ('\t' * tabs) + ('\n' + ('\t' * tabs)).join(str(local) for local in self.locals)
+ if self.functions:
+ children = '\n'.join(v.tab_level(tabs + 1, '[method] ' + k, num) for k, v in self.functions.items())
+ else:
+ children = '\n'.join(child.tab_level(tabs + 1, num, num + 1) for child in self.children)
+ return "\t" * (tabs - 1) + f'{name}' + "\t" * tabs + f'\n{res}\n{children}'
+
+ def __repr__(self):
+ return str(self)
+
+ def create_child(self):
+ child = Scope(self)
+ self.children.append(child)
+ return child
+
+ def define_variable(self, vname, vtype) -> VariableInfo:
+ info = VariableInfo(vname, vtype)
+ if info not in self.locals:
+ self.locals.append(info)
+ return info
+
+ def find_variable(self, vname, index=None) -> VariableInfo:
+ locals = self.attributes + self.locals
+ locals = locals if index is None else itt.islice(locals, index)
+ try:
+ return next(x for x in locals if x.name == vname)
+ except StopIteration:
+ return self.parent.find_variable(vname, index) if self.parent is not None else None
+
+ def find_local(self, vname, index=None) -> VariableInfo:
+ locals = self.locals if index is None else itt.islice(self.locals, index)
+ try:
+ return next(x for x in locals if x.name == vname)
+ except StopIteration:
+ return self.parent.find_local(vname, self.index) if self.parent is not None else None
+
+ def find_attribute(self, vname, index=None):
+ locals = self.attributes if index is None else itt.islice(self.attributes, index)
+ try:
+ return next(x for x in locals if x.name == vname)
+ except StopIteration:
+ return self.parent.find_attribute(vname, index) if self.parent is not None else None
+
+ def get_class_scope(self):
+ if self.parent == None or self.parent.parent == None:
+ return self
+ return self.parent.get_class_scope()
+
+ def is_defined(self, vname) -> VariableInfo:
+ return self.find_variable(vname) is not None
+
+ def is_local(self, vname):
+ return any(True for x in self.locals if x.name == vname)
+
+ def define_attribute(self, attr):
+ self.attributes.append(attr)
diff --git a/src/cool/semantic/semantic.py b/src/cool/semantic/semantic.py
new file mode 100644
index 000000000..5a8417089
--- /dev/null
+++ b/src/cool/semantic/semantic.py
@@ -0,0 +1,50 @@
+from .typeCollector import TypeCollector
+from .typeChecker import TypeChecker
+from .typeBuilder import TypeBuilder
+from .collectVariables import VariableCollector
+
+
+def main_semantic(ast, debug=False):
+ if debug:
+ print('============== COLLECTING TYPES ===============')
+ errors = []
+ collector = TypeCollector(errors)
+ collector.visit(ast)
+ context = collector.context
+ if debug:
+ print('Errors: [')
+ for error in errors:
+ print('\t', error)
+ print('=============== BUILDING TYPES ================')
+ builder = TypeBuilder(context, errors)
+ builder.visit(ast)
+ if debug:
+ print('Errors: [')
+ for error in errors:
+ print('\t', error)
+ print(']')
+ print('=============== VAR COLLECTOR ================')
+ checker = VariableCollector(context, errors)
+ scope = checker.visit(ast)
+ if debug:
+ print('Errors: [')
+ for error in errors:
+ print('\t', error)
+ print(']')
+ print('=============== CHECKING TYPES ================')
+ checker = TypeChecker(context, errors)
+ checker.visit(ast, scope)
+ if debug:
+ print('Errors: [')
+ for error in errors:
+ print('\t', error)
+ print(']')
+ print('Context:')
+ print(context)
+ print('Scope:')
+ print(scope)
+ return ast, errors, context, scope
+
+
+if __name__ == "__main__":
+ pass
diff --git a/src/cool/semantic/typeBuilder.py b/src/cool/semantic/typeBuilder.py
new file mode 100644
index 000000000..d234d96e7
--- /dev/null
+++ b/src/cool/semantic/typeBuilder.py
@@ -0,0 +1,106 @@
+from ..utils.ast import *
+from ..utils import visitor
+from .helpers import *
+from .types import *
+from typing import List
+
+
+class TypeBuilder:
+ def __init__(self, context: Context, errors=[]):
+ self.context: Context = context
+ self.errors: List = errors
+ self.current_type: Type = None
+
+ @visitor.on('node')
+ def visit(self, node):
+ pass
+
+ @visitor.when(ProgramNode)
+ def visit(self, node: ProgramNode):
+ for d in node.declarations:
+ self.visit(d)
+
+ @visitor.when(ClassDeclarationNode)
+ def visit(self, node: ClassDeclarationNode):
+ try:
+ self.current_type = self.context.get_type(node.id, node.pos)
+ except SemanticError as e:
+ self.current_type = ErrorType()
+ self.errors.append(e)
+
+ if node.parent is not None:
+ if node.parent in ['Int', 'Bool', 'String']:
+ error_text = SemanticError.INHERIT_ERROR % (node.id, node.parent)
+ self.errors.append(SemanticError(error_text, *node.parent_pos))
+
+ try:
+ parent = self.context.get_type(node.parent, node.parent_pos)
+ except SemanticError:
+ error_text = TypesError.INHERIT_UNDEFINED % (node.id, node.parent)
+ self.errors.append(TypesError(error_text, *node.parent_pos))
+ parent = None
+
+ try:
+ current = parent
+ while current is not None:
+ if current.name == self.current_type.name:
+ error_text = SemanticError.CIRCULAR_DEPENDENCY % (
+ self.current_type.name, self.current_type.name)
+
+ raise SemanticError(error_text, *node.pos)
+ current = current.parent
+ except SemanticError as e:
+ parent = ErrorType()
+ self.errors.append(e)
+
+ self.current_type.set_parent(parent)
+
+ for f in node.features:
+ self.visit(f)
+
+ @visitor.when(FuncDeclarationNode)
+ def visit(self, node: FuncDeclarationNode):
+ args_names = []
+ args_types = []
+ for name, type_ in node.params:
+ if name in args_names:
+ error_text = SemanticError.PARAMETER_MULTY_DEFINED % name
+ self.errors.append(SemanticError(error_text, *type_.pos))
+ args_names.append(name)
+
+ try:
+ arg_type = self.context.get_type(type_.value, type_.pos)
+ except SemanticError:
+ error_text = TypesError.PARAMETER_UNDEFINED % (type_.value, type_.value)
+ self.errors.append(TypesError(error_text, *type_.pos))
+ arg_type = ErrorType()
+ args_types.append(arg_type)
+
+ try:
+ return_type = self.context.get_type(node.type, node.type_pos)
+ except SemanticError as e:
+ error_text = TypesError.RETURN_TYPE_UNDEFINED % (node.type, node.id)
+ self.errors.append(TypesError(error_text, *node.type_pos))
+ return_type = ErrorType(node.type_pos)
+
+ try:
+ self.current_type.define_method(node.id, args_names, args_types, return_type, node.pos)
+ except SemanticError as e:
+ self.errors.append(e)
+
+ @visitor.when(AttrDeclarationNode)
+ def visit(self, node: AttrDeclarationNode):
+ try:
+ attr_type = self.context.get_type(node.type, node.pos)
+ except SemanticError as e:
+ error_text = TypesError.ATTR_TYPE_UNDEFINED % (node.type, node.id)
+ attr_type = ErrorType(node.type_pos)
+ self.errors.append(TypesError(error_text, *node.type_pos))
+
+ if node.id == 'self':
+ self.errors.append(SemanticError(SemanticError.SELF_ATTR, *node.pos))
+
+ try:
+ self.current_type.define_attribute(node.id, attr_type, node.pos)
+ except SemanticError as e:
+ self.errors.append(e)
diff --git a/src/cool/semantic/typeChecker.py b/src/cool/semantic/typeChecker.py
new file mode 100644
index 000000000..a7fc1ca34
--- /dev/null
+++ b/src/cool/semantic/typeChecker.py
@@ -0,0 +1,356 @@
+from .helpers import *
+from .types import *
+from ..utils import *
+
+
+class TypeChecker:
+ def __init__(self, context: Context, errors=[]):
+ self.context: Context = context
+ self.current_type: Type = None
+ self.current_method: Method = None
+ self.errors = errors
+ self.current_index = None
+
+ @visitor.on('node')
+ def visit(self, node, scope):
+ pass
+
+ @visitor.when(ProgramNode)
+ def visit(self, node: ProgramNode, scope: Scope):
+ for d, new_scope in zip(node.declarations, scope.children):
+ self.visit(d, new_scope)
+
+ @visitor.when(ClassDeclarationNode)
+ def visit(self, node: ClassDeclarationNode, scope: Scope):
+ self.current_type = self.context.get_type(node.id, node.pos)
+
+ for f in node.features:
+ if isinstance(f, AttrDeclarationNode):
+ self.visit(f, scope)
+
+ for f, child_scope in zip([ft for ft in node.features if isinstance(ft, FuncDeclarationNode)],
+ scope.functions.values()):
+ self.visit(f, child_scope)
+
+ @visitor.when(AttrDeclarationNode)
+ def visit(self, node: AttrDeclarationNode, scope: Scope):
+ attr = self.current_type.get_attribute(node.id, node.pos)
+ attr_type = get_type(attr.type, self.current_type)
+
+ self.current_index = attr.index
+ _type = self.visit(node.expr, scope)
+ self.current_index = None
+
+ if not _type.conforms_to(attr_type):
+ error_text = TypesError.ATTR_TYPE_ERROR % (_type.name, attr.name, attr_type.name)
+ self.errors.append(TypesError(error_text, *node.pos))
+ return ErrorType()
+
+ return _type
+
+ @visitor.when(FuncDeclarationNode)
+ def visit(self, node: FuncDeclarationNode, scope: Scope):
+ parent = self.current_type.parent
+
+ self.current_method = c_m = self.current_type.get_method(node.id, node.pos)
+
+ if parent is not None:
+ try:
+ old_meth = parent.get_method(node.id, node.pos)
+ if old_meth.return_type.name != c_m.return_type.name:
+ error_text = SemanticError.WRONG_SIGNATURE_RETURN % (
+ node.id, c_m.return_type.name, old_meth.return_type.name)
+ self.errors.append(SemanticError(error_text, *node.type_pos))
+ if len(c_m.param_names) != len(old_meth.param_names):
+ error_text = SemanticError.WRONG_NUMBER_PARAM % node.id
+ self.errors.append(SemanticError(error_text, *node.pos))
+ for (name, param), type1, type2 in zip(node.params, c_m.param_types, old_meth.param_types):
+ if type1.name != type2.name:
+ error_text = SemanticError.WRONG_SIGNATURE_PARAMETER % (name, type1.name, type2.name)
+ self.errors.append(SemanticError(error_text, *param.pos))
+ except SemanticError:
+ pass
+
+ ans = self.visit(node.body, scope)
+ return_type = get_type(c_m.return_type, self.current_type)
+
+ if not ans.conforms_to(return_type):
+ error_text = TypesError.RETURN_TYPE_ERROR % (ans.name, return_type.name)
+ self.errors.append(TypesError(error_text, *node.type_pos))
+
+ @visitor.when(VarDeclarationNode)
+ def visit(self, node: VarDeclarationNode, scope: Scope):
+ _type = get_type(self._get_type(node.type, node.type_pos), self.current_type)
+
+ if node.expr is not None:
+ _n_type = self.visit(node.expr, scope)
+ if not _n_type.conforms_to(_type):
+ error_text = TypesError.UNCONFORMS_TYPE % (_type.name, node.id, _type.name)
+ self.errors.append(TypesError(error_text, *node.type_pos))
+ return _n_type
+
+ return _type
+
+ @visitor.when(AssignNode)
+ def visit(self, node: AssignNode, scope: Scope):
+ _info = self.find_variable(scope, node.id)
+ _type = get_type(_info.type, self.current_type)
+
+ n_type = self.visit(node.expr, scope)
+
+ if not n_type.conforms_to(_type):
+ error_text = TypesError.UNCONFORMS_TYPE % (n_type.name, node.id, _type.name)
+ self.errors.append(TypesError(error_text, *node.pos))
+ return n_type
+
+ @visitor.when(CallNode)
+ def visit(self, node: CallNode, scope: Scope):
+ _type = self.visit(node.obj, scope)
+
+ try:
+ method = _type.get_method(node.id, node.pos)
+ except SemanticError as e:
+ if type(_type) != ErrorType and type(_type) != AutoType:
+ error_text = AttributesError.DISPATCH_UNDEFINED % node.id
+ self.errors.append(AttributesError(error_text, *node.pos))
+ method = MethodError(node.id, [], [], ErrorType())
+
+ if not isinstance(method, MethodError):
+ self._validate_args(method, scope, node.args, node.pos)
+
+ return get_type(method.return_type, _type)
+
+ @visitor.when(BaseCallNode)
+ def visit(self, node: BaseCallNode, scope: Scope):
+ obj = self.visit(node.obj, scope)
+ _type = self._get_type(node.type, node.type_pos)
+
+ if not obj.conforms_to(_type):
+ error_text = TypesError.INCOMPATIBLE_TYPES_DISPATCH % (_type.name, obj.name)
+ self.errors.append(TypesError(error_text, *node.type_pos))
+ return ErrorType()
+
+ method = self._get_method(_type, node.id, node.pos)
+ if not isinstance(method, MethodError):
+ self._validate_args(method, scope, node.args, node.pos)
+
+ return get_type(method.return_type, _type)
+
+ @visitor.when(StaticCallNode)
+ def visit(self, node: StaticCallNode, scope: Scope):
+ _type = self.current_type
+
+ method = self._get_method(_type, node.id, node.pos)
+ if not isinstance(method, MethodError):
+ self._validate_args(method, scope, node.args, node.pos)
+
+ return get_type(method.return_type, _type)
+
+ @visitor.when(ConstantNumNode)
+ def visit(self, node: ConstantNumNode, scope: Scope):
+ return IntType(node.pos)
+
+ @visitor.when(ConstantBoolNode)
+ def visit(self, node: ConstantBoolNode, scope: Scope):
+ return BoolType(node.pos)
+
+ @visitor.when(ConstantStrNode)
+ def visit(self, node: ConstantStrNode, scope: Scope):
+ return StringType(node.pos)
+
+ @visitor.when(ConstantVoidNode)
+ def visit(self, node: ConstantVoidNode, scope: Scope):
+ return VoidType(node.pos)
+
+ @visitor.when(VariableNode)
+ def visit(self, node: VariableNode, scope: Scope):
+ _type = self.find_variable(scope, node.lex).type
+ return get_type(_type, self.current_type)
+
+ @visitor.when(InstantiateNode)
+ def visit(self, node: InstantiateNode, scope: Scope):
+ try:
+ _type = self.context.get_type(node.lex, node.pos)
+ except SemanticError:
+ _type = ErrorType()
+ error_text = TypesError.NEW_UNDEFINED_CLASS % node.lex
+ self.errors.append(TypesError(error_text, *node.pos))
+
+ return get_type(_type, self.current_type)
+
+ @visitor.when(WhileNode)
+ def visit(self, node: WhileNode, scope: Scope):
+ cond = self.visit(node.cond, scope)
+
+ if cond.name != 'Bool':
+ self.errors.append(TypesError(TypesError.LOOP_CONDITION_ERROR, *node.pos))
+
+ self.visit(node.expr, scope)
+ return ObjectType()
+
+ @visitor.when(IsVoidNode)
+ def visit(self, node: IsVoidNode, scope: Scope):
+ self.visit(node.expr, scope)
+ return BoolType()
+
+ @visitor.when(ConditionalNode)
+ def visit(self, node: ConditionalNode, scope: Scope):
+ cond = self.visit(node.cond, scope)
+
+ if cond.name != 'Bool':
+ error_text = TypesError.PREDICATE_ERROR % ('if', 'Bool')
+ self.errors.append(TypesError(error_text, *node.pos))
+
+ true_type = self.visit(node.stm, scope)
+ false_type = self.visit(node.else_stm, scope)
+
+ return get_common_base_type([false_type, true_type])
+
+ @visitor.when(BlockNode)
+ def visit(self, node: BlockNode, scope: Scope):
+ value = None
+ for exp in node.expr_list:
+ value = self.visit(exp, scope)
+ return value
+
+ @visitor.when(LetNode)
+ def visit(self, node: LetNode, scope: Scope):
+ child_scope = scope.expr_dict[node]
+ for init in node.init_list:
+ self.visit(init, child_scope)
+ return self.visit(node.expr, child_scope)
+
+ @visitor.when(CaseNode)
+ def visit(self, node: CaseNode, scope: Scope):
+ type_expr = self.visit(node.expr, scope)
+
+ new_scope = scope.expr_dict[node]
+ types = []
+ var_types = []
+ for case, c_scope in zip(node.case_list, new_scope.children):
+ case: OptionNode
+ t, vt = self.visit(case, c_scope)
+ types.append(t)
+ if case.typex in var_types:
+ error_text = SemanticError.DUPLICATE_CASE_BRANCH % case.typex
+ self.errors.append(SemanticError(error_text, *case.type_pos))
+ var_types.append(case.typex)
+
+ return get_common_base_type(types)
+
+ @visitor.when(OptionNode)
+ def visit(self, node: OptionNode, scope: Scope):
+ var_info = self.find_variable(scope, node.id)
+ _type = self.visit(node.expr, scope)
+ return _type, var_info.type
+
+ def binary_operation(self, node, scope, operator):
+ ltype = self.visit(node.left, scope)
+ rtype = self.visit(node.right, scope)
+ int_type = IntType()
+ if ltype != int_type or rtype != int_type:
+ error_text = TypesError.BOPERATION_NOT_DEFINED % (ltype.name, operator, rtype.name)
+ self.errors.append(TypesError(error_text, *node.pos))
+ return ErrorType()
+ if operator == '<' or operator == '<=':
+ return BoolType()
+ return int_type
+
+ @visitor.when(PlusNode)
+ def visit(self, node: PlusNode, scope: Scope):
+ return self.binary_operation(node, scope, '+')
+
+ @visitor.when(MinusNode)
+ def visit(self, node: MinusNode, scope: Scope):
+ return self.binary_operation(node, scope, '-')
+
+ @visitor.when(StarNode)
+ def visit(self, node: StarNode, scope: Scope):
+ return self.binary_operation(node, scope, '*')
+
+ @visitor.when(DivNode)
+ def visit(self, node: DivNode, scope: Scope):
+ return self.binary_operation(node, scope, '/')
+
+ @visitor.when(LessEqNode)
+ def visit(self, node: DivNode, scope: Scope):
+ return self.binary_operation(node, scope, '<=')
+
+ @visitor.when(LessNode)
+ def visit(self, node: DivNode, scope: Scope):
+ return self.binary_operation(node, scope, '<')
+
+ @visitor.when(EqualNode)
+ def visit(self, node: EqualNode, scope: Scope):
+ ltype = self.visit(node.left, scope)
+ rtype = self.visit(node.right, scope)
+ if (
+ ltype == IntType() or rtype == IntType() or ltype == StringType() or rtype == StringType() or ltype == BoolType() or rtype == BoolType()) and ltype != rtype:
+ error_text = TypesError.COMPARISON_ERROR
+ self.errors.append(TypesError(error_text, *node.pos))
+ return ErrorType()
+ else:
+ return BoolType()
+
+ @visitor.when(NotNode)
+ def visit(self, node: NotNode, scope: Scope):
+ ltype = self.visit(node.expr, scope)
+ _type = BoolType()
+ if ltype != _type:
+ error_text = TypesError.UOPERATION_NOT_DEFINED % ('not', ltype.name, _type.name)
+ self.errors.append(TypesError(error_text, *node.pos))
+ return ErrorType()
+ return _type
+
+ @visitor.when(BinaryNotNode)
+ def visit(self, node: BinaryNotNode, scope: Scope):
+ ltype = self.visit(node.expr, scope)
+ int_type = IntType()
+ if ltype != int_type:
+ error_text = TypesError.UOPERATION_NOT_DEFINED % ('~', ltype.name, int_type.name)
+ self.errors.append(TypesError(error_text, *node.pos))
+ return ErrorType()
+ return int_type
+
+ def _validate_args(self, method: Method, scope: Scope, args, pos):
+ arg_types = [self.visit(arg, scope) for arg in args]
+
+ if len(arg_types) > len(method.param_types):
+ error_text = SemanticError.ARGUMENT_ERROR % method.name
+ self.errors.append(SemanticError(error_text, *pos))
+ elif len(arg_types) < len(method.param_types):
+ for arg, arg_info in zip(method.param_names[len(arg_types):], args[len(arg_types):]):
+ error_text = SemanticError.ARGUMENT_ERROR % method.name
+ self.errors.append(SemanticError(error_text, *arg_info.pos))
+
+ for atype, ptype, param_name in zip(arg_types, method.param_types, method.param_names):
+ if not atype.conforms_to(ptype):
+ error_text = TypesError.INCOSISTENT_ARG_TYPE % (method.name, atype.name, param_name, ptype.name)
+ self.errors.append(TypesError(error_text, *pos))
+
+ def _get_type(self, _type: str, pos):
+ try:
+ return self.context.get_type(_type, pos)
+ except SemanticError as e:
+ self.errors.append(e)
+ return ErrorType()
+
+ def _get_method(self, _type: Type, name: str, pos) -> Method:
+ try:
+ return _type.get_method(name, pos)
+ except SemanticError as e:
+ if type(_type) != ErrorType and type(_type) != AutoType:
+ error_text = AttributesError.DISPATCH_UNDEFINED % name
+ self.errors.append(AttributesError(error_text, *pos))
+ return MethodError(name, [], [], ErrorType())
+
+ def find_variable(self, scope, lex):
+ var_info = scope.find_local(lex)
+
+ if var_info is None:
+ var_info = scope.find_attribute(lex)
+
+ if lex in self.current_type.attributes and var_info is None:
+ return VariableInfo(lex, VoidType())
+
+ return var_info
diff --git a/src/cool/semantic/typeCollector.py b/src/cool/semantic/typeCollector.py
new file mode 100644
index 000000000..e013af859
--- /dev/null
+++ b/src/cool/semantic/typeCollector.py
@@ -0,0 +1,37 @@
+from ..utils.ast import *
+from ..utils import visitor
+from .helpers import *
+from .types import *
+
+
+class TypeCollector:
+ def __init__(self, errors=[]):
+ self.context = None
+ self.errors = errors
+
+ @visitor.on('node')
+ def visit(self, node):
+ pass
+
+ @visitor.when(ProgramNode)
+ def visit(self, node: ProgramNode):
+ self.context = Context()
+ self.context.types['String'] = StringType()
+ self.context.types['Int'] = IntType()
+ self.context.types['Object'] = ObjectType()
+ self.context.types['Bool'] = BoolType()
+ self.context.types['SELF_TYPE'] = SelfType()
+ self.context.types['IO'] = IOType()
+
+ for d in node.declarations:
+ self.visit(d)
+
+ @visitor.when(ClassDeclarationNode)
+ def visit(self, node: ClassDeclarationNode):
+ try:
+ self.context.create_type(node.id, node.pos)
+ except SemanticError as e:
+ self.errors.append(e)
+
+ if not node.parent:
+ node.parent = 'Object'
diff --git a/src/cool/semantic/types.py b/src/cool/semantic/types.py
new file mode 100644
index 000000000..580436619
--- /dev/null
+++ b/src/cool/semantic/types.py
@@ -0,0 +1,327 @@
+from ..utils.errors import SemanticError, TypesError, NamesError, AttributesError
+from collections import OrderedDict
+
+
+class Attribute:
+ def __init__(self, name, typex, index, tok=None):
+ self.name = name
+ self.type = typex
+ self.index = index # lugar que ocupa en el scope
+ self.expr = None
+
+ def __str__(self):
+ return f'[attrib] {self.name} : {self.type.name};'
+
+ def __repr__(self):
+ return str(self)
+
+
+class Method:
+ def __init__(self, name, param_names, params_types, return_type):
+ self.name = name
+ self.param_names = param_names
+ self.param_types = params_types
+ self.return_type = return_type
+
+ def __str__(self):
+ params = ', '.join(f'{n}:{t.name}' for n, t in zip(self.param_names, self.param_types))
+ return f'[method] {self.name}({params}): {self.return_type.name};'
+
+ def __eq__(self, other):
+ return other.name == self.name and \
+ other.return_type == self.return_type and \
+ other.param_types == self.param_types
+
+
+class MethodError(Method):
+ def __init__(self, name, param_names, param_types, return_types):
+ super().__init__(name, param_names, param_types, return_types)
+
+ def __str__(self):
+ return f'[method] {self.name} ERROR'
+
+
+class Type:
+ def __init__(self, name: str, pos, parent=True):
+ if name == 'ObjectType':
+ return ObjectType(pos)
+ self.name = name
+ self.attributes = {}
+ self.methods = {}
+ if parent:
+ self.parent = ObjectType(pos)
+ else:
+ self.parent = None
+ self.pos = pos
+
+ def set_parent(self, parent):
+ if type(self.parent) != ObjectType and self.parent is not None:
+ error_text = TypesError.PARENT_ALREADY_DEFINED % self.name
+ raise TypesError(error_text, *self.pos)
+ self.parent = parent
+
+ def get_attribute(self, name: str, pos) -> Attribute:
+ try:
+ return self.attributes[name] # next(attr for attr in self.attributes if attr.name == name)
+ except KeyError:
+ if self.parent is None:
+ error_text = AttributesError.ATTRIBUTE_NOT_DEFINED % (name, self.name)
+ raise AttributesError(error_text, *pos)
+ try:
+ return self.parent.get_attribute(name, pos)
+ except AttributesError:
+ error_text = AttributesError.ATTRIBUTE_NOT_DEFINED % (name, self.name)
+ raise AttributesError(error_text, *pos)
+
+ def define_attribute(self, name: str, typex, pos):
+ try:
+ self.attributes[name]
+ except KeyError:
+ try:
+ self.get_attribute(name, pos)
+ except SemanticError:
+ self.attributes[name] = attribute = Attribute(name, typex, len(self.attributes))
+ # self.attributes.append(attribute)
+ return attribute
+ else:
+ error_text = SemanticError.ATTR_DEFINED_PARENT % name
+ raise SemanticError(error_text, *pos)
+ else:
+ error_text = SemanticError.ATTRIBUTE_ALREADY_DEFINED % name
+ raise SemanticError(error_text, *pos)
+
+ def get_method(self, name: str, pos) -> Method:
+ try:
+ return self.methods[name]
+ except KeyError:
+ error_text = AttributesError.METHOD_NOT_DEFINED % (name, self.name)
+ if self.parent is None:
+ raise AttributesError(error_text, *pos)
+ try:
+ return self.parent.get_method(name, pos)
+ except AttributesError:
+ raise AttributesError(error_text, *pos)
+
+ def define_method(self, name: str, param_names: list, param_types: list, return_type, pos=(0, 0)):
+ if name in self.methods:
+ error_text = SemanticError.METHOD_ALREADY_DEFINED % name
+ raise SemanticError(error_text, *pos)
+
+ method = self.methods[name] = Method(name, param_names, param_types, return_type)
+ return method
+
+ def change_type(self, method, nparm, newtype):
+ idx = method.param_names.index(nparm)
+ method.param_types[idx] = newtype
+
+ def all_attributes(self, clean=True):
+ plain = OrderedDict() if self.parent is None else self.parent.all_attributes(False)
+ for attr in self.attributes.values():
+ plain[attr.name] = (attr, self)
+ return plain.values() if clean else plain
+
+ def all_methods(self, clean=True):
+ plain = OrderedDict() if self.parent is None else self.parent.all_methods(False)
+ for method in self.methods.values():
+ plain[method.name] = (method, self)
+ return plain.values() if clean else plain
+
+ def conforms_to(self, other):
+ return other.bypass() or self == other or self.parent is not None and self.parent.conforms_to(other)
+
+ def bypass(self):
+ return False
+
+ def __str__(self):
+ output = f'type {self.name}'
+ parent = '' if self.parent is None else f' : {self.parent.name}'
+ output += parent
+ output += ' {'
+ output += '\n\t' if self.attributes or self.methods else ''
+ output += '\n\t'.join(str(x) for x in self.attributes.values())
+ output += '\n\t' if self.attributes else ''
+ output += '\n\t'.join(str(x) for x in self.methods.values())
+ output += '\n' if self.methods else ''
+ output += '}\n'
+ return output
+
+ def __repr__(self):
+ return str(self)
+
+
+class ErrorType(Type):
+ def __init__(self, pos=(0, 0)):
+ Type.__init__(self, '', pos)
+
+ def conforms_to(self, other):
+ return True
+
+ def bypass(self):
+ return True
+
+ def __eq__(self, other):
+ return isinstance(other, ErrorType)
+
+ def __ne__(self, other):
+ return not isinstance(other, ErrorType)
+
+
+VOID_NAME = 'Void'
+
+
+class VoidType(Type):
+ def __init__(self, pos=(0, 0)):
+ Type.__init__(self, VOID_NAME, pos)
+
+ def conforms_to(self, other):
+ return True
+
+ def bypass(self):
+ return True
+
+ def __eq__(self, other):
+ return isinstance(other, VoidType)
+
+
+class BoolType(Type):
+ def __init__(self, pos=(0, 0)):
+ self.name = 'Bool'
+ self.attributes = {}
+ self.methods = {}
+ self.parent = None
+ self.pos = pos
+ self.init_methods()
+
+ def init_methods(self):
+ self.define_method('abort', [], [], self)
+ self.define_method('type_name', [], [], StringType())
+ self.define_method('copy', [], [], SelfType())
+
+ def conforms_to(self, other):
+ return other.name == 'Object' or other.name == self.name
+
+ def __eq__(self, other):
+ return other.name == self.name or isinstance(other, BoolType)
+
+ def __ne__(self, other):
+ return other.name != self.name and not isinstance(other, BoolType)
+
+
+class SelfType(Type):
+ def __init__(self, pos=(0, 0)):
+ self.name = 'Self'
+ self.attributes = {}
+ self.methods = {}
+ self.parent = None
+ self.pos = pos
+
+ def __eq__(self, other):
+ return other.name == self.name or isinstance(other, SelfType)
+
+ def __ne__(self, other):
+ return other.name != self.name and not isinstance(other, SelfType)
+
+
+class IntType(Type):
+ def __init__(self, pos=(0, 0)):
+ self.name = 'Int'
+ self.attributes = {}
+ self.methods = {}
+ self.parent = None
+ self.pos = pos
+ self.init_methods()
+
+ def init_methods(self):
+ self.define_method('abort', [], [], self)
+ self.define_method('type_name', [], [], Type('String', (0, 0), False))
+ self.define_method('copy', [], [], SelfType())
+
+ def conforms_to(self, other):
+ return other.name == 'Object' or other.name == self.name
+
+ def __eq__(self, other):
+ return other.name == self.name or isinstance(other, IntType)
+
+ def __ne__(self, other):
+ return other.name != self.name and not isinstance(other, IntType)
+
+
+class StringType(Type):
+ def __init__(self, pos=(0, 0)):
+ self.name = 'String'
+ self.attributes = {}
+ self.methods = {}
+ self.parent = None
+ self.pos = pos
+ self.init_methods()
+
+ def init_methods(self):
+ self.define_method('abort', [], [], self)
+ self.define_method('type_name', [], [], self)
+ self.define_method('copy', [], [], SelfType())
+ self.define_method('length', [], [], IntType())
+ self.define_method('concat', ['s'], [self], self)
+ self.define_method('substr', ['i', 'l'], [IntType(), IntType()], self)
+
+ def conforms_to(self, other):
+ return other.name == 'Object' or other.name == self.name
+
+ def __eq__(self, other):
+ return other.name == self.name or isinstance(other, StringType)
+
+ def __ne__(self, other):
+ return other.name != self.name and not isinstance(other, StringType)
+
+
+class ObjectType(Type):
+ def __init__(self, pos=(0, 0)):
+ self.name = 'Object'
+ self.attributes = {}
+ self.methods = {}
+ self.parent = None
+ self.pos = pos
+ self.init_methods()
+
+ def init_methods(self):
+ self.define_method('abort', [], [], self)
+ self.define_method('type_name', [], [], StringType())
+ self.define_method('copy', [], [], SelfType())
+
+ def __eq__(self, other):
+ return other.name == self.name or isinstance(other, ObjectType)
+
+ def __ne__(self, other):
+ return other.name != self.name and not isinstance(other, ObjectType)
+
+
+class AutoType(Type):
+ def __init__(self):
+ Type.__init__(self, 'AUTO_TYPE')
+
+ def __eq__(self, other):
+ return other.name == self.name or isinstance(other, AutoType)
+
+ def __ne__(self, other):
+ return other.name != self.name and not isinstance(other, AutoType)
+
+
+class IOType(Type):
+ def __init__(self, pos=(0, 0)):
+ self.name = 'IO'
+ self.attributes = {}
+ self.methods = {}
+ self.parent = ObjectType(pos)
+ self.pos = pos
+ self.init_methods()
+
+ def init_methods(self):
+ self.define_method('out_string', ['x'], [StringType()], SelfType())
+ self.define_method('out_int', ['x'], [IntType()], SelfType())
+ self.define_method('in_string', [], [], StringType())
+ self.define_method('in_int', [], [], IntType())
+
+ def __eq__(self, other):
+ return other.name == self.name or isinstance(other, IOType)
+
+ def __ne__(self, other):
+ return other.name != self.name and not isinstance(other, IOType)
diff --git a/src/cool/utils/__init__.py b/src/cool/utils/__init__.py
new file mode 100644
index 000000000..b408ee7f1
--- /dev/null
+++ b/src/cool/utils/__init__.py
@@ -0,0 +1,5 @@
+from .ast import *
+from .tokens import *
+from .visitor import *
+from .errors import *
+from .helpers import *
diff --git a/src/cool/utils/__main__.py b/src/cool/utils/__main__.py
new file mode 100644
index 000000000..679ee2be2
--- /dev/null
+++ b/src/cool/utils/__main__.py
@@ -0,0 +1,6 @@
+from .ast import *
+from .errors import *
+from .helpers import *
+from .logger import *
+from .tokens import *
+from .visitor import *
diff --git a/src/cool/utils/ast.py b/src/cool/utils/ast.py
new file mode 100644
index 000000000..633067a24
--- /dev/null
+++ b/src/cool/utils/ast.py
@@ -0,0 +1,270 @@
+from ply.lex import LexToken
+
+
+class Node:
+ pass
+
+
+class ProgramNode(Node):
+ def __init__(self, declarations):
+ self.declarations = declarations
+
+
+class DeclarationNode(Node):
+ pass
+
+
+class ExpressionNode(Node):
+ pass
+
+
+class ErrorNode(Node):
+ pass
+
+
+class ClassDeclarationNode(DeclarationNode):
+ def __init__(self, idx: LexToken, features, parent=None):
+ self.id = idx.value
+ self.pos = (idx.lineno, idx.column)
+ if parent:
+ self.parent = parent.value
+ self.parent_pos = (parent.lineno, parent.column)
+ else:
+ self.parent = None
+ self.parent_pos = (0, 0)
+ self.features = features
+ self.token = idx
+
+
+class _Param:
+ def __init__(self, tok):
+ self.value = tok.value
+ self.pos = (tok.lineno, tok.column)
+
+
+class FuncDeclarationNode(DeclarationNode):
+ def __init__(self, idx: LexToken, params, return_type: LexToken, body):
+ self.id = idx.value
+ self.pos = (idx.lineno, idx.column)
+ self.params = [(pname.value, _Param(ptype)) for pname, ptype in params]
+ self.type = return_type.value
+ self.type_pos = (return_type.lineno, return_type.column)
+ self.body = body
+
+
+class AttrDeclarationNode(DeclarationNode):
+ def __init__(self, idx: LexToken, typex, expr=None):
+ self.id = idx.value
+ self.pos = (idx.lineno, idx.column)
+ self.type = typex.value
+ self.type_pos = (typex.lineno, typex.column)
+ self.expr = expr
+ self.token = idx
+
+
+class VarDeclarationNode(ExpressionNode):
+ def __init__(self, idx: LexToken, typex, expr=None):
+ self.id = idx.value
+ self.pos = (idx.lineno, idx.column)
+ self.type = typex.value
+ self.type_pos = (typex.lineno, typex.column)
+ self.expr = expr
+
+
+class AssignNode(ExpressionNode):
+ def __init__(self, idx: LexToken, expr):
+ if isinstance(idx, LexToken):
+ self.id = idx.value
+ self.pos = (idx.lineno, idx.column)
+ else:
+ self.id = idx
+ self.pos = None
+ self.expr = expr
+
+
+class CallNode(ExpressionNode):
+ def __init__(self, obj, idx: LexToken, args):
+ self.obj = obj
+ self.id = idx.value
+ self.pos = (idx.lineno, idx.column)
+ self.args = args
+
+
+class BlockNode(ExpressionNode):
+ def __init__(self, expr_list, tok):
+ self.expr_list = expr_list
+ self.pos = (tok.lineno, tok.column)
+ self.token = tok
+
+
+class BaseCallNode(ExpressionNode):
+ def __init__(self, obj, typex: LexToken, idx: LexToken, args):
+ self.obj = obj
+ self.id = idx.value
+ self.pos = (idx.lineno, idx.column)
+ self.args = args
+ self.type = typex.value
+ self.type_pos = (typex.lineno, typex.column)
+
+
+class StaticCallNode(ExpressionNode):
+ def __init__(self, idx: LexToken, args):
+ self.id = idx.value
+ self.pos = (idx.lineno, idx.column)
+ self.args = args
+
+
+class AtomicNode(ExpressionNode):
+ def __init__(self, lex):
+ try:
+ self.lex = lex.value
+ self.pos = (lex.lineno, lex.column)
+ except AttributeError:
+ self.lex = lex
+ self.pos = (0, 0)
+
+
+class BinaryNode(ExpressionNode):
+ def __init__(self, left, right):
+ self.left = left
+ self.right = right
+ self.pos = left.pos
+
+
+class BinaryLogicalNode(BinaryNode):
+ pass
+
+
+class BinaryArithNode(BinaryNode):
+ pass
+
+
+class UnaryNode(ExpressionNode):
+ def __init__(self, expr, tok):
+ self.expr = expr
+ self.pos = (tok.lineno, tok.column)
+
+
+class UnaryLogicalNode(UnaryNode):
+ pass
+
+
+class UnaryArithNode(UnaryNode):
+ pass
+
+
+class WhileNode(ExpressionNode):
+ def __init__(self, cond, expr, tok):
+ self.cond = cond
+ self.expr = expr
+ self.pos = (tok.lineno, tok.column)
+
+
+class ConditionalNode(ExpressionNode):
+ def __init__(self, cond, stm, else_stm, tok):
+ self.cond = cond
+ self.stm = stm
+ self.else_stm = else_stm
+ self.pos = (tok.lineno, tok.column)
+
+
+class CaseNode(ExpressionNode):
+ def __init__(self, expr, case_list, tok):
+ self.expr = expr
+ self.case_list = case_list
+ self.pos = (tok.lineno, tok.column)
+
+ def __hash__(self):
+ return id(self)
+
+
+class OptionNode(ExpressionNode):
+ def __init__(self, idx: LexToken, typex, expr):
+ self.id = idx.value
+ self.pos = (idx.lineno, idx.column)
+ self.typex = typex.value
+ self.type_pos = (typex.lineno, typex.column)
+ self.expr = expr
+
+
+class LetNode(ExpressionNode):
+ def __init__(self, init_list, expr, tok):
+ self.init_list = init_list
+ self.expr = expr
+ self.pos = (tok.lineno, tok.column)
+
+ def __hash__(self):
+ return id(self)
+
+
+class ConstantNumNode(AtomicNode):
+ pass
+
+
+class ConstantBoolNode(AtomicNode):
+ pass
+
+
+class ConstantStrNode(AtomicNode):
+ pass
+
+
+class ConstantVoidNode(AtomicNode):
+ def __init__(self, obj):
+ super().__init__(obj)
+
+
+class SelfNode(Node):
+ pass
+
+
+class VariableNode(AtomicNode):
+ pass
+
+
+class TypeNode(AtomicNode):
+ pass
+
+
+class InstantiateNode(AtomicNode):
+ pass
+
+
+class BinaryNotNode(UnaryArithNode):
+ pass
+
+
+class NotNode(UnaryLogicalNode):
+ pass
+
+
+class IsVoidNode(UnaryLogicalNode):
+ pass
+
+
+class PlusNode(BinaryArithNode):
+ pass
+
+
+class MinusNode(BinaryArithNode):
+ pass
+
+
+class StarNode(BinaryArithNode):
+ pass
+
+
+class DivNode(BinaryArithNode):
+ pass
+
+
+class LessNode(BinaryLogicalNode):
+ pass
+
+
+class LessEqNode(BinaryLogicalNode):
+ pass
+
+
+class EqualNode(BinaryLogicalNode):
+ pass
diff --git a/src/cool/utils/errors.py b/src/cool/utils/errors.py
new file mode 100644
index 000000000..c5c7e0d02
--- /dev/null
+++ b/src/cool/utils/errors.py
@@ -0,0 +1,119 @@
+class CoolError(Exception):
+ def __init__(self, text: str, line: int, column: int):
+ super().__init__(text)
+ self.line = line
+ self.column = column
+
+ @property
+ def error_type(self) -> str:
+ return 'CoolError'
+
+ @property
+ def text(self) -> str:
+ return self.args[0]
+
+ def __str__(self):
+ return f'({self.line}, {self.column}) - {self.error_type}: {self.text}'
+
+ def __repr__(self):
+ return str(self)
+
+
+class LexicographicError(CoolError):
+ UNKNOWN_TOKEN = 'ERROR "%s"'
+ UNDETERMINED_STRING = 'Undetermined string constant'
+ EOF_COMMENT = 'EOF in comment'
+ EOF_STRING = 'EOF in string constant'
+ NULL_STRING = 'String contains null character'
+
+ @property
+ def error_type(self) -> str:
+ return 'LexicographicError'
+
+
+class SyntacticError(CoolError):
+ """Errors in parser"""
+
+ ERROR = 'ERROR at or near "%s"'
+
+ @property
+ def error_type(self):
+ return 'SyntacticError'
+
+
+class SemanticError(CoolError):
+ """Errors in semantic analysis"""
+
+ SELF_IS_READONLY = 'Cannot assign to \'self\'.'
+ SELF_IN_LET = '\'self\' cannot be bound in a \'let\' expression.'
+ SELF_PARAM = "'self' cannot be the name of a formal parameter."
+ SELF_ATTR = "'self' cannot be the name of an attribute."
+ LOCAL_ALREADY_DEFINED = 'Variable "%s" is already defined in method "%s".'
+ ARGUMENT_ERROR = 'Method %s called with wrong number of arguments.'
+ REDEFINITION_ERROR = 'Redefinition of basic class %s'
+ INHERIT_ERROR = 'Class %s cannot inherit class %s.'
+ DUPLICATE_CASE_BRANCH = 'Duplicate branch %s in case statement.'
+ TYPE_ALREADY_DEFINED = 'Classes may not be redefined.'
+ ATTRIBUTE_ALREADY_DEFINED = 'Attribute "%s" is multiply defined in class.'
+ ATTR_DEFINED_PARENT = 'Attribute %s is an attribute of an inherited class.'
+ METHOD_ALREADY_DEFINED = 'Method "%s" is multiply defined.'
+ CIRCULAR_DEPENDENCY = 'Class %s, or an ancestor of %s, is involved in an inheritance cycle.'
+ WRONG_SIGNATURE_RETURN = 'In redefined method %s, return type %s is different from original return type %s.'
+ WRONG_NUMBER_PARAM = 'Incompatible number of formal parameters in redefined method %s.'
+ PARAMETER_MULTY_DEFINED = 'Formal parameter %s is multiply defined.'
+ WRONG_SIGNATURE_PARAMETER = 'In redefined method %s, parameter type %s is different from original type %s.'
+
+ @property
+ def error_type(self):
+ return 'SemanticError'
+
+
+class NamesError(SemanticError):
+ """Reference in not visible scope"""
+
+ VARIABLE_NOT_DEFINED = 'Undeclared identifier %s.'
+
+ @property
+ def error_type(self):
+ return 'NameError'
+
+
+class TypesError(SemanticError):
+ """Types problems"""
+
+ INCOMPATIBLE_TYPES = 'Cannot convert "%s" into "%s".'
+ ATTR_TYPE_ERROR = 'Inferred type %s of initialization of attribute %s does not conform to declared type %s.'
+ ATTR_TYPE_UNDEFINED = 'Class %s of attribute %s is undefined.'
+ BOPERATION_NOT_DEFINED = 'non-Int arguments: %s %s %s.'
+ COMPARISON_ERROR = 'Illegal comparison with a basic type.'
+ UOPERATION_NOT_DEFINED = 'Argument of \'%s\' has type %s instead of %s.'
+ CLASS_CASE_BRANCH_UNDEFINED = 'Class %s of case branch is undefined.'
+ PREDICATE_ERROR = 'Predicate of \'%s\' does not have type %s.'
+ INCOSISTENT_ARG_TYPE = 'In call of method %s, type %s of parameter %s does not conform to declared type %s.'
+ INCOMPATIBLE_TYPES_DISPATCH = 'Expression type %s does not conform to declared static dispatch type %s.'
+ INHERIT_UNDEFINED = 'Class %s inherits from an undefined class %s.'
+ UNCONFORMS_TYPE = 'Inferred type %s of initialization of %s does not conform to identifier\'s declared type %s.'
+ UNDEFINED_TYPE_LET = 'Class %s of let-bound identifier %s is undefined.'
+ LOOP_CONDITION_ERROR = 'Loop condition does not have type Bool.'
+ RETURN_TYPE_ERROR = 'Inferred return type %s of method test does not conform to declared return type %s.'
+ PARAMETER_UNDEFINED = 'Class %s of formal parameter %s is undefined.'
+ RETURN_TYPE_UNDEFINED = 'Undefined return type %s in method %s.'
+ NEW_UNDEFINED_CLASS = '\'new\' used with undefined class %s.'
+ PARENT_ALREADY_DEFINED = 'Parent type is already set for "%s"'
+ TYPE_NOT_DEFINED = 'Type "%s" is not defined.'
+
+ @property
+ def error_type(self):
+ return 'TypeError'
+
+
+class AttributesError(SemanticError):
+ """Not defined attribute or method"""
+
+ DISPATCH_UNDEFINED = 'Dispatch to undefined method %s.'
+ METHOD_NOT_DEFINED = 'Method "%s" is not defined in "%s"'
+ ATTRIBUTE_NOT_DEFINED = 'Attribute "%s" is not defined in %s'
+
+ @property
+ def error_type(self):
+ return 'AttributeError'
diff --git a/src/cool/utils/helpers.py b/src/cool/utils/helpers.py
new file mode 100644
index 000000000..d9e68a15d
--- /dev/null
+++ b/src/cool/utils/helpers.py
@@ -0,0 +1,38 @@
+import itertools
+from ..semantic.types import Type, SelfType
+from typing import List
+from .errors import SemanticError, TypesError
+
+
+def find_column(lexer, token):
+ line_start = lexer.lexdata.rfind('\n', 0, token.lexpos)
+ return token.lexpos - line_start
+
+
+def get_type(typex: Type, current_type: Type) -> Type:
+ return current_type if typex == SelfType() else typex
+
+
+def path_to_objet(_type):
+ path = []
+ c_type = _type
+
+ while c_type:
+ path.append(c_type)
+ c_type = c_type.parent
+
+ path.reverse()
+
+ return path
+
+
+def get_common_base_type(types):
+ paths = [path_to_objet(_type) for _type in types]
+ tuples = zip(*paths)
+
+ for i, t in enumerate(tuples):
+ gr = itertools.groupby(t)
+ if len(list(gr)) > 1:
+ return paths[0][i - 1]
+
+ return paths[0][-1]
diff --git a/src/cool/utils/logger.py b/src/cool/utils/logger.py
new file mode 100644
index 000000000..43680baf4
--- /dev/null
+++ b/src/cool/utils/logger.py
@@ -0,0 +1,23 @@
+import logging
+import os
+
+cwd = os.getcwd()
+
+try:
+ logging.basicConfig(
+ level=logging.DEBUG,
+ filename=f"{cwd}/src/cool/parser/output/parselog.txt",
+ filemode="w",
+ format="%(filename)10s:%(lineno)4d:%(message)s"
+ )
+
+ log = logging.getLogger()
+except:
+ logging.basicConfig(
+ level=logging.DEBUG,
+ filename=f"{cwd}/cool/parser/output/parselog.txt",
+ filemode="w",
+ format="%(filename)10s:%(lineno)4d:%(message)s"
+ )
+
+ log = logging.getLogger()
diff --git a/src/cool/utils/tokens.py b/src/cool/utils/tokens.py
new file mode 100644
index 000000000..2ffc0288e
--- /dev/null
+++ b/src/cool/utils/tokens.py
@@ -0,0 +1,66 @@
+from typing import Dict, List
+
+ignored: List[str] = [' ', '\f', '\r', '\t', '\v']
+
+reservedKeywords: Dict[str, str] = {
+ 'class': 'class',
+ 'else': 'else',
+ 'false': 'false',
+ 'fi': 'fi',
+ 'if': 'if',
+ 'in': 'in',
+ 'inherits': 'inherits',
+ 'isvoid': 'isvoid',
+ 'let': 'let',
+ 'loop': 'loop',
+ 'pool': 'pool',
+ 'then': 'then',
+ 'while': 'while',
+ 'case': 'case',
+ 'esac': 'esac',
+ 'new': 'new',
+ 'of': 'of',
+ 'not': 'not',
+ 'true': 'true'
+}
+
+literals: List[str] = [
+ 'semi', # '; '
+ 'colon', # ': '
+ 'comma', # ', '
+ 'dot', # '. '
+ 'opar', # '( '
+ 'cpar', # ') '
+ 'ocur', # '{'
+ 'ccur', # '} '
+ 'larrow', # '<-'
+ 'arroba', # '@'
+ 'rarrow', # '=> '
+ 'nox', # '~'
+ 'equal', # '='
+ 'plus', # '+'
+ 'minus', # '-'
+ 'star', # '\*'
+ 'div', # '/ '
+ 'less', # '<'
+ 'lesseq', # '<='
+ 'id',
+ 'type',
+ 'num',
+ 'string'
+]
+
+tokens = list(reservedKeywords.values()) + literals
+
+class Token:
+ def __init__(self, lex: str, type_: str, lineno: int, pos: int):
+ self.lex = lex
+ self.type = type_
+ self.lineno = lineno
+ self.pos = pos
+
+ def __str__(self):
+ return f'{self.type}: {self.lex} ({self.lineno}, {self.pos})'
+
+ def __repr__(self):
+ return str(self)
\ No newline at end of file
diff --git a/src/cool/utils/visitor.py b/src/cool/utils/visitor.py
new file mode 100644
index 000000000..964842836
--- /dev/null
+++ b/src/cool/utils/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)
diff --git a/src/coolc.sh b/src/coolc.sh
index 3088de4f9..ce8b11410 100755
--- a/src/coolc.sh
+++ b/src/coolc.sh
@@ -1,11 +1,9 @@
-# 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 "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 2021 v1"
+echo "Copyright (c): Jose Carlos Hdez, Yan Carlos Glez, Henry Estévez"
+
+FILE="main.py"
-# Llamar al compilador
-echo "Compiling $INPUT_FILE into $OUTPUT_FILE"
+python ${FILE} $INPUT_FILE $OUTPUT_FILE
\ No newline at end of file
diff --git a/src/main.py b/src/main.py
new file mode 100644
index 000000000..11576d541
--- /dev/null
+++ b/src/main.py
@@ -0,0 +1,54 @@
+import os.path
+import sys
+from pathlib import Path
+
+from cool.lexer import CoolLexer, main
+from cool.parser.parser import CoolParser
+from cool.semantic.semantic import main_semantic
+from cool.utils.errors import SyntacticError
+from cool.codegen.codegen import run_pipeline
+
+if __name__ == '__main__':
+ add = "codegen/hello_world.cl"
+
+ path: str = f"{Path.cwd()}/tests/{add}" if os.path.exists(
+ f"{Path.cwd()}/tests/{add}") else f"{Path.cwd()}/../tests/{add}"
+
+ out: str = f"{Path.cwd()}/mips-code.asm"
+
+ _in = sys.argv[1] if len(sys.argv) > 1 else path
+ _out = sys.argv[2] if len(sys.argv) > 2 else out
+
+ text: str = ''
+
+ with open(_in) as file:
+ text = file.read()
+
+ lexer = main(text, _out) # into call to tokenize text
+
+ lexer.lexer.lineno = 1
+ lexer.lexer.linestart = 0
+
+ tokens = lexer.tokenize(text)
+
+ if len(tokens) == 0:
+ error_text = SyntacticError.ERROR % 'EOF'
+ print(SyntacticError(error_text, 0, 0))
+ raise Exception()
+
+ parser = CoolParser(CoolLexer())
+ ast = parser.parse(text)
+
+ if parser.errors:
+ raise Exception()
+
+ ast, errors, context, scope = main_semantic(ast, False)
+
+ if errors:
+ for err in errors:
+ print(err)
+ raise Exception()
+ else:
+ mips_code = run_pipeline(context, ast, scope)
+ with open(_out, 'w+') as file:
+ file.write(mips_code)
diff --git a/tests/utils/utils.py b/tests/utils/utils.py
index 961cf7cbc..5679953f1 100644
--- a/tests/utils/utils.py
+++ b/tests/utils/utils.py
@@ -1,6 +1,5 @@
-import subprocess
import re
-
+import subprocess
COMPILER_TIMEOUT = 'El compilador tarda mucho en responder.'
SPIM_TIMEOUT = 'El spim tarda mucho en responder.'
@@ -46,6 +45,7 @@ def get_file_name(path: str):
def compare_errors(compiler_path: str, cool_file_path: str, error_file_path: str, cmp=first_error, timeout=100):
try:
sp = subprocess.run(['bash', compiler_path, cool_file_path], capture_output=True, timeout=timeout)
+ # print(f'Code: {sp.returncode}, Error: {sp.stderr}')
return_code, output = sp.returncode, sp.stdout.decode()
except subprocess.TimeoutExpired:
assert False, COMPILER_TIMEOUT
diff --git a/yarn.lock b/yarn.lock
new file mode 100644
index 000000000..8a1b2302f
--- /dev/null
+++ b/yarn.lock
@@ -0,0 +1,1352 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@babel/code-frame@^7.0.0":
+ version "7.12.13"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658"
+ integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==
+ dependencies:
+ "@babel/highlight" "^7.12.13"
+
+"@babel/helper-validator-identifier@^7.12.11":
+ version "7.12.11"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed"
+ integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==
+
+"@babel/highlight@^7.12.13":
+ version "7.13.10"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.10.tgz#a8b2a66148f5b27d666b15d81774347a731d52d1"
+ integrity sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.12.11"
+ chalk "^2.0.0"
+ js-tokens "^4.0.0"
+
+"@commitlint/execute-rule@^12.0.1":
+ version "12.0.1"
+ resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-12.0.1.tgz#5bb2eba929270cafb2bd8191799d8b451de7fb7e"
+ integrity sha512-JzyweYfZlFLtXpgP+btzSY3YAkGPg61TqUSYQqBr4+5IaVf1FruMm5v4D5eLu9dAJuNKUfHbM3AEfuEPiZ79pg==
+
+"@commitlint/load@>6.1.1":
+ version "12.0.1"
+ resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-12.0.1.tgz#4d180fc88e5b4cfcb476a245d899f85154137502"
+ integrity sha512-dX8KdCWn7w0bTkkk3zKQpe9X8vsTRa5EM+1ffF313wCX9b6tGa9vujhEHCkSzKAbbE2tFV64CHZygE7rtlHdIA==
+ dependencies:
+ "@commitlint/execute-rule" "^12.0.1"
+ "@commitlint/resolve-extends" "^12.0.1"
+ "@commitlint/types" "^12.0.1"
+ chalk "^4.0.0"
+ cosmiconfig "^7.0.0"
+ lodash "^4.17.19"
+ resolve-from "^5.0.0"
+
+"@commitlint/resolve-extends@^12.0.1":
+ version "12.0.1"
+ resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-12.0.1.tgz#77509f386e08bd30262ec9a75c783d8f4f028fd2"
+ integrity sha512-Mvg0GDi/68Cqw893ha8uhxE8myHfPmiSSSi7d1x4VJNR4hoS37lBdX89kyx4i9NPmLfviY2cUJKTyK8ZrFznZw==
+ dependencies:
+ import-fresh "^3.0.0"
+ lodash "^4.17.19"
+ resolve-from "^5.0.0"
+ resolve-global "^1.0.0"
+
+"@commitlint/types@^12.0.1":
+ version "12.0.1"
+ resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-12.0.1.tgz#04a0cbb8aa56b7c004f8939c2d1ef8892ec68327"
+ integrity sha512-FsNDMV0W7D19/ZbR412klpqAilXASx75Neqh7jPtK278IEwdukOg3vth1r5kTm+BjDScM7wMUEOwIW3NNfAtwg==
+ dependencies:
+ chalk "^4.0.0"
+
+"@types/parse-json@^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
+ integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
+
+ansi-escapes@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b"
+ integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==
+
+ansi-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+ integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
+
+ansi-regex@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
+ integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
+
+ansi-styles@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
+ integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
+ dependencies:
+ color-convert "^1.9.0"
+
+ansi-styles@^4.1.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
+ integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
+ dependencies:
+ color-convert "^2.0.1"
+
+arr-diff@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
+ integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=
+
+arr-flatten@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
+ integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==
+
+arr-union@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
+ integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
+
+array-unique@^0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
+ integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
+
+assign-symbols@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
+ integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
+
+atob@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
+ integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+ integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
+
+base@^0.11.1:
+ version "0.11.2"
+ resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
+ integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==
+ dependencies:
+ cache-base "^1.0.1"
+ class-utils "^0.3.5"
+ component-emitter "^1.2.1"
+ define-property "^1.0.0"
+ isobject "^3.0.1"
+ mixin-deep "^1.2.0"
+ pascalcase "^0.1.1"
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@^2.3.1:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
+ integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==
+ dependencies:
+ arr-flatten "^1.1.0"
+ array-unique "^0.3.2"
+ extend-shallow "^2.0.1"
+ fill-range "^4.0.0"
+ isobject "^3.0.1"
+ repeat-element "^1.1.2"
+ snapdragon "^0.8.1"
+ snapdragon-node "^2.0.1"
+ split-string "^3.0.2"
+ to-regex "^3.0.1"
+
+cache-base@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
+ integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==
+ dependencies:
+ collection-visit "^1.0.0"
+ component-emitter "^1.2.1"
+ get-value "^2.0.6"
+ has-value "^1.0.0"
+ isobject "^3.0.1"
+ set-value "^2.0.0"
+ to-object-path "^0.3.0"
+ union-value "^1.0.0"
+ unset-value "^1.0.0"
+
+cachedir@2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.2.0.tgz#19afa4305e05d79e417566882e0c8f960f62ff0e"
+ integrity sha512-VvxA0xhNqIIfg0V9AmJkDg91DaJwryutH5rVEZAhcNi4iJFj9f+QxmAjgK1LT9I8OgToX27fypX6/MeCXVbBjQ==
+
+callsites@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
+ integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
+
+chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2:
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
+ integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
+ dependencies:
+ ansi-styles "^3.2.1"
+ escape-string-regexp "^1.0.5"
+ supports-color "^5.3.0"
+
+chalk@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
+ integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
+ dependencies:
+ ansi-styles "^4.1.0"
+ supports-color "^7.1.0"
+
+chardet@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
+ integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
+
+class-utils@^0.3.5:
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
+ integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==
+ dependencies:
+ arr-union "^3.1.0"
+ define-property "^0.2.5"
+ isobject "^3.0.0"
+ static-extend "^0.1.1"
+
+cli-cursor@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
+ integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=
+ dependencies:
+ restore-cursor "^2.0.0"
+
+cli-width@^2.0.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48"
+ integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==
+
+collection-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
+ integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=
+ dependencies:
+ map-visit "^1.0.0"
+ object-visit "^1.0.0"
+
+color-convert@^1.9.0:
+ version "1.9.3"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
+ integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
+ dependencies:
+ color-name "1.1.3"
+
+color-convert@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+ integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
+ dependencies:
+ color-name "~1.1.4"
+
+color-name@1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
+ integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+
+color-name@~1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+ integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+
+commitizen@^4.0.3:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/commitizen/-/commitizen-4.2.3.tgz#088d0ef72500240d331b11e02e288223667c1475"
+ integrity sha512-pYlYEng7XMV2TW4xtjDKBGqeJ0Teq2zyRSx2S3Ml1XAplHSlJZK8vm1KdGclpMEZuGafbS5TeHXIVnHk8RWIzQ==
+ dependencies:
+ cachedir "2.2.0"
+ cz-conventional-changelog "3.2.0"
+ dedent "0.7.0"
+ detect-indent "6.0.0"
+ find-node-modules "2.0.0"
+ find-root "1.1.0"
+ fs-extra "8.1.0"
+ glob "7.1.4"
+ inquirer "6.5.2"
+ is-utf8 "^0.2.1"
+ lodash "^4.17.20"
+ minimist "1.2.5"
+ strip-bom "4.0.0"
+ strip-json-comments "3.0.1"
+
+component-emitter@^1.2.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
+ integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
+
+conventional-commit-types@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/conventional-commit-types/-/conventional-commit-types-3.0.0.tgz#7c9214e58eae93e85dd66dbfbafe7e4fffa2365b"
+ integrity sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==
+
+copy-descriptor@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
+ integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
+
+cosmiconfig@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3"
+ integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==
+ dependencies:
+ "@types/parse-json" "^4.0.0"
+ import-fresh "^3.2.1"
+ parse-json "^5.0.0"
+ path-type "^4.0.0"
+ yaml "^1.10.0"
+
+cz-conventional-changelog@3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/cz-conventional-changelog/-/cz-conventional-changelog-3.2.0.tgz#6aef1f892d64113343d7e455529089ac9f20e477"
+ integrity sha512-yAYxeGpVi27hqIilG1nh4A9Bnx4J3Ov+eXy4koL3drrR+IO9GaWPsKjik20ht608Asqi8TQPf0mczhEeyAtMzg==
+ dependencies:
+ chalk "^2.4.1"
+ commitizen "^4.0.3"
+ conventional-commit-types "^3.0.0"
+ lodash.map "^4.5.1"
+ longest "^2.0.1"
+ word-wrap "^1.0.3"
+ optionalDependencies:
+ "@commitlint/load" ">6.1.1"
+
+cz-conventional-changelog@3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz#9246947c90404149b3fe2cf7ee91acad3b7d22d2"
+ integrity sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==
+ dependencies:
+ chalk "^2.4.1"
+ commitizen "^4.0.3"
+ conventional-commit-types "^3.0.0"
+ lodash.map "^4.5.1"
+ longest "^2.0.1"
+ word-wrap "^1.0.3"
+ optionalDependencies:
+ "@commitlint/load" ">6.1.1"
+
+debug@^2.2.0, debug@^2.3.3:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+ dependencies:
+ ms "2.0.0"
+
+decode-uri-component@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
+ integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
+
+dedent@0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
+ integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=
+
+define-property@^0.2.5:
+ version "0.2.5"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
+ integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=
+ dependencies:
+ is-descriptor "^0.1.0"
+
+define-property@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
+ integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY=
+ dependencies:
+ is-descriptor "^1.0.0"
+
+define-property@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
+ integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==
+ dependencies:
+ is-descriptor "^1.0.2"
+ isobject "^3.0.1"
+
+detect-file@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7"
+ integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=
+
+detect-indent@6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.0.0.tgz#0abd0f549f69fc6659a254fe96786186b6f528fd"
+ integrity sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA==
+
+error-ex@^1.3.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
+ integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
+ dependencies:
+ is-arrayish "^0.2.1"
+
+escape-string-regexp@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+ integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
+
+expand-brackets@^2.1.4:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
+ integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI=
+ dependencies:
+ debug "^2.3.3"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ posix-character-classes "^0.1.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+expand-tilde@^2.0.0, expand-tilde@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502"
+ integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=
+ dependencies:
+ homedir-polyfill "^1.0.1"
+
+extend-shallow@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
+ integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=
+ dependencies:
+ is-extendable "^0.1.0"
+
+extend-shallow@^3.0.0, extend-shallow@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
+ integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=
+ dependencies:
+ assign-symbols "^1.0.0"
+ is-extendable "^1.0.1"
+
+external-editor@^3.0.3:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
+ integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
+ dependencies:
+ chardet "^0.7.0"
+ iconv-lite "^0.4.24"
+ tmp "^0.0.33"
+
+extglob@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
+ integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==
+ dependencies:
+ array-unique "^0.3.2"
+ define-property "^1.0.0"
+ expand-brackets "^2.1.4"
+ extend-shallow "^2.0.1"
+ fragment-cache "^0.2.1"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+figures@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
+ integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=
+ dependencies:
+ escape-string-regexp "^1.0.5"
+
+fill-range@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
+ integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+ to-regex-range "^2.1.0"
+
+find-node-modules@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/find-node-modules/-/find-node-modules-2.0.0.tgz#5db1fb9e668a3d451db3d618cd167cdd59e41b69"
+ integrity sha512-8MWIBRgJi/WpjjfVXumjPKCtmQ10B+fjx6zmSA+770GMJirLhWIzg8l763rhjl9xaeaHbnxPNRQKq2mgMhr+aw==
+ dependencies:
+ findup-sync "^3.0.0"
+ merge "^1.2.1"
+
+find-root@1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4"
+ integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==
+
+findup-sync@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1"
+ integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==
+ dependencies:
+ detect-file "^1.0.0"
+ is-glob "^4.0.0"
+ micromatch "^3.0.4"
+ resolve-dir "^1.0.1"
+
+for-in@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
+ integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=
+
+fragment-cache@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
+ integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=
+ dependencies:
+ map-cache "^0.2.2"
+
+fs-extra@8.1.0:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
+ integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
+ dependencies:
+ graceful-fs "^4.2.0"
+ jsonfile "^4.0.0"
+ universalify "^0.1.0"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+ integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
+
+get-value@^2.0.3, get-value@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
+ integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=
+
+glob@7.1.4:
+ version "7.1.4"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
+ integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+global-dirs@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445"
+ integrity sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=
+ dependencies:
+ ini "^1.3.4"
+
+global-modules@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea"
+ integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==
+ dependencies:
+ global-prefix "^1.0.1"
+ is-windows "^1.0.1"
+ resolve-dir "^1.0.0"
+
+global-prefix@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe"
+ integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=
+ dependencies:
+ expand-tilde "^2.0.2"
+ homedir-polyfill "^1.0.1"
+ ini "^1.3.4"
+ is-windows "^1.0.1"
+ which "^1.2.14"
+
+graceful-fs@^4.1.6, graceful-fs@^4.2.0:
+ version "4.2.6"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
+ integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==
+
+has-flag@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
+ integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
+
+has-flag@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+ integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+
+has-value@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
+ integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=
+ dependencies:
+ get-value "^2.0.3"
+ has-values "^0.1.4"
+ isobject "^2.0.0"
+
+has-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
+ integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=
+ dependencies:
+ get-value "^2.0.6"
+ has-values "^1.0.0"
+ isobject "^3.0.0"
+
+has-values@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
+ integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E=
+
+has-values@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
+ integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=
+ dependencies:
+ is-number "^3.0.0"
+ kind-of "^4.0.0"
+
+homedir-polyfill@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8"
+ integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==
+ dependencies:
+ parse-passwd "^1.0.0"
+
+iconv-lite@^0.4.24:
+ version "0.4.24"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
+ integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3"
+
+import-fresh@^3.0.0, import-fresh@^3.2.1:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
+ integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==
+ dependencies:
+ parent-module "^1.0.0"
+ resolve-from "^4.0.0"
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+
+ini@^1.3.4:
+ version "1.3.8"
+ resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
+ integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
+
+inquirer@6.5.2:
+ version "6.5.2"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca"
+ integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==
+ dependencies:
+ ansi-escapes "^3.2.0"
+ chalk "^2.4.2"
+ cli-cursor "^2.1.0"
+ cli-width "^2.0.0"
+ external-editor "^3.0.3"
+ figures "^2.0.0"
+ lodash "^4.17.12"
+ mute-stream "0.0.7"
+ run-async "^2.2.0"
+ rxjs "^6.4.0"
+ string-width "^2.1.0"
+ strip-ansi "^5.1.0"
+ through "^2.3.6"
+
+is-accessor-descriptor@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
+ integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-accessor-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
+ integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-arrayish@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+ integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=
+
+is-buffer@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
+ integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
+
+is-data-descriptor@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
+ integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-data-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
+ integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-descriptor@^0.1.0:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
+ integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==
+ dependencies:
+ is-accessor-descriptor "^0.1.6"
+ is-data-descriptor "^0.1.4"
+ kind-of "^5.0.0"
+
+is-descriptor@^1.0.0, is-descriptor@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
+ integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==
+ dependencies:
+ is-accessor-descriptor "^1.0.0"
+ is-data-descriptor "^1.0.0"
+ kind-of "^6.0.2"
+
+is-extendable@^0.1.0, is-extendable@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+ integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=
+
+is-extendable@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
+ integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==
+ dependencies:
+ is-plain-object "^2.0.4"
+
+is-extglob@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+ integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+ integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
+
+is-glob@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
+ integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
+ dependencies:
+ is-extglob "^2.1.1"
+
+is-number@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
+ integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-plain-object@^2.0.3, is-plain-object@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
+ integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
+ dependencies:
+ isobject "^3.0.1"
+
+is-utf8@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
+ integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=
+
+is-windows@^1.0.1, is-windows@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
+ integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
+
+isarray@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+ integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+ integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
+
+isobject@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+ integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=
+ dependencies:
+ isarray "1.0.0"
+
+isobject@^3.0.0, isobject@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
+ integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
+
+js-tokens@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
+ integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+
+json-parse-even-better-errors@^2.3.0:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"
+ integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==
+
+jsonfile@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
+ integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
+kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+ integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
+ integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
+ integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==
+
+kind-of@^6.0.0, kind-of@^6.0.2:
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
+ integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
+
+lines-and-columns@^1.1.6:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
+ integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
+
+lodash.map@^4.5.1:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
+ integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=
+
+lodash@^4.17.12, lodash@^4.17.19, lodash@^4.17.20:
+ version "4.17.21"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
+ integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
+
+longest@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/longest/-/longest-2.0.1.tgz#781e183296aa94f6d4d916dc335d0d17aefa23f8"
+ integrity sha1-eB4YMpaqlPbU2RbcM10NF676I/g=
+
+map-cache@^0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
+ integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=
+
+map-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
+ integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=
+ dependencies:
+ object-visit "^1.0.0"
+
+merge@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145"
+ integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==
+
+micromatch@^3.0.4:
+ version "3.1.10"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
+ integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ braces "^2.3.1"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ extglob "^2.0.4"
+ fragment-cache "^0.2.1"
+ kind-of "^6.0.2"
+ nanomatch "^1.2.9"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.2"
+
+mimic-fn@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
+ integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==
+
+minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@1.2.5:
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
+ integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
+
+mixin-deep@^1.2.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
+ integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==
+ dependencies:
+ for-in "^1.0.2"
+ is-extendable "^1.0.1"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+ integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
+
+mute-stream@0.0.7:
+ version "0.0.7"
+ resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
+ integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
+
+nanomatch@^1.2.9:
+ version "1.2.13"
+ resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
+ integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ fragment-cache "^0.2.1"
+ is-windows "^1.0.2"
+ kind-of "^6.0.2"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+object-copy@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
+ integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw=
+ dependencies:
+ copy-descriptor "^0.1.0"
+ define-property "^0.2.5"
+ kind-of "^3.0.3"
+
+object-visit@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
+ integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=
+ dependencies:
+ isobject "^3.0.0"
+
+object.pick@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
+ integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=
+ dependencies:
+ isobject "^3.0.1"
+
+once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
+ dependencies:
+ wrappy "1"
+
+onetime@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
+ integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=
+ dependencies:
+ mimic-fn "^1.0.0"
+
+os-tmpdir@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+ integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
+
+parent-module@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
+ integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
+ dependencies:
+ callsites "^3.0.0"
+
+parse-json@^5.0.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd"
+ integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ error-ex "^1.3.1"
+ json-parse-even-better-errors "^2.3.0"
+ lines-and-columns "^1.1.6"
+
+parse-passwd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
+ integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=
+
+pascalcase@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
+ integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+ integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
+
+path-type@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
+ integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
+
+posix-character-classes@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
+ integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
+
+regex-not@^1.0.0, regex-not@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
+ integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==
+ dependencies:
+ extend-shallow "^3.0.2"
+ safe-regex "^1.1.0"
+
+repeat-element@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
+ integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==
+
+repeat-string@^1.6.1:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+ integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
+
+resolve-dir@^1.0.0, resolve-dir@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43"
+ integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=
+ dependencies:
+ expand-tilde "^2.0.0"
+ global-modules "^1.0.0"
+
+resolve-from@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
+ integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
+
+resolve-from@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
+ integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
+
+resolve-global@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-global/-/resolve-global-1.0.0.tgz#a2a79df4af2ca3f49bf77ef9ddacd322dad19255"
+ integrity sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==
+ dependencies:
+ global-dirs "^0.1.1"
+
+resolve-url@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
+ integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
+
+restore-cursor@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
+ integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368=
+ dependencies:
+ onetime "^2.0.0"
+ signal-exit "^3.0.2"
+
+ret@~0.1.10:
+ version "0.1.15"
+ resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
+ integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
+
+run-async@^2.2.0:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
+ integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==
+
+rxjs@^6.4.0:
+ version "6.6.6"
+ resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.6.tgz#14d8417aa5a07c5e633995b525e1e3c0dec03b70"
+ integrity sha512-/oTwee4N4iWzAMAL9xdGKjkEHmIwupR3oXbQjCKywF1BeFohswF3vZdogbmEF6pZkOsXTzWkrZszrWpQTByYVg==
+ dependencies:
+ tslib "^1.9.0"
+
+safe-regex@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
+ integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4=
+ dependencies:
+ ret "~0.1.10"
+
+"safer-buffer@>= 2.1.2 < 3":
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+ integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
+
+set-value@^2.0.0, set-value@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
+ integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-extendable "^0.1.1"
+ is-plain-object "^2.0.3"
+ split-string "^3.0.1"
+
+signal-exit@^3.0.2:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
+ integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
+
+snapdragon-node@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
+ integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==
+ dependencies:
+ define-property "^1.0.0"
+ isobject "^3.0.0"
+ snapdragon-util "^3.0.1"
+
+snapdragon-util@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
+ integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==
+ dependencies:
+ kind-of "^3.2.0"
+
+snapdragon@^0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
+ integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==
+ dependencies:
+ base "^0.11.1"
+ debug "^2.2.0"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ map-cache "^0.2.2"
+ source-map "^0.5.6"
+ source-map-resolve "^0.5.0"
+ use "^3.1.0"
+
+source-map-resolve@^0.5.0:
+ version "0.5.3"
+ resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
+ integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==
+ dependencies:
+ atob "^2.1.2"
+ decode-uri-component "^0.2.0"
+ resolve-url "^0.2.1"
+ source-map-url "^0.4.0"
+ urix "^0.1.0"
+
+source-map-url@^0.4.0:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56"
+ integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==
+
+source-map@^0.5.6:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+ integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
+
+split-string@^3.0.1, split-string@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
+ integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==
+ dependencies:
+ extend-shallow "^3.0.0"
+
+static-extend@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
+ integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=
+ dependencies:
+ define-property "^0.2.5"
+ object-copy "^0.1.0"
+
+string-width@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
+ integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
+ dependencies:
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^4.0.0"
+
+strip-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+ integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8=
+ dependencies:
+ ansi-regex "^3.0.0"
+
+strip-ansi@^5.1.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
+ integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
+ dependencies:
+ ansi-regex "^4.1.0"
+
+strip-bom@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878"
+ integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==
+
+strip-json-comments@3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7"
+ integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==
+
+supports-color@^5.3.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
+ integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
+ dependencies:
+ has-flag "^3.0.0"
+
+supports-color@^7.1.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
+ integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
+ dependencies:
+ has-flag "^4.0.0"
+
+through@^2.3.6:
+ version "2.3.8"
+ resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
+ integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
+
+tmp@^0.0.33:
+ version "0.0.33"
+ resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
+ integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
+ dependencies:
+ os-tmpdir "~1.0.2"
+
+to-object-path@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
+ integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=
+ dependencies:
+ kind-of "^3.0.2"
+
+to-regex-range@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
+ integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=
+ dependencies:
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+
+to-regex@^3.0.1, to-regex@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
+ integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==
+ dependencies:
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ regex-not "^1.0.2"
+ safe-regex "^1.1.0"
+
+tslib@^1.9.0:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
+ integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
+
+union-value@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"
+ integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==
+ dependencies:
+ arr-union "^3.1.0"
+ get-value "^2.0.6"
+ is-extendable "^0.1.1"
+ set-value "^2.0.1"
+
+universalify@^0.1.0:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
+ integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
+
+unset-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
+ integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=
+ dependencies:
+ has-value "^0.3.1"
+ isobject "^3.0.0"
+
+urix@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
+ integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
+
+use@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
+ integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
+
+which@^1.2.14:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
+ integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
+ dependencies:
+ isexe "^2.0.0"
+
+word-wrap@^1.0.3:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
+ integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
+
+yaml@^1.10.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e"
+ integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==