Luke Palmer <[EMAIL PROTECTED]> wrote: > > Not necessarily. <~ will necessarily need to be right-associative, > while ~> left, however.
Not sure if you aren't getting this backwards, but anyway I often find myself confused with right and left. > It would be logical to give them the same > precedence, except for the opposite associativity thing, where parsers > get different results based on their parse method. So different > precedences would be good only to ensure that different parsers saw > the same thing. Actually I don't think you can define a grammar where two operators have the same precedence but different associativity. Be it a pure BNF grammar, or a classical yacc specification (using the %left and %right declarations).