POV-Ray : Newsgroups : povray.off-topic : Pointless but satisfying : Re: Pointless but satisfying Server Time
5 Sep 2024 13:13:05 EDT (-0400)
  Re: Pointless but satisfying  
From: Orchid XP v8
Date: 17 Jul 2009 13:06:19
Message: <4a60af8b@news.povray.org>
>> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.