Hello,

Does anybody have any insights on the relative merits of using
precedence values versus explicit precedence encoding using a larger
number of rules. To make the latter more concrete, take this excerpt
from the Python grammar description at 
http://www.python.org/doc/2.5.2/ref/grammar.txt:

power ::= primary ["**" u_expr]

u_expr ::= power | "-" u_expr | "+" u_expr | "\~" u_expr

m_expr ::= u_expr
              | m_expr "*" u_expr
              | m_expr "//" u_expr
              | m_expr "/" u_expr
              | m_expr "\%" u_expr

a_expr ::= m_expr | a_expr "+" m_expr | a_expr "-" m_expr

shift_expr ::= a_expr | shift_expr ( "<<" | ">>" ) a_expr

Thanks in advance,
Paul

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