Hmmm.   I'm don't know off the top of my head why there would be a difference, 
but I'll definitely check into it along with a few other thing for the PLY-2.6 
release.

Cheers,
Dave


On Tue 04/11/08  7:05 AM , apwaters [EMAIL PROTECTED] sent:
> 
> In attempting to upgrade from version 2.3 to 2.5 of Ply I found a
> difference which does not seem to be mentioned in the documentation.
> 
> Running the code below produces a different answer on 2.3 and 2.5. On
> 2.3 it prints A, on 2.5 it prints B. Reading the documentation implies
> that 2.3 is correct and 2.5 is wrong.
> 
> from ply import lex, yacc
> 
> t_A = 'A'
> t_B = 'B'
> t_C = 'C'
> 
> tokens = ('A', 'B', 'C')
> 
> the_lexer = lex.lex()
> 
> def p_start(t):
> '''start : A nest C'''
> 
> def p_nest(t):
> '''nest : B'''
> print t[-1]
> 
> the_parser = yacc.yacc(debug = False, write_tables = False)
> 
> the_parser.parse('ABC', the_lexer)
> 
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups
> "ply-hack" group.To post to this group, send email to ply
> [EMAIL PROTECTED] unsubscribe from this group, send email to ply-hack+
> [EMAIL PROTECTED] more options, visit this group at 
> http://groups.google.com/group/ply-hack?hl=en-~----------~----~----~----~------
~----~------~--~---
> 
> 
> 
> 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ply-hack" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/ply-hack?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to