# Modifications for inclusion in PLY distribution
from copy import copy
from ply import lex
-from soc.decoder.selectable_int import SelectableInt
+from openpower.decoder.selectable_int import SelectableInt
# I implemented INDENT / DEDENT generation as a post-processing filter
#t_NUMBER = r'\d+'
# taken from decmial.py but without the leading sign
def t_NUMBER(self, t):
- r"""(\d+(\.\d*)?|\.\d+)([eE][-+]? \d+)?"""
+ r"""[-]?(\d+(\.\d*)?|\.\d+)([eE][-+]? \d+)?"""
t.value = int(t.value)
return t