varphi-devkit 1.3.0__tar.gz → 1.4.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.3.0
3
+ Version: 1.4.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.3.0"
3
+ version = "1.4.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"}
@@ -88,7 +88,13 @@ class VarphiCompiler(VarphiListener, ABC):
88
88
  logging.debug("Then character: %s", then_character)
89
89
  then_direction = VarphiHeadDirection(ctx.HEAD_DIRECTION().getText())
90
90
  logging.debug("Then direction: %s", then_direction)
91
- line = VarphiLine(if_state, tape_character, then_state, then_character, then_direction)
91
+ line_number_in_source = ctx.start.line
92
+ line = VarphiLine(if_state,
93
+ tape_character,
94
+ then_state,
95
+ then_character,
96
+ then_direction,
97
+ line_number_in_source)
92
98
  logging.debug("Delegating to handleLine() helper method")
93
99
  self.handle_line(line)
94
100
 
@@ -45,9 +45,11 @@ class VarphiLine:
45
45
  then_state: next state
46
46
  then_character: character to write
47
47
  then_direction: direction to move the head
48
+ line_number_in_source: the corresponding line number in the original source Varphi program
48
49
  """
49
50
  if_state: str
50
51
  if_character: VarphiTapeCharacter
51
52
  then_state: str
52
53
  then_character: VarphiTapeCharacter
53
54
  then_direction: VarphiHeadDirection
55
+ line_number_in_source: int
File without changes
File without changes