Commit Graph

18 Commits

Author SHA1 Message Date
Kenneth Graunke
57503a22d7 Only initialize types after #extension directives have been processed.
Since _mesa_glsl_initialize_types add types for various extensions, we
can't call it until after processing "#extension foo : disable" lines.

Fixes tex_rect_02.frag.
2010-06-09 11:14:58 -07:00
Ian Romanick
19eb5896c4 Only allow global precision qualifier for int and float
This causes the following tests to pass:

    glslparsertest/glsl2/precision-03.vert
2010-06-07 19:03:03 -07:00
Ian Romanick
9bcb67bdc4 Fix parsing of precision qualifiers
This causes the following tests to pass:

     glslparsertest/glsl2/precision-02.vert
     glslparsertest/glsl2/precision-04.vert
     glslparsertest/glsl2/precision-06.vert

This causes the following test to fail.  This shader was previously
failing to compile, but it was failing for the wrong reasons.

     glslparsertest/glsl2/precision-03.vert
2010-06-07 18:56:16 -07:00
Ian Romanick
6cd2a5cc4b Generate an error on empty declaration lists
This causes an error for code such as 'float;'
2010-06-07 18:49:48 -07:00
Ian Romanick
304ea90233 Convert ast_node use of simple_node to exec_list and exec_node 2010-05-10 11:17:53 -07:00
Ian Romanick
3521f0bdd5 Store AST function call parameters in expressions
Previously the list of function call parameters was stored as a
circular list in ast_expression::subexpressions[1].  They are now
stored as a regular list in ast_expression::expressions.
2010-05-10 11:04:02 -07:00
Ian Romanick
1f959ab4d6 Use IDENTIFIER instead of TYPE_NAME for structure names
Since there is no track of which names are structure names during parsing,
TYPE_NAME cannot be produced by the lexer.  Use IDENTIFIER and let the AST
processor sort it out.
2010-04-28 18:22:47 -07:00
Ian Romanick
e701761cc8 Begin processing #extension directive
Nowhere near complete.  It just parses correctly at this point.
2010-04-07 16:49:25 -07:00
Kenneth Graunke
ebfdef7a83 Set source locations on AST nodes so error messages print locations.
I haven't verified that these are all correct, but it's still a lot
better than not having anything.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2010-03-31 18:26:27 -07:00
Ian Romanick
06e5308e29 Add parser support for texture rectangle types 2010-03-29 16:44:29 -07:00
Ian Romanick
b0bb781e1d Don't track new type names during pass-1 parsing
This implementation was wrong anyway because it did not respect
scoping rules.  This will need to be revisited soon.  The most likely
result is that the grammar is going to need some significant re-work
to be able to use a IDENTIFIER in all the places where a TYPE_NAME is
currently used.
2010-03-19 11:12:33 -07:00
Ian Romanick
ed85a5dd4b Add new constructors for ast_type_specifier
Add a constructor that uses an ast_struct_specifier and one that uses
a type name.  This saves a (trivial) bit of code, but it also ensures
some of the class invariants (i.e., type_name != NULL) are met.
2010-03-15 14:28:17 -07:00
Ian Romanick
f13d4295f9 Change type of function_identifier to silence bison warning
When the implementation of function_call_header and
function_identifier were changed a few commits ago, the types of the
production changed.  This just updates the types specified for the
productions to match reality.
2010-03-11 16:12:25 -08:00
Ian Romanick
44eb13d0b5 Add parameters to function declarations in the correct order 2010-03-11 16:11:07 -08:00
Ian Romanick
3821761e45 Differentiate in ast_function_expression between constructors and func. calls 2010-03-10 14:12:22 -08:00
Ian Romanick
7cfddf1941 Make ast_function_expression subclass of ast_expression 2010-03-10 13:26:52 -08:00
Ian Romanick
d10fe19495 Simplified constructor for identifier expressions 2010-03-10 13:25:56 -08:00
Ian Romanick
d59673c9de autoconf for the ... 2010-02-25 17:17:23 -08:00