POV-Ray : Newsgroups : povray.programming : POV-Ray parser in Java : Re: POV-Ray parser in Java Server Time
21 Jul 2024 04:21:10 EDT (-0400)
  Re: POV-Ray parser in Java  
From: Thorsten Froehlich
Date: 9 Jan 2003 04:12:12
Message: <3e1d3cec$1@news.povray.org>
In article <3e1d1b30@news.povray.org> , "Vadim Sytnikov" <syt### [at] rucom>
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] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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