aonorin / glfx

Automatically exported from code.google.com/p/glfx
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Use standart C preprocessor #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Good implementation can be found here:
http://www.codeproject.com/Articles/3853/Wave-a-Standard-conformant-C-preprocess
or-library

Or in boost::wave library.

Original issue reported on code.google.com by denis.o...@gmail.com on 8 Nov 2012 at 11:15

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Why I need to use it?

Original comment by max.snif...@gmail.com on 8 Nov 2012 at 11:29

GoogleCodeExporter commented 8 years ago
1. To remove limitation on "#include" directive.
2. It can be use for conditional shader compilation 

Original comment by denis.o...@gmail.com on 9 Nov 2012 at 6:45

GoogleCodeExporter commented 8 years ago
This is not exactly the best way to solve the "include" limitation. The right 
way to do it would be to make a reentrant parser.
Since the basic structure of the parser allows for merging data from parsed 
files, supporting "include" shouldn't require all that much work. So I do 
intend to make it happen relatively soon.

I'm not entirely sure what you mean by your second point though. Do you mean 
ifdef'ing "program" blocks?

Original comment by max.snif...@gmail.com on 20 Nov 2012 at 12:06

GoogleCodeExporter commented 8 years ago
About 2nd point - yes. Sometime it may be found very helpfull. And it was heavy 
use in one of my past projects.

Original comment by denis.o...@gmail.com on 21 Nov 2012 at 8:58