|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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?
Although I know if nothing currently available Chris Yound did mention
the following in his public message "Plans for Pov v3.1 and Beyond".
1) I will be writing an official technical document that describes the
POV-Ray language from a parser-writer's point of view. It will include a
grammar specification using the syntax notation in our reference docs. It
should be helpful to anyone who wants to implement their own parser.
When he plans to release this to the public I cannot say but it should
prove a useful resource once completed.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>1) I will be writing an official technical document that describes the
POV-Ray language from a parser-writer's point of view. It will include
a
grammar specification using the syntax notation in our reference docs.
It
should be helpful to anyone who wants to implement their own parser.<
That would be useful(although I hate that method of specification, I can
use it.). But what I really need is an explanation of the program source
code, not the scene description language.(There seem to be many
commented forms in the source to describe the various functions, but
most of them are empty!)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In <377### [at] compuservecom>, Chris Huff
<Chr### [at] compuservecom> wrote:
>use it.). But what I really need is an explanation of the program source
>code, not the scene description language.(There seem to be many
>commented forms in the source to describe the various functions, but
>most of them are empty!)
I'd recommend going to Ron Parker's web page at
http://www2.fwi.com/~parkerr/traces.html and download his "object bounds"
patch. It is one of the simplest patches I've seen (and also the most
useful for my work); once you've figured out how to install that, you
should have an idea of how to make another simple source patch.
Jerry
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 23 Jun 1999 14:12:31 -0700, Jerry wrote:
>In <377### [at] compuservecom>, Chris Huff
><Chr### [at] compuservecom> wrote:
>>use it.). But what I really need is an explanation of the program source
>>code, not the scene description language.(There seem to be many
>>commented forms in the source to describe the various functions, but
>>most of them are empty!)
>
>I'd recommend going to Ron Parker's web page at
>http://www2.fwi.com/~parkerr/traces.html and download his "object bounds"
>patch. It is one of the simplest patches I've seen (and also the most
>useful for my work); once you've figured out how to install that, you
>should have an idea of how to make another simple source patch.
It's fine as an example of modifying the tokenizer and the expression
parser, but it doesn't shed much light on the parser in general, or on
the hows and whys of adding textures and objects.
It's also a 3.0-only patch, so it's not even the state of the art (adding
tokens in 3.1 is much simpler.)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <37714ffb@news.povray.org>, par### [at] fwicom wrote:
>It's fine as an example of modifying the tokenizer and the expression
>parser, but it doesn't shed much light on the parser in general, or on
>the hows and whys of adding textures and objects.
I would recommend starting small...
>It's also a 3.0-only patch, so it's not even the state of the art (adding
>tokens in 3.1 is much simpler.)
Sure, but it is easy to use your 3.0 patch with 3.1. If I could do it,
anyone can.
Jerry
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |