OSDN Git Service

glsl: Add productions to GLSL grammar for switch statement
authorDan McCabe <zen3d.linux@gmail.com>
Mon, 7 Nov 2011 23:07:43 +0000 (15:07 -0800)
committerDan McCabe <zen3d.linux@gmail.com>
Tue, 8 Nov 2011 00:31:21 +0000 (16:31 -0800)
commit80944599dcf070efa84ebf192c31f4129cee697d
treebc018dd5e5dda706139714d7aaf7b143a0ff6899
parent19daba54707b4ff90159850ce97faceba9c336c0
glsl: Add productions to GLSL grammar for switch statement

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 spec.

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.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/glsl_parser.yy