|
|
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
|
|