Hello, If you add TOKEN* (0 or more) and TOKEN? (0 or 1), you could also add TOKEN+ (1 or more). Furthermore, brackets would be nice. For instance: (A B)* would be 0 or more times 'A followed by B'.
Dennis eliben wrote: > >David Beazley wrote: > > >>I haven't really spent much time thinking about this, but the >>PLY-3.0 release might make it significantly easier to explore >>such possibilities--namely because I refactored the yacc >>internals to make different parts of it more self-contained. >>It might be possible to build this kind of functionality into >>an intermediate step. >> >>I suppose one could revisit the question of rules that allow >>repeats (e.g., TOKEN*) as well. Hmmm. Interesting. >> >> >> > >Of course, repetition is the next logical step. It can return a list >of subproductions (i.e. p[N] where N is the index of a subproduction >with * is a list of length 0, 1 or more). > >This together with ? would considerably reduce the amount of >boilerplate code currently required for complex PLY grammars. > >Eli > >> > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
