POV-Ray : Newsgroups : povray.general : using flex and bison to parse povray scenes Server Time
14 Aug 2024 09:23:23 EDT (-0400)
  using flex and bison to parse povray scenes (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
From: Ken Cecka
Subject: Re: using flex and bison to parse povray scenes
Date: 13 Feb 1998 18:08:01
Message: <34e4df1b.0@news.povray.org>
Can't you write your program in c and use a c++ compiler (gcc or something)
to compile with it.  The library should work for you either way.

Ken

Jens Christian Restemeier wrote in message
<34E### [at] hrzuni-bielefeldde>...
>Ken Cecka wrote:
>>
>> You might check out libparpov at
>> http://wwwcip.informatik.uni-erlangen.de/~cnvogelg/parpov/index.html .
>> It's not flex or bison, but it's a fairly complete parser from what I've
>> heard.
>
>Yes, that library is mostly what I had in mind. Only problem is, that it
>is based on C++, and I'd like to use plain 'c' and do a c++ wrapper
>later.
>
> Jens Ch. Restemeier
>----
>"Five to one against and falling ...  four to one against and falling
>... three to one ... two ... one ... probability factor one to one ...
>we have normality, I repeat we have normality. Anything you still can't
>cope with is therefore your own problem."


Post a reply to this message

From: Thomas Baier
Subject: Re: using flex and bison to parse povray scenes
Date: 13 Feb 1998 00:44:40
Message: <34E3DDC8.FE2E8F40@ibm.net>
Hi


> Questions:
> - Has anybody else made a flex+bison parser for POVRAY scenes, where I
> could get some ideas ?
>

Yes. Please have a look at POV2MDL, a povray 2.2 to Moray converter.Yes, i
have done a Parser with Lex&Yacc. Povray has really a lazzy syntax.
I think it is a impossible to write a Lex&Yacc parser with the quality of


The SDK is at http://ourworld.compuserve.com/homepages/thbaier.


> - Is it possible, to write the POVRAY language in BNF notation ?
> - Does anybody have some good ideas to store a POVRAY scene in memory?
>   Specification for this:
>   - not copied from the POVRAY source !
>   - easy manipulation of Objects (rearranging the tree)
>   - keeps ALL attributes of the Objekts
>
>                         Jens Ch. Restemeier

  Thomas


Post a reply to this message

From: Jens Christian Restemeier
Subject: Re: using flex and bison to parse povray scenes
Date: 13 Feb 1998 10:09:19
Message: <34E4621F.293E@hrz.uni-bielefeld.de>
Thomas Baier wrote:
> 
> Hi
> 
> > Questions:
> > - Has anybody else made a flex+bison parser for POVRAY scenes, where I
> > could get some ideas ?
> >
> 
> Yes. Please have a look at POV2MDL, a povray 2.2 to Moray converter.Yes, i
> have done a Parser with Lex&Yacc. Povray has really a lazzy syntax.
> I think it is a impossible to write a Lex&Yacc parser with the quality of


> The SDK is at http://ourworld.compuserve.com/homepages/thbaier.

Hey, that's a cool idea. Have you contacted the POVRAY members, to
support POB as an official file-format ?
				Jens Ch. Restemeiers

----
"Five to one against and falling ...  four to one against and falling
... three to one ... two ... one ... probability factor one to one ...
we have normality, I repeat we have normality. Anything you still can't
cope with is therefore your own problem."


Post a reply to this message

From: Mathias Broxvall
Subject: Re: using flex and bison to parse povray scenes
Date: 13 Feb 1998 15:45:17
Message: <1d4eria.i06qbudukyc0N@dialup178-2-29.swipnet.se>
Jens Christian Restemeier <jch### [at] hrzuni-bielefeldde> wrote:


> Hey, that's a cool idea. Have you contacted the POVRAY members, to
> support POB as an official file-format ?

Oh no!!! Povray is a great language, but;

1] The povray language is turing complete -> no all
  3D applications want to allow "programs" in the documents.
  (For example - you can actually write postscript "viruses"
   and simply postscript files which loops indefinatly and have
   other "bugs" in them)

2] That would rather limit the possibilities of "enhancing" the
  language. Someone once claimed you where quite limited by not
  having any delimiters (like ';') between the "sentences" or
  objects. I'm not sure it's true - but maybe it's good if such
  a thing could be added to the language. (A small hack could
  probably convert all oldstyle includes/scenes to the new syntax)

/ Mathias Broxvall


Post a reply to this message

From: %
Subject: Re: using flex and bison to parse povray scenes
Date: 13 Feb 1998 16:18:53
Message: <34E4B8BB.1F52@HRZ.Uni-Bielefeld.DE>
Mathias Broxvall wrote:
> 
> Jens Christian Restemeier <jch### [at] hrzuni-bielefeldde> wrote:
> 
> > Hey, that's a cool idea. Have you contacted the POVRAY members, to
> > support POB as an official file-format ?
> 
> Oh no!!! Povray is a great language, but;
> 
> 1] The povray language is turing complete -> no all
>   3D applications want to allow "programs" in the documents.
>   (For example - you can actually write postscript "viruses"
>    and simply postscript files which loops indefinatly and have
>    other "bugs" in them)
> 
> 2] That would rather limit the possibilities of "enhancing" the
>   language. Someone once claimed you where quite limited by not
>   having any delimiters (like ';') between the "sentences" or
>   objects. I'm not sure it's true - but maybe it's good if such
>   a thing could be added to the language. (A small hack could
>   probably convert all oldstyle includes/scenes to the new syntax)

So what is this going to mean ? 
I was suggesting to support the binary POV format, as produced by the
patched POVRAY in the POB_SDK, as an additinal input-format in the
official POV.
The idea of POB is quite nice: POVRAY parses the scene, and writes a
binary object-file (like 3ds or lightwave), which can be easily loaded
by viewers, previewers, modelers and converters.

This could even simplify the normal POVRAY package: it is split into a
renderer and a parser (or better: compiler).
You write your normal scenes in the POVRAY script-language, and compile
it into a binary scene. Then you pass the binary file into the renderer.

But the current POB package has a major disadvantage, which makes it
unuseable for a project I had in mind: It doesn't store the names, that
are defined in a scene-name.

			Jens Ch. Restemeier


Post a reply to this message

From: %
Subject: Re: using flex and bison to parse povray scenes
Date: 13 Feb 1998 16:23:10
Message: <34E4B9BC.3AAA@HRZ.Uni-Bielefeld.DE>
> But the current POB package has a major disadvantage, which makes it
> unuseable for a project I had in mind: It doesn't store the names, that
> are defined in a scene-name.

#define My_cool_White_Texture ....

becomes

#define texture_63234 .....


Post a reply to this message

From: Thomas Baier
Subject: Re: using flex and bison to parse povray scenes
Date: 15 Feb 1998 03:20:47
Message: <34E6A55F.D0D3FFB9@ibm.net>
Hi Jens,

> But the current POB package has a major disadvantage, which makes it
> unuseable for a project I had in mind: It doesn't store the names, that
> are defined in a scene-name.
>
>                         Jens Ch. Restemeier

  You are right: all names dsiappear.
It takes some time to make it right. It was my first release :-))

Thomas


Post a reply to this message

From: Jens Ch  Restemeier
Subject: Re: using flex and bison to parse povray scenes
Date: 22 Feb 1998 05:50:20
Message: <34F002EB.7F55@HRZ.Uni-Bielefeld.DE>
Thomas Baier wrote:
> 
> Hi Jens,
> 
> > But the current POB package has a major disadvantage, which makes it
> > unuseable for a project I had in mind: It doesn't store the names, that
> > are defined in a scene-name.
> >
> >                         Jens Ch. Restemeier
> 
>   You are right: all names dsiappear.
> It takes some time to make it right. It was my first release :-))

Another thing: I'd like to have all declared objects in the final file,
that includes vectors, scalars and colors.

			Jens Ch. Restemeier


Post a reply to this message

From: Mathias Broxvall
Subject: Re: using flex and bison to parse povray scenes
Date: 17 Feb 1998 05:10:59
Message: <1d4ld7n.fizwvy1tl58cgN@dialup172-3-53.swipnet.se>
% <jch### [at] HRZUni-BielefeldDE> wrote:

> Mathias Broxvall wrote:
> > 
> > Jens Christian Restemeier <jch### [at] hrzuni-bielefeldde> wrote:
> > 
> > > Hey, that's a cool idea. Have you contacted the POVRAY members, to
> > > support POB as an official file-format ?
> > 
> > Oh no!!! Povray is a great language, but;
> > ....
> 
> So what is this going to mean ? 

Sorry - I misunderstod you. I didn't know about the POB format
(I thought you misspelled POV).

> I was suggesting to support the binary POV format, as produced by the
> patched POVRAY in the POB_SDK, as an additinal input-format in the
> official POV.
> The idea of POB is quite nice: POVRAY parses the scene, and writes a
> binary object-file (like 3ds or lightwave), which can be easily loaded
> by viewers, previewers, modelers and converters.
> 
> This could even simplify the normal POVRAY package: it is split into a
> renderer and a parser (or better: compiler).
> You write your normal scenes in the POVRAY script-language, and compile
> it into a binary scene. Then you pass the binary file into the renderer.

Cool! That would be *great*

/ Mathias Broxvall


Post a reply to this message

From: Thomas Baier
Subject: Re: using flex and bison to parse povray scenes
Date: 15 Feb 1998 03:17:55
Message: <34E6A4B3.D4AA559B@ibm.net>
Hi Jens,

> Hey, that's a cool idea. Have you contacted the POVRAY members, to
> support POB as an official file-format ?
>                                 Jens Ch. Restemeiers
>

Yes, but i have no time to integrate it into POV-Ray. Sorry.
Anyway all sources for POV-Ray 3.01 are present at my homepage.

Thomas


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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