Initializer blocks can nest, like "float4 x[] = { {a,b,c,d}, {a,b,c,d} };"
authorRyan C. Gordon <icculus@icculus.org>
Tue, 25 Aug 2009 23:47:11 -0400
changeset 790 0cf8abbbc9fa
parent 789 10a36d0c418c
child 791 2a7dffefabd5
Initializer blocks can nest, like "float4 x[] = { {a,b,c,d}, {a,b,c,d} };"
mojoshader_parser_hlsl.lemon
--- a/mojoshader_parser_hlsl.lemon	Tue Aug 25 23:44:04 2009 -0400
+++ b/mojoshader_parser_hlsl.lemon	Tue Aug 25 23:47:11 2009 -0400
@@ -226,7 +226,8 @@
 variable_attribute ::= COLUMNMAJOR.
 
 initializer_block_list ::= expression.
-initializer_block_list ::= initializer_block_list COMMA expression.
+initializer_block_list ::= LBRACE initializer_block_list RBRACE.
+initializer_block_list ::= initializer_block_list COMMA initializer_block_list.
 initializer_block ::= LBRACE initializer_block_list RBRACE.
 
 initializer ::= ASSIGN initializer_block.