|
![](/i/fill.gif) |
Nieminen Juha wrote:
> You still have to parse the entire code to see where is the matching
> semicolon.
> There's no way to avoid parsing other than copying the whole source code
> to memory without the static parts of it and then parse this copy.
How about considering #static as an alternative to #include?
There would be two acceptable forms the parser would expect...
#static /filename/
or
#static (/filename/,/start/,/end/)
If the former was encountered, POV would parse the include file
indicated by "filename" once on the first frame rendered, then just
retain it until all frames were completed.
For the latter syntax, it would behave exactly like #include until
frame # "start" was reached, then parse one more time and hold until
either frame # "end" was reached, or all the specified frames were
completed (whichever comes first, depending on the INI file options
selected). If more frames than "end" are rendered, just go back to
considering it identical to saying #include after the last rendered
frame.
This way, if the static section does not need reparsing, POV need
only read a single line to discover this and move on. And of course,
it leaves responsibility for deciding what should be static firmly
on the shoulders of the user, where it belongs.
Charles
--
http://www.enter.net/~cfusner
"...Then darkness took me, and I strayed out of thought and time,
and I wandered far on roads that I will not tell..."
-The Two Towers, JRR Tolkien
Post a reply to this message
|
![](/i/fill.gif) |