troy d. straszheim wrote:
> @production('stmt : identifier ASSIGN expr')
> def f(p):
>      p[0] = Node('assign', children=[p[1], p[3]])
>
> @production('expr : term')
> def f(p):
>      p[0] = Node('expr',children=[p[1]])
>   
Perhaps ply should skip the docstrings in .py files altogether and just 
do what lex and yacc did:

stmt : identifier ASSIGN expr      : p[0] = Node('assign', 
children=[p[1], p[3]]
expr : term                        : p[0] = Node('expr', children=[p[1]]

It ends up being a lot more concise!


-bruce

--~--~---------~--~----~------------~-------~--~----~
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