POV-Ray : Newsgroups : povray.programming : POV-Ray parser : Re: POV-Ray parser Server Time
14 Jun 2024 06:15:05 EDT (-0400)
  Re: POV-Ray parser  
From: Alessandro Coppo
Date: 7 May 2005 10:56:47
Message: <427cd72f$1@news.povray.org>
Daniel Hulme wrote:
> Someone has just asked me why the POV-Ray parser is written the way it
> is rather than using a standard lexer-/parser-generator. I was unable to
> give a useful answer. OOC, does anyone know, or is it just one of those
> things that made sense at the time for reasons lost in the mists of
> eternity?
> 
> Daniel
> 
Remember that, when you are skilled, you write a top-down parser right 
from the BNF grammar; the technique is to write 1 procedure for each BNF 
production, so there is a 1-1 correspondence between BNF and code.

The resulting parser is, from my experiece, very easily maintanable 
without the skills you need when you use lex/yacc like tools.

Bye!!!

Alessandro Coppo


Post a reply to this message

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