You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the same problem as issue #116
However, I was able to fix the problem by adding a new type of number with the provided structure.
Already made a comment on said issue, but making a new one for visibility.
You can edit lexer.py, parser.py, ast.py using already existing structures.
For lexer,py:
Add at line 89 within tokens = keywords + operators + () 'UNSIZEDNUMBER',
line 184 unsized_number = '\'[0-1xXzZ?]'
line 218 @TOKEN(unsized_number) def t_UNSIZEDNUMBER(self, t): return t
I had the same problem as issue #116
However, I was able to fix the problem by adding a new type of number with the provided structure.
Already made a comment on said issue, but making a new one for visibility.
You can edit lexer.py, parser.py, ast.py using already existing structures.
For
lexer,py
:tokens = keywords + operators + ()
'UNSIZEDNUMBER',
unsized_number = '\'[0-1xXzZ?]'
@TOKEN(unsized_number)
def t_UNSIZEDNUMBER(self, t):
return t
For
parser.py
:def p_const_expression_unsizednum(self, p):
'const_expression : unsizednumber'
p[0] = UnsizedConst(p[1], lineno=p.lineno(1))
p.set_lineno(0, p.lineno(1))
def p_unsizednumber(self, p):
'unsizednumber : UNSIZEDNUMBER'
p[0] = p[1]
p.set_lineno(0, p.lineno(1))
def p_delays_unsizednumber(self, p):
'delays : DELAY unsizednumber'
p[0] = DelayStatement(UnsizedConst(
p[2], lineno=p.lineno(1)), lineno=p.lineno(1))
p.set_lineno(0, p.lineno(1))
For
ast.py
:class UnsizedConst(Constant):
pass
The text was updated successfully, but these errors were encountered: