Slafs ha scritto:
Hi ALL!
I have to write in yacc an acceptor of files with lines matching this
regexp:
'[0-9],[0-9]'
and I don't know what I am doing wrong beacuse this:
tokens = (
'NUMBER',
)
literals = [',']
t_NUMBER = r'\d'
...
def p_statement_exp(p):
'''statement :
Hi ALL!
I have to write in yacc an acceptor of files with lines matching this
regexp:
'[0-9],[0-9]'
and I don't know what I am doing wrong beacuse this:
tokens = (
'NUMBER',
)
literals = [',']
t_NUMBER = r'\d'
...
def p_statement_exp(p):
'''statement : NUMBER ',' NUMBER