|
![](/i/fill.gif) |
In article <3e1d1b30@news.povray.org> , "Vadim Sytnikov" <syt### [at] ru com>
wrote:
> Now it is I that have to say that your statement is too bold without trying
> to express POV-Ray's grammar in yacc. Did you do that? I have to admit that
I know yacc and I know the POV-Ray grammar. That is enough for me to not
try it myself.
> I disagree. My point is that (i) POV-Ray's SDL structure is very linear
<snip>
> languages with far fewer nmbers of keywords enjoy (e.g. C/C++).
I agree with you that POV-Ray is different from programming languages in
this regard.
> The golden mean between your and my approaches would probably to make an
> FSM-based POV SDL scanner (which *would* make difefrence, I swear) but leave
> parser intact.
You should really profile the code. Then you would find that the matching
of keywords isn't the bottleneck at all. The simple way of reading from
file is the real problem. Make the fgetc and ungetc ten times faster and
you end up with a much faster parser.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
![](/i/fill.gif) |