[Mesa-dev] [PATCH 2/6] glsl: Add productions to GLSL grammar for switch statement

Ian Romanick idr at freedesktop.org
Mon Jun 27 14:29:49 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/24/2011 12:59 PM, Dan McCabe wrote:
> On 06/20/2011 03:39 PM, Ian Romanick wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 06/17/2011 05:43 PM, Dan McCabe wrote:
>>> The grammar is modified to support switch statements. Rather than
>>> follow the
>>> grammar in the appendix, which allows case labels to be placed ANYWHERE
>>> as a regular statement, we follow the development of the grammar as
>>> described in the body of the GLSL.
>>>
>>> In this variation, the switch statement has a body which consists of
>>> a list
>>> of case statements. A case statement is preceded by a list of case
>>> labels and
>>> ends with a list of statements.
>> Either this patch or patch 6/6 is the right place to restrict
>> switch-statements and case labels to GLSL 1.30.  From the looks of the
>> series, these patches will merrily allow switch-statements on any GLSL
>> version.  That seems bad. :)
> 
> Isn't that the purpose of the KYEWORD macro in glsl_lexer.ll ? Those
> macros already specify that that these are valid keywords in 1.3 or
> beyond already.

Yes, of course.  It's been some time since I've been in there.  I forgot
about that. :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk4I9kgACgkQX1gOwKyEAw+YegCfRyGBwbIFTHmQDBwHxH9Ch0F0
+UAAnjtam9SBU9sHqUnV9+SOBQ6380XW
=wnhg
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list