Benedikt Huber wrote:
> There is an easy, better solution, modifying the lexer:
>
> > lexer = makeTokenParser $ emptyDef
> > { L.reservedOpNames = words "&& || & | ^" }
> > reservedOp = P.reservedOp lexer
> > identifier = P.identifier lexer
> > ...
>
> I'd try to avoid 'try', if possible.
Hi Benedikt,
I did try that (reservedOpNames as a list of operators as strings)
but that interferred rather badly with another part of the parser
which handles raw inline XML like this (yes, utterly horrid):
var xdata = <xml>sucks</xml> ;
Because I had the XML parsing working when I hit the operator precedence
problem I worked towards a solution that didn't break the XML rather
than do the right thing to fix the operator precedence and then have to
fix the XML part.
Erik
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"how am I expected to quit smoking if I have to deal with NT
every day" -- Ben Raia
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe