diff options
author | Ian Romanick <[email protected]> | 2010-04-07 16:46:25 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-04-07 16:49:25 -0700 |
commit | e701761cc84a136c2e1b3cf341bc0edb90492278 (patch) | |
tree | 808b619ec9bb320eaf77b5343c2dbdc8da8ab3b2 /glsl_parser.ypp | |
parent | ae4c4c07959f059e557ea44e98552ced1fec9f47 (diff) |
Begin processing #extension directive
Nowhere near complete. It just parses correctly at this point.
Diffstat (limited to 'glsl_parser.ypp')
-rw-r--r-- | glsl_parser.ypp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/glsl_parser.ypp b/glsl_parser.ypp index b8c01b508d0..250c51c7ee3 100644 --- a/glsl_parser.ypp +++ b/glsl_parser.ypp @@ -190,13 +190,13 @@ translation_unit: { _mesa_glsl_initialize_types(state); } - external_declaration_list + extension_statement_list external_declaration_list | { state->language_version = 110; _mesa_glsl_initialize_types(state); } - external_declaration_list + extension_statement_list external_declaration_list ; version_statement: @@ -217,6 +217,20 @@ version_statement: } ; +extension_statement_list: + + | extension_statement_list extension_statement + ; + +extension_statement: + EXTENSION IDENTIFIER COLON IDENTIFIER EOL + { + if (!_mesa_glsl_process_extension($2, & @2, $4, & @4, state)) { + YYERROR; + } + } + ; + external_declaration_list: external_declaration { |