Re: [Mesa-dev] [GLSL] defined expressions

2010-12-07 Thread José Fonseca
On Mon, 2010-12-06 at 17:10 -0800, Carl Worth wrote: > On Mon, 06 Dec 2010 20:23:52 +, José Fonseca wrote: > > I suppose it is possible for space to be significant on a conditional > > expression, e.g., > > > > #if foo () > > > > vs > > > > #if foo > > There's no significant whitespac

Re: [Mesa-dev] [GLSL] defined expressions

2010-12-06 Thread Carl Worth
On Mon, 06 Dec 2010 20:23:52 +, José Fonseca wrote: > I suppose it is possible for space to be significant on a conditional > expression, e.g., > > #if foo () > > vs > > #if foo There's no significant whitespace here. A function-like macro can be invoked without or without intervening

Re: [Mesa-dev] [GLSL] defined expressions

2010-12-06 Thread José Fonseca
On Fri, 2010-12-03 at 15:37 -0800, Carl Worth wrote: > On Fri, 3 Dec 2010 13:34:09 -0800, Kenneth Graunke > wrote: > > On Friday 03 December 2010 08:01:06 José Fonseca wrote: > > > parser->space_tokens = 1; > > > > > > statement conditional_tokens stanza -- it causes space tokens to be > > > e

Re: [Mesa-dev] [GLSL] defined expressions

2010-12-03 Thread Carl Worth
On Fri, 3 Dec 2010 13:34:09 -0800, Kenneth Graunke wrote: > On Friday 03 December 2010 08:01:06 José Fonseca wrote: > > parser->space_tokens = 1; > > > > statement conditional_tokens stanza -- it causes space tokens to be > > emitted halfway before reaching the DEFINED token. > > Indeed. I'm

Re: [Mesa-dev] [GLSL] defined expressions

2010-12-03 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/03/2010 08:01 AM, José Fonseca wrote: > Hi Ian, > > The current GLSL preprocessor fails to parse expressions such as > > #if 1 == 0 || defined UNDEFINED > > which is used by CINEBENCH r11. > > The problem is the > > parser->space_tokens

[Mesa-dev] [GLSL] defined expressions

2010-12-03 Thread José Fonseca
Hi Ian, The current GLSL preprocessor fails to parse expressions such as #if 1 == 0 || defined UNDEFINED which is used by CINEBENCH r11. The problem is the parser->space_tokens = 1; statement conditional_tokens stanza -- it causes space tokens to be emitted halfway before reaching the DEF