diff options
author | Michal Krol <michal@vmware.com> | 2009-09-07 21:30:34 +0200 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2009-09-07 21:30:34 +0200 |
commit | 5ddcdc42277ee2ba011980aebac7f3a12bd80c9d (patch) | |
tree | 739010d5aad4bb373aed9aff6ecf03231d531ab6 /src/mesa/shader/slang/library/slang_shader_syn.h | |
parent | ce9309d24595af324a2c7222a96100cddf5f2c9b (diff) |
slang: Adapt shader syntax description to grammar parser changes.
Diffstat (limited to 'src/mesa/shader/slang/library/slang_shader_syn.h')
-rw-r--r-- | src/mesa/shader/slang/library/slang_shader_syn.h | 172 |
1 files changed, 39 insertions, 133 deletions
diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h index 6a382970e1..d7ee076561 100644 --- a/src/mesa/shader/slang/library/slang_shader_syn.h +++ b/src/mesa/shader/slang/library/slang_shader_syn.h @@ -682,64 +682,15 @@ " \"invariant\" .and space .and identifier .and semicolon;\n" "function_definition\n" " function_prototype .and compound_statement_no_new_scope;\n" -"digit_oct\n" -" '0'-'7';\n" -"digit_dec\n" -" '0'-'9';\n" -"digit_hex\n" -" '0'-'9' .or 'A'-'F' .or 'a'-'f';\n" -"id_character_first\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"id_character_next\n" -" id_character_first .or digit_dec;\n" "identifier\n" -" id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\\0';\n" +" \"@ID\" .emit *;\n" "float\n" -" float_1 .or float_2 .or float_3;\n" -"float_1\n" -" float_fractional_constant .and float_optional_exponent_part .and optional_f_suffix;\n" -"float_2\n" -" float_digit_sequence .and .true .emit '\\0' .and float_exponent_part .and optional_f_suffix;\n" -"float_3\n" -" float_digit_sequence .and .true .emit '\\0' .and 'f' .emit '\\0';\n" -"float_fractional_constant\n" -" float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;\n" -"float_fractional_constant_1\n" -" float_digit_sequence .and '.' .and float_digit_sequence;\n" -"float_fractional_constant_2\n" -" float_digit_sequence .and '.' .and .true .emit '\\0';\n" -"float_fractional_constant_3\n" -" '.' .emit '\\0' .and float_digit_sequence;\n" -"float_optional_exponent_part\n" -" float_exponent_part .or .true .emit '\\0';\n" -"float_digit_sequence\n" -" digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n" -"float_exponent_part\n" -" float_exponent_part_1 .or float_exponent_part_2;\n" -"float_exponent_part_1\n" -" 'e' .and float_optional_sign .and float_digit_sequence;\n" -"float_exponent_part_2\n" -" 'E' .and float_optional_sign .and float_digit_sequence;\n" -"float_optional_sign\n" -" float_sign .or .true;\n" -"float_sign\n" -" '+' .or '-' .emit '-';\n" -"optional_f_suffix\n" -" 'f' .or .true;\n" +" \"@NUM\" .emit *;\n" "integer\n" -" integer_hex .or integer_oct .or integer_dec;\n" -"integer_hex\n" -" '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and\n" -" .true .emit '\\0';\n" -"integer_hex_1\n" -" 'x' .or 'X';\n" -"integer_oct\n" -" '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\\0';\n" -"integer_dec\n" -" digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n" +" \"@NUM\" .emit *;\n" "boolean\n" -" \"true\" .emit 2 .emit '1' .emit '\\0' .or\n" -" \"false\" .emit 2 .emit '0' .emit '\\0';\n" +" \"true\" .emit '1' .emit '\\0' .or\n" +" \"false\" .emit '0' .emit '\\0';\n" "type_name\n" " identifier;\n" "field_selection\n" @@ -751,116 +702,71 @@ "boolconstant\n" " boolean .emit OP_PUSH_BOOL;\n" "optional_space\n" -" .loop single_space;\n" +" .true;\n" "space\n" -" single_space .and .loop single_space;\n" -"single_space\n" -" white_char .or c_style_comment_block .or cpp_style_comment_block;\n" -"white_char\n" -" ' ' .or '\\t' .or new_line .or '\\v' .or '\\f';\n" -"new_line\n" -" cr_lf .or lf_cr .or '\\n' .or '\\r';\n" -"cr_lf\n" -" '\\r' .and '\\n';\n" -"lf_cr\n" -" '\\n' .and '\\r';\n" -"c_style_comment_block\n" -" '/' .and '*' .and c_style_comment_rest;\n" -"c_style_comment_rest\n" -" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n" -"c_style_comment_rest_1\n" -" c_style_comment_end .or c_style_comment_rest_2;\n" -"c_style_comment_rest_2\n" -" '*' .and c_style_comment_rest;\n" -"c_style_comment_char_no_star\n" -" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n" -"c_style_comment_end\n" -" '*' .and '/';\n" -"cpp_style_comment_block\n" -" '/' .and '/' .and cpp_style_comment_block_1;\n" -"cpp_style_comment_block_1\n" -" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n" -"cpp_style_comment_block_2\n" -" .loop cpp_style_comment_char .and new_line;\n" -"cpp_style_comment_block_3\n" -" .loop cpp_style_comment_char;\n" -"cpp_style_comment_char\n" -" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n" +" .true;\n" "ampersandampersand\n" -" optional_space .and '&' .and '&' .and optional_space;\n" +" \"@&&\";\n" "barbar\n" -" optional_space .and '|' .and '|' .and optional_space;\n" +" \"@||\";\n" "bang\n" -" optional_space .and '!' .and optional_space;\n" +" \"@!\";\n" "bangequals\n" -" optional_space .and '!' .and '=' .and optional_space;\n" +" \"@!=\";\n" "caretcaret\n" -" optional_space .and '^' .and '^' .and optional_space;\n" +" \"@^^\";\n" "colon\n" -" optional_space .and ':' .and optional_space;\n" +" \"@:\";\n" "comma\n" -" optional_space .and ',' .and optional_space;\n" +" \"@,\";\n" "dot\n" -" optional_space .and '.' .and optional_space;\n" +" \"@.\";\n" "equals\n" -" optional_space .and '=' .and optional_space;\n" +" \"@=\";\n" "equalsequals\n" -" optional_space .and '=' .and '=' .and optional_space;\n" +" \"@==\";\n" "greater\n" -" optional_space .and '>' .and optional_space;\n" +" \"@>\";\n" "greaterequals\n" -" optional_space .and '>' .and '=' .and optional_space;\n" +" \"@>=\";\n" "lbrace\n" -" optional_space .and '{' .and optional_space;\n" +" \"@{\";\n" "lbracket\n" -" optional_space .and '[' .and optional_space;\n" +" \"@[\";\n" "less\n" -" optional_space .and '<' .and optional_space;\n" +" \"@<\";\n" "lessequals\n" -" optional_space .and '<' .and '=' .and optional_space;\n" +" \"@<=\";\n" "lparen\n" -" optional_space .and '(' .and optional_space;\n" +" \"@(\";\n" "minus\n" -" optional_space .and '-' .and optional_space;\n" +" \"@-\";\n" "minusequals\n" -" optional_space .and '-' .and '=' .and optional_space;\n" +" \"@-=\";\n" "minusminus\n" -" optional_space .and '-' .and '-' .and optional_space;\n" +" \"@--\";\n" "plus\n" -" optional_space .and '+' .and optional_space;\n" +" \"@+\";\n" "plusequals\n" -" optional_space .and '+' .and '=' .and optional_space;\n" +" \"@+=\";\n" "plusplus\n" -" optional_space .and '+' .and '+' .and optional_space;\n" +" \"@++\";\n" "question\n" -" optional_space .and '?' .and optional_space;\n" +" \"@?\";\n" "rbrace\n" -" optional_space .and '}' .and optional_space;\n" +" \"@}\";\n" "rbracket\n" -" optional_space .and ']' .and optional_space;\n" +" \"@]\";\n" "rparen\n" -" optional_space .and ')' .and optional_space;\n" +" \"@)\";\n" "semicolon\n" -" optional_space .and ';' .and optional_space;\n" +" \"@;\";\n" "slash\n" -" optional_space .and '/' .and optional_space;\n" +" \"@/\";\n" "slashequals\n" -" optional_space .and '/' .and '=' .and optional_space;\n" +" \"@/=\";\n" "star\n" -" optional_space .and '*' .and optional_space;\n" +" \"@*\";\n" "starequals\n" -" optional_space .and '*' .and '=' .and optional_space;\n" -".string string_lexer;\n" -"string_lexer\n" -" lex_first_identifier_character .and .loop lex_next_identifier_character;\n" -"lex_first_identifier_character\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"lex_next_identifier_character\n" -" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n" -"err_token\n" -" '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or\n" -" '-' .or '+' .or '=' .or '|' .or '\\\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '\"' .or\n" -" '\\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier;\n" -"err_identifier\n" -" id_character_first .and .loop id_character_next;\n" +" \"@*=\";\n" "" |