varphi-devkit 1.4.0__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/PKG-INFO +1 -1
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/pyproject.toml +1 -1
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/src/varphi_devkit/compilation.py +0 -12
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/LICENSE +0 -0
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/README.md +0 -0
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/src/varphi_devkit/__init__.py +0 -0
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/src/varphi_devkit/model.py +0 -0
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/src/varphi_devkit/syntax/Varphi.g4 +0 -0
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/src/varphi_devkit/syntax/__init__.py +0 -0
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/src/varphi_devkit/syntax/antlr/VarphiLexer.py +0 -0
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/src/varphi_devkit/syntax/antlr/VarphiListener.py +0 -0
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/src/varphi_devkit/syntax/antlr/VarphiParser.py +0 -0
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/src/varphi_devkit/syntax/antlr/__init__.py +0 -0
- {varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/src/varphi_devkit/syntax/error_listener.py +0 -0
|
@@ -21,7 +21,6 @@ Functions:
|
|
|
21
21
|
compile: Parses a Varphi program and compiles it using the provided compiler.
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
|
-
import logging
|
|
25
24
|
from abc import ABC, abstractmethod
|
|
26
25
|
|
|
27
26
|
from antlr4 import InputStream, CommonTokenStream, ParseTreeWalker
|
|
@@ -33,10 +32,6 @@ from .syntax.error_listener import VarphiSyntaxErrorListener
|
|
|
33
32
|
from .model import VarphiTapeCharacter, VarphiHeadDirection, VarphiLine
|
|
34
33
|
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
logger = logging.getLogger(__name__)
|
|
38
|
-
|
|
39
|
-
|
|
40
35
|
class VarphiCompiler(VarphiListener, ABC):
|
|
41
36
|
"""Abstract base class for compiling Varphi programs into target languages.
|
|
42
37
|
|
|
@@ -77,17 +72,11 @@ class VarphiCompiler(VarphiListener, ABC):
|
|
|
77
72
|
Args:
|
|
78
73
|
ctx: The ANTLR parser context for the line rule
|
|
79
74
|
"""
|
|
80
|
-
logging.debug("Entering line %s", ctx.start.line)
|
|
81
75
|
if_state = str(ctx.STATE(0).getText())
|
|
82
|
-
logging.debug("If state: %s", if_state)
|
|
83
76
|
tape_character = VarphiTapeCharacter(ctx.TAPE_CHARACTER(0).getText())
|
|
84
|
-
logging.debug("Tape character: %s", tape_character)
|
|
85
77
|
then_state = str(ctx.STATE(1).getText())
|
|
86
|
-
logging.debug("Then state: %s", then_state)
|
|
87
78
|
then_character = VarphiTapeCharacter(ctx.TAPE_CHARACTER(1).getText())
|
|
88
|
-
logging.debug("Then character: %s", then_character)
|
|
89
79
|
then_direction = VarphiHeadDirection(ctx.HEAD_DIRECTION().getText())
|
|
90
|
-
logging.debug("Then direction: %s", then_direction)
|
|
91
80
|
line_number_in_source = ctx.start.line
|
|
92
81
|
line = VarphiLine(if_state,
|
|
93
82
|
tape_character,
|
|
@@ -95,7 +84,6 @@ class VarphiCompiler(VarphiListener, ABC):
|
|
|
95
84
|
then_character,
|
|
96
85
|
then_direction,
|
|
97
86
|
line_number_in_source)
|
|
98
|
-
logging.debug("Delegating to handleLine() helper method")
|
|
99
87
|
self.handle_line(line)
|
|
100
88
|
|
|
101
89
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{varphi_devkit-1.4.0 → varphi_devkit-1.5.0}/src/varphi_devkit/syntax/antlr/VarphiListener.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|