Re: [Mesa-dev] [PATCH] RFC: glsl/glcpp: Allow for '#' characters to appear in shader body

2014-08-08 Thread Carl Worth
Erik Faye-Lund writes: > It seems to me like this is there to support non-ASCII identifiers and > strings, but GLSL doesn't support either. I'm not able to come up with > a conclusion here. That's almost always the case with GLSL. The GLSL specification does have its own section for character set

Re: [Mesa-dev] [PATCH] RFC: glsl/glcpp: Allow for '#' characters to appear in shader body

2014-08-08 Thread Erik Faye-Lund
On Fri, Aug 8, 2014 at 12:29 AM, Carl Worth wrote: > Erik Faye-Lund writes: >> Note that '$' is a bit different, as it's not a part of the >> preprocessor's character set, so using it might be interpreted as >> undefined behavior. > > Right. That could easily go either way. Is the phrase "each >

Re: [Mesa-dev] [PATCH] RFC: glsl/glcpp: Allow for '#' characters to appear in shader body

2014-08-07 Thread Carl Worth
Erik Faye-Lund writes: > On Tue, Aug 5, 2014 at 11:22 PM, Carl Worth wrote: > >> Now, what we could do if we were so inclined, would be to defer the >> errors for illegal characters until they actually appeared in the >> pre-processor output. > > What you describe here seems to actually be what t

Re: [Mesa-dev] [PATCH] RFC: glsl/glcpp: Allow for '#' characters to appear in shader body

2014-08-07 Thread Erik Faye-Lund
On Tue, Aug 5, 2014 at 11:22 PM, Carl Worth wrote: > Kenneth Graunke writes: >> I agree that this is pretty bogus. > > I'm coming around to thinking it's totally bogus. > >> How about emitting a warning in the RETURN_TOKEN ('#') case? > > Thanks for the review, and thanks for suggesting the warni

Re: [Mesa-dev] [PATCH] RFC: glsl/glcpp: Allow for '#' characters to appear in shader body

2014-08-05 Thread Carl Worth
Kenneth Graunke writes: > I agree that this is pretty bogus. I'm coming around to thinking it's totally bogus. > How about emitting a warning in the RETURN_TOKEN ('#') case? Thanks for the review, and thanks for suggesting the warning. I added the warning, then decided it needed some additional

Re: [Mesa-dev] [PATCH] RFC: glsl/glcpp: Allow for '#' characters to appear in shader body

2014-08-04 Thread Kenneth Graunke
On Thursday, July 31, 2014 11:22:59 AM Carl Worth wrote: > Strictly speaking, the GLSL specification only allows for the '#' to appear in > a shader in two places: > > 1. To introduce a pre-processing directive > > In this case, the '#' must be the first character on a line after >

Re: [Mesa-dev] [PATCH] RFC: glsl/glcpp: Allow for '#' characters to appear in shader body

2014-07-31 Thread Michel Dänzer
On 01.08.2014 03:22, Carl Worth wrote: > Strictly speaking, the GLSL specification only allows for the '#' to appear in > a shader in two places: > > 1. To introduce a pre-processing directive > > In this case, the '#' must be the first character on a line after > ignoring

[Mesa-dev] [PATCH] RFC: glsl/glcpp: Allow for '#' characters to appear in shader body

2014-07-31 Thread Carl Worth
Strictly speaking, the GLSL specification only allows for the '#' to appear in a shader in two places: 1. To introduce a pre-processing directive In this case, the '#' must be the first character on a line after ignoring any comments and horizontal whitespace.