Macro expansion result (like C preprocessor output) (Message 1 to 4 of 4)
From: Lars C Hassing
Subject: Macro expansion result (like C preprocessor output)
Date: 7 Jun 2005 19:08:59
Message: <42a6290b@news.povray.org>
Is it possible to see the resulting raw POV code
after all macro expansions and include file inclusion ?
Just like "cc -p" or "gcc -E" for a C file.
/Lars
From: Warp
Subject: Re: Macro expansion result (like C preprocessor output)
Date: 8 Jun 2005 07:49:58
Message: <42a6db66@news.povray.org>
Lars C. Hassing <pov### [at] hassingsdk> wrote:
> Is it possible to see the resulting raw POV code> after all macro expansions and include file inclusion ?
No.
--
- Warp
From: Lars C Hassing
Subject: Re: Macro expansion result (like C preprocessor output)
Date: 9 Jun 2005 13:32:04
Message: <42a87d14$1@news.povray.org>
Warp wrote:
> Lars C. Hassing <pov### [at] hassingsdk> wrote:> >>Is it possible to see the resulting raw POV code>>after all macro expansions and include file inclusion ?> > > No.
Thank you for the concise answer!
Do you know why ?
Am I the first to ask ?
Is it difficult to implement because of the way the parser works ?
Would anyone be interested in such functionality ?
I haven't been able to find any discussions about the subject.
I was looking for a way to debug a large complex set of macros.
/Lars
From: Warp
Subject: Re: Macro expansion result (like C preprocessor output)
Date: 9 Jun 2005 14:04:29
Message: <42a884ad@news.povray.org>
Lars C. Hassing <pov### [at] hassingsdk> wrote:
> Do you know why ?
Because it is not needed.
POV-Ray doesn't have a preprocessor like a C compiler has. POV-Ray
directly reads and interprets the SDL code without doing any
preprocessing to it.
> Am I the first to ask ?
I remember people asking if POV-Ray could just parse but not
render and return an error code (which could be used to check
the validity of the input), but I don't remember anyone asking
if POV-Ray could be used as a "preprocessor".
> Is it difficult to implement because of the way the parser works ?
It would not be difficult at all to implement, but it would be
rather useless (at least for POV-Ray itself).
I can think of only one useful use for this feature: To convert
SDL files to a simplified format which is easier to parse by
third-party programs.
--
- Warp