|
![](/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
>
>
That's impossible to do with the current SDL syntax. Abusing macros and
loops you could make the syntax change from valid to invalid depending
on what frame number you're rendering. And the only way to test that is
interpreting the whole scene code with the current parameters, which
could very well take hours on some scenes with built-in physics
simulations :)
Post a reply to this message
|
![](/i/fill.gif) |