POV-Ray : Newsgroups : povray.off-topic : Pointless but satisfying : Re: Pointless but satisfying Server Time
5 Sep 2024 13:14:30 EDT (-0400)
  Re: Pointless but satisfying  
From: Darren New
Date: 17 Jul 2009 11:39:07
Message: <4a609b1b$1@news.povray.org>
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

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