The calculator example in the "example/calc" directory has a unary minus operator. The PLY documentation also discusses this case (section 6.6).
-Dave On Mar 22, 2009, at 2:12 PM, HD wrote: > > Does anyone have any suggestions on how to implement both the binary > minus operator like "5-3=2" and the unary sign minus like "3-5= -2" ? > Need help to do this in PLY lexer/parser, PLEAAAASE!!!!! > > thx > HD > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
