I did some checking and there is indeed a bug in ply-2.5.     In practice, this 
bug is unlikely to affect most users since it pertains to a relatively obscure 
feature.  
However, I have made a fix and added a unit test for it in the PLY subversion 
repository.    If you check out the most recent version, it should be fixed.

On the subject of bug fixes, I would like to put out a new PLY release by the 
end of the year.  So, if anyone has any bug fixes or suggestions for 
improvement, please 
let me know.   Normally I would have done this earlier, but I've been a little 
sidetracked working on the 4th edition of the Python Essential Reference book 
(shameless 
plug :-).

Cheers,
Dave


On Tue 04/11/08  9:56 AM , David Beazley [EMAIL PROTECTED] sent:
> 
> 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 apwat
> [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> -hac
> [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 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