POV-Ray : Newsgroups : povray.general : New SDL: support for lexical scanner generators : Re: New SDL: support for lexical scanner generators Server Time
31 Jul 2024 12:21:37 EDT (-0400)
  Re: New SDL: support for lexical scanner generators  
From: Wolf
Date: 5 Oct 2007 03:45:01
Message: <web.4705eade84df9986edd244720@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:

> What the current POV calls "parsing" isn't what things like ANTLR do.
> "Parsing" (in the non-POV sense) means building a data structure
> isomorphic to the input source code. "Parsing" in the POV sense includes
> things like executing the while loops, while in the ANTLR sense it does
> not. So with a parser generator, you'd have three phases: parsing
> (fast), evaluating (putting together all the objects in the scene), then
> rendering (calculating pixel colors).

My point above was mainly concerned with how *OTHER* tools can *VALIDATE*
any given SDL code, not with how POV-ray will parse a SDL.
In my example I need a lexer for PovClipse telling me what's wrong with a
given SDL. I do not need to care about how POV-ray will internally
implement the step between the SDL token recognition and building the
internal data structure.
All I need to know is:
* is the SDL valid
* if not, where are the errors (missing braces, semicolons, misspellings...)

In order to archive this the best thing to have is a complete,
programmatically usable sytactical grammar description which you can easily
feed into tools like ANTLR.
And in my opinion the one providing such a grammar description should be the
one implementing it, thus POV-ray.

- Wolf


Post a reply to this message

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