> Can you explain what 'empty' is?
>
> The usual way to write optional rules is
>
> X_opt :
> | X
>
> In this situation, 'p[0] = p[1]' will fail in the case of the empty
> alternative.
>
'empty' is the construct defined as:
def p_empty(self, p):
'empty : '
p[0] = None
It's recommended for use by Dave in the PLY documentation.
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
-~----------~----~----~----~------~----~------~--~---