|
![](/i/fill.gif) |
Invisible wrote:
> Haskell really is a PITA to parse. I mean, think about it:
> - Whitespace is significant. (No context-free parsing here!)
I don't think "context-free" means what you think it means. Whitespace being
significant isn't "context".
> - There are arbitrary user-defined operators, which arbitrary precedence
> and associativity.
But they have to be defined by the user before you use them, so that doesn't
seem hard. Most parsers with more than half a dozen operators (I'm looking
at you, C) have tables defining the precedence and associativity anyway.
> compared to, say, Pascal or C.)
Try Ada.
> Even so, when a user can define an operator like *&*#*|* and set it to
> any precedence or associativity, it's not so easy to produce a parse
> tree...
I think maybe you're doing it wrong.
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
![](/i/fill.gif) |