|
 |
>> 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".
Indentation is significant. To parse the next line, you must know how
far the current line was indented. Hence, "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.
No, they can be used *before* they're defined. And they can be defined
in a completely seperate source file too. Which makes me wonder how it's
possible to parse an individual file at all... you'd need to potentially
parse every module it imports to work out the operator precedences!
>> 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.
Heh, *maybe*?
Hey, it's *me* we're talking about there. Of *course* I'm doing to wrong!
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |