|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> 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
|
![](/i/fill.gif) |