|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I was just wondering, does anyone know about the origin of the grammar used
for describing the SDL throughout the pov docs? I looked at the pov source,
and it doesn't seem to be actually used in it.
I started playing around with some python code to parse simple .pov scripts
based on SDL grammar snippets from the docs - so now I was wondering if
there's somewhere the complete grammar, and maybe even a utility to
generate a parser based on it? (Else I have to copy&paste it all out of the
docs..)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Elias Pschernig <elias at users sf net> wrote:
> I was just wondering, does anyone know about the origin of the grammar used
> for describing the SDL throughout the pov docs?
It's a kind of BNF derivative. The BNF notation is quite common in
many places as it's a formal way to define the syntax of things.
> I started playing around with some python code to parse simple .pov scripts
> based on SDL grammar snippets from the docs - so now I was wondering if
> there's somewhere the complete grammar, and maybe even a utility to
> generate a parser based on it? (Else I have to copy&paste it all out of the
> docs..)
I think yacc and lex are often used to create language parsers with
some BNF-style syntax.
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp <war### [at] tagpovrayorg> wrote:
> Elias Pschernig <elias at users sf net> wrote:
> > I was just wondering, does anyone know about the origin of the grammar used
> > for describing the SDL throughout the pov docs?
>
> It's a kind of BNF derivative. The BNF notation is quite common in
> many places as it's a formal way to define the syntax of things.
>
> > I started playing around with some python code to parse simple .pov scripts
> > based on SDL grammar snippets from the docs - so now I was wondering if
> > there's somewhere the complete grammar, and maybe even a utility to
> > generate a parser based on it? (Else I have to copy&paste it all out of the
> > docs..)
>
> I think yacc and lex are often used to create language parsers with
> some BNF-style syntax.
>
Thanks. I was actually hoping to find the program which was used to test the
BNF used in the docs, since the pov source itself apparently doesn't use
it. Or maybe just the complete grammar in one file, not scattered into the
docs. But I guess, I must just to some copy&pasting :)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Elias Pschernig <elias at users sf net> wrote:
> Or maybe just the complete grammar in one file, not scattered into the
> docs. But I guess, I must just to some copy&pasting :)
How about http://povray.org/documentation/view/3.6.1/502/
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp <war### [at] tagpovrayorg> wrote:
> > Or maybe just the complete grammar in one file, not scattered into the
> > docs. But I guess, I must just to some copy&pasting :)
>
> How about http://povray.org/documentation/view/3.6.1/502/
>
Heh, I could have sworn that is not in the docs that shipped with my pov :)
That indeed makes it easier, thanks.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |