POV-Ray : Newsgroups : povray.programming : POV-Ray parser in Java : Re: POV-Ray parser in Java Server Time
6 Oct 2024 13:20:05 EDT (-0400)
  Re: POV-Ray parser in Java  
From: Fidel viegas
Date: 7 Jan 2003 18:06:57
Message: <BA410C8C.8D7C%fidel.viegas@artrecognition.co.uk>
in article 3dee76e1@news.povray.org, Andrew Wilcox at awi### [at] unpuzzledcom
wrote on 4/12/02 9:43 pm:

> Maybe I should reclarify.  I don't think actually fully parsing the scene is
> feasible anytime soon, especially with functions, but building a parse tree
> is.  Which would allow for manipulation of the scene language itself.  This
> could then be rewritten and let POV actually do the full parse to generate
> the scene.  I can't think of a good reason for actually evaluating the
> scene.
> 
> AW

Hi Andrew, are you writing the parser by hand? If yes, then you should have
a look at either JFlex and CUP (java equivalent to flex and bison), SableCC
(which generates the parse tree for you) or ANTLR (which allow you to define
tree walkers as well as parsers and scanners). SableCC you can download it
from www.sablecc.org. ANTLR you can download it from www.antlr.org, JFlex
you can download it from www.jflex.de and CUP you can download it from
http://www.cs.princeton.edu/~appel/modern/java/CUP/.

Try SableCC as it is very easy to use.

All the best

Fidel.


Post a reply to this message

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