aboutsummaryrefslogtreecommitdiff
path: root/compilador/parse
diff options
context:
space:
mode:
Diffstat (limited to 'compilador/parse')
-rw-r--r--compilador/parse/base.py18
-rw-r--r--compilador/parse/decl.py16
-rw-r--r--compilador/parse/expr.py16
-rw-r--r--compilador/parse/ident.py17
-rw-r--r--compilador/parse/type.py16
-rw-r--r--compilador/parse/unit.py17
6 files changed, 97 insertions, 3 deletions
diff --git a/compilador/parse/base.py b/compilador/parse/base.py
index bf9277d..356064c 100644
--- a/compilador/parse/base.py
+++ b/compilador/parse/base.py
@@ -1,3 +1,19 @@
+#!/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2022 Iván Alejandro Ávalos Díaz <avalos@disroot.org>
+# Edgar Alexis López Martínez <edgarmlmp@gmail.com>
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
from enum import Enum
from tabla import LexToken, TablaLex, tokens
from arbol import Arbol, Nodo
@@ -65,6 +81,6 @@ class BaseParser:
'''Returns a syntax error if cond is false and void
otherwise.
- '''
+ '''<
if not cond:
return Error(msg = msg, numlinea = numlinea)
diff --git a/compilador/parse/decl.py b/compilador/parse/decl.py
index aa9e23a..d109629 100644
--- a/compilador/parse/decl.py
+++ b/compilador/parse/decl.py
@@ -1,3 +1,19 @@
+#!/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2022 Iván Alejandro Ávalos Díaz <avalos@disroot.org>
+# Edgar Alexis López Martínez <edgarmlmp@gmail.com>
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
from typing import List, cast, Optional
from more_itertools import peekable
diff --git a/compilador/parse/expr.py b/compilador/parse/expr.py
index 2401f30..f6527bd 100644
--- a/compilador/parse/expr.py
+++ b/compilador/parse/expr.py
@@ -1,3 +1,19 @@
+#!/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2022 Iván Alejandro Ávalos Díaz <avalos@disroot.org>
+# Edgar Alexis López Martínez <edgarmlmp@gmail.com>
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
from typing import NoReturn, Optional, cast
from tabla import Token, LexToken
diff --git a/compilador/parse/ident.py b/compilador/parse/ident.py
index 5887fa2..1853cb9 100644
--- a/compilador/parse/ident.py
+++ b/compilador/parse/ident.py
@@ -1,4 +1,19 @@
-
+#!/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2022 Iván Alejandro Ávalos Díaz <avalos@disroot.org>
+# Edgar Alexis López Martínez <edgarmlmp@gmail.com>
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
from tabla import Token, LexToken
from parse.base import BaseParser
from astree.ident import Ident
diff --git a/compilador/parse/type.py b/compilador/parse/type.py
index 1fd0957..b32397d 100644
--- a/compilador/parse/type.py
+++ b/compilador/parse/type.py
@@ -1,3 +1,19 @@
+#!/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2022 Iván Alejandro Ávalos Díaz <avalos@disroot.org>
+# Edgar Alexis López Martínez <edgarmlmp@gmail.com>
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
from typing import List
from parse.base import BaseParser
diff --git a/compilador/parse/unit.py b/compilador/parse/unit.py
index 954b8b4..07fb5fa 100644
--- a/compilador/parse/unit.py
+++ b/compilador/parse/unit.py
@@ -1,4 +1,19 @@
-
+#!/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2022 Iván Alejandro Ávalos Díaz <avalos@disroot.org>
+# Edgar Alexis López Martínez <edgarmlmp@gmail.com>
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
from errors import Error
from astree.unit import Unit
from parse.base import BaseParser