POV-Ray : Newsgroups : povray.programming : How does parser.cpp/parstxtr.cpp work? : How does parser.cpp/parstxtr.cpp work? Server Time
28 Jul 2024 06:20:01 EDT (-0400)
  How does parser.cpp/parstxtr.cpp work?  
From: jan w
Date: 21 Oct 2002 13:26:36
Message: <3db438cb@news.povray.org>
Can someone please explain to me, or point me to a direction/documentation,
how the parser works?

Its quite hard for an C novice to understand the inner working of the parser
with all these marcros and definitions...
Or simply help me with my current prob?

My trouble is as follows:
I started to create a grid-pattern. This was created as a block-pattern 
in that way, that I simply copied everywhere (where I found it) the brick-
pattern and renamed it.
At last I changed the inner working in pattern.cpp so I had what I wanted. 
Fine! This worked, and I was happy.

But I decided, I could create a more useful pattern, if I would return a
float and later apply a colormap instead of a simple color.

Returning the float works ok, so far, but as this started as a copy of a 
brick-pattern, I can't apply a colormap. I assume the appropriate code lies
in the parser. Can someone tell me, where which token has how to be added?

Thx ... Jan ...

PS: Question from newbie: 
	struct *T;  
	T->A.B == (*T).A.B ? 

    I'm still getting confused with pointerstuff....

--


Post a reply to this message

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