Commit acd32316 authored by Fabrice Salvaire's avatar Fabrice Salvaire

cleanup

parent b35f27c1
......@@ -78,10 +78,12 @@ class GcodeLexer:
'TANGENT',
'TIMES',
# 'LETTER',
'A', 'B', 'C', 'D',
'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'P', 'Q', 'R', 'S', 'T',
'X', 'Y', 'Z',
'N',
'POSITIVE_INTEGER',
'POSITIVE_REAL',
......@@ -121,6 +123,9 @@ class GcodeLexer:
t_TANGENT = r'tan'
t_TIMES = r'\*'
# clash with acos ... ???
# t_LETTER = r'(' + '|'.join('abcd' + 'fghijklm' + 'pqrst' + 'xyz') + ')'
t_A = r'a'
T_B = r'b'
t_C = r'c'
......@@ -134,7 +139,6 @@ class GcodeLexer:
t_K = r'k'
t_L = r'l'
t_M = r'm'
t_N = r'n'
t_P = r'p'
t_Q = r'q'
......@@ -146,6 +150,8 @@ class GcodeLexer:
t_Y = r'y'
t_Z = r'z'
t_N = r'n'
# def t_POSITIVE_INTEGER(self, t):
# r'\d+'
# t.value = int(t.value)
......
......@@ -174,6 +174,7 @@ class GcodeParser:
p[0] = Ast.Word(p[1], p[2])
def p_mid_line_letter(self, p):
# LETTER
'''mid_line_letter : A
| B
| C
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment