POV-Ray : Newsgroups : povray.general : POV-Ray SDL keyword list : Re: POV-Ray SDL keyword list Server Time
5 Aug 2024 10:18:02 EDT (-0400)
  Re: POV-Ray SDL keyword list  
From: Robert Chaffe
Date: 1 Oct 2002 23:12:40
Message: <3d9a6428@news.povray.org>
"Philippe Lhoste" <Phi### [at] GMXnet> wrote in message
news:Xns### [at] 204213191226...
> I have built a list of POV-Ray keywords, the first step toward a Scintilla
> lexer.
> I have done it manually, reading carefully the official Quick Reference
and
> typing all keywords I found, trying to classify them by use, removing
> duplicates.
> Then I flattened the file (one keyword per line), sorted it and removed
> forgotten duplicates.
> Now the fun part: I wrote a small Lua script to parse Chaffe's quick
> reference (excellent work, very nice and clear).

Your welcome!

> My script extracted from
> the HTML file all words in bold (between <b> and </b>).
> After cleaning, I compared both files side by side in Excel.
>
> It seems I was careful enough, with only one keyword forgotten.

Keep in mind, however, that I left out of the Quick Reference some obsolete
but still acceptable syntax.  For example, the "tiles" texture and the blob
"component".

>  [snip]

I also had an idea to create a lexer and parser, using ANTLR.  Thought I
could do it until I realised that several language directives could appear
just about anywhere, even within float expressions.  Even if one wants to
attempt the evaluation of conditional expressions and the expansion of
macros in the parser or lexer itself, defining a grammar for POV-Ray is not
a trivial task.

--
Robert Chaffe
http://www.donovansweb.com/~chaffe/


Post a reply to this message

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