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
    '''
    print "OK!"
    sys.exit()
-------

also accepts lines like 2,abcdef3 which of
could someone please tell me what's wrong in my code?

full source on http://paste-it.net/public/vba22d5/
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to