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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: varphi-devkit
3
- Version: 1.4.0
3
+ Version: 1.5.0
4
4
  Summary: A Python framework for creating compilers that target the Varphi language
5
5
  License: BSD-3-Clause
6
6
  Keywords: compiler,turing-machine,dsl,antlr,parser
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "varphi-devkit"
3
- version = "1.4.0"
3
+ version = "1.5.0"
4
4
  description = "A Python framework for creating compilers that target the Varphi language"
5
5
  authors = [
6
6
  {name = "Hassan El-Sheikha",email = "hmelsheikha@gmail.com"}
@@ -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