|
![](/i/fill.gif) |
Chris Huff wrote:
>
> Are there any tutorials or other sources of information on the POV-Ray
> source yet? Like how to add a keyword, or explanations of the
> structure of the source?
Not that I know of, though I've learned a little bit from working with
it in the few days I've had the source code myself.
To add a keyword, you must do the following:
- Add a token in TOKENIZE.C and PARSE.H, along with the other tokens;
make sure it goes in the same place in both arrays.
- Add something in one of the Parse_suchandsuch() functions to recognize
your keyword; there, do any secondary parsing you need, or else
create a new Parse routine to handle it. (Look through PARSE.C and
the Superpatch's F_EXPR.C to see what I mean.)
That's all I've learned so far. Not enough for me to create a new
primitive by any means, yet; in fact, I haven't created any new tokens
at all, though I've been tempted.
Lummox JR
Post a reply to this message
|
![](/i/fill.gif) |