Open
Description
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
For parser.py
:
- line 1266
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))
- line 1281
def p_unsizednumber(self, p):
'unsizednumber : UNSIZEDNUMBER'
p[0] = p[1]
p.set_lineno(0, p.lineno(1))
- line 1498
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
:
- line 267
class UnsizedConst(Constant):
pass
Metadata
Metadata
Assignees
Labels
No labels