def p_defsection(p):
 p.lexer.lastsection = 1
 print 'tokens = ', repr(tokenlist)
 print
 print 'precedence = ', repr(preclist)
 print
 print '# -------------- RULES ----------------'
 print

def p_defsection ( p ) : p . lexer . lastsection = 1 print 'tokens = ' , repr ( tokenlist ) print print 'precedence = ' , repr ( preclist ) print print '# -------------- RULES ----------------' print
defsection : definitions section | section .