slang_shader.syn
来自「Mesa is an open-source implementation of」· SYN 代码 · 共 1,616 行 · 第 1/5 页
SYN
1,616 行
function_call_generic_1 .or function_call_generic_2;function_call_generic_1 function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED;function_call_generic_2 function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED;/* <function_call_header_no_parameters>::= <function_call_header> "void" | <function_call_header>*/function_call_header_no_parameters function_call_header .and function_call_header_no_parameters_1;function_call_header_no_parameters_1 "void" .or .true;/* <function_call_header_with_parameters>::= <function_call_header> <assignment_expression> | <function_call_header_with_parameters> "," <assignment_expression>*/function_call_header_with_parameters function_call_header .and assignment_expression .and .true .emit OP_END .and .loop function_call_header_with_parameters_1;function_call_header_with_parameters_1 comma .and assignment_expression .and .true .emit OP_END;/* <function_call_header> ::= <function_identifier> "("*/function_call_header function_identifier .and lparen;/* <function_identifier> ::= <constructor_identifier> | <identifier>note: <constructor_identifier> has been deleted*/function_identifier identifier;/* <unary_expression> ::= <postfix_expression> | "++" <unary_expression> | "--" <unary_expression> | <unary_operator> <unary_expression> <unary_operator> ::= "+" | "-" | "!" | "~" // reserved*/unary_expression postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or unary_expression_4 .or unary_expression_5/* .or unary_expression_6*/;unary_expression_1 plusplus .and unary_expression .and .true .emit OP_PREINCREMENT;unary_expression_2 minusminus .and unary_expression .and .true .emit OP_PREDECREMENT;unary_expression_3 plus .and unary_expression .and .true .emit OP_PLUS;unary_expression_4 minus .and unary_expression .and .true .emit OP_MINUS;unary_expression_5 bang .and unary_expression .and .true .emit OP_NOT;/*unary_expression_6 tilde .and unary_expression .and .true .emit OP_COMPLEMENT;*//* <multiplicative_expression> ::= <unary_expression> | <multiplicative_expression> "*" <unary_expression> | <multiplicative_expression> "/" <unary_expression> | <multiplicative_expression> "%" <unary_expression> // reserved*/multiplicative_expression unary_expression .and .loop multiplicative_expression_1;multiplicative_expression_1 multiplicative_expression_2 .or multiplicative_expression_3/* .or multiplicative_expression_4*/;multiplicative_expression_2 star .and unary_expression .and .true .emit OP_MULTIPLY;multiplicative_expression_3 slash .and unary_expression .and .true .emit OP_DIVIDE;/*multiplicative_expression_4 percent .and unary_expression .and .true .emit OP_MODULUS;*//* <additive_expression> ::= <multiplicative_expression> | <additive_expression> "+" <multiplicative_expression> | <additive_expression> "-" <multiplicative_expression>*/additive_expression multiplicative_expression .and .loop additive_expression_1;additive_expression_1 additive_expression_2 .or additive_expression_3;additive_expression_2 plus .and multiplicative_expression .and .true .emit OP_ADD;additive_expression_3 minus .and multiplicative_expression .and .true .emit OP_SUBTRACT;/* <shift_expression> ::= <additive_expression> | <shift_expression> "<<" <additive_expression> // reserved | <shift_expression> ">>" <additive_expression> // reserved*/shift_expression additive_expression/* .and .loop shift_expression_1*/;/*shift_expression_1 shift_expression_2 .or shift_expression_3;*//*shift_expression_2 lessless .and additive_expression .and .true .emit OP_LSHIFT;*//*shift_expression_3 greatergreater .and additive_expression .and .true .emit OP_RSHIFT;*//* <relational_expression> ::= <shift_expression> | <relational_expression> "<" <shift_expression> | <relational_expression> ">" <shift_expression> | <relational_expression> "<=" <shift_expression> | <relational_expression> ">=" <shift_expression>*/relational_expression shift_expression .and .loop relational_expression_1;relational_expression_1 relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or relational_expression_5;relational_expression_2 lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;relational_expression_3 greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;relational_expression_4 less .and shift_expression .and .true .emit OP_LESS;relational_expression_5 greater .and shift_expression .and .true .emit OP_GREATER;/* <equality_expression> ::= <relational_expression> | <equality_expression> "==" <relational_expression> | <equality_expression> "!=" <relational_expression>*/equality_expression relational_expression .and .loop equality_expression_1;equality_expression_1 equality_expression_2 .or equality_expression_3;equality_expression_2 equalsequals .and relational_expression .and .true .emit OP_EQUAL;equality_expression_3 bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;/* <and_expression> ::= <equality_expression> | <and_expression> "&" <equality_expression> // reserved*/and_expression equality_expression/* .and .loop and_expression_1*/;/*and_expression_1 ampersand .and equality_expression .and .true .emit OP_BITAND;*//* <exclusive_or_expression> ::= <and_expression> | <exclusive_or_expression> "^" <and_expression> // reserved*/exclusive_or_expression and_expression/* .and .loop exclusive_or_expression_1*/;/*exclusive_or_expression_1 caret .and and_expression .and .true .emit OP_BITXOR;*//* <inclusive_or_expression> ::= <exclusive_or_expression> | <inclusive_or_expression> "|" <exclusive_or_expression> // reserved*/inclusive_or_expression exclusive_or_expression/* .and .loop inclusive_or_expression_1*/;/*inclusive_or_expression_1 bar .and exclusive_or_expression .and .true .emit OP_BITOR;*//* <logical_and_expression> ::= <inclusive_or_expression> | <logical_and_expression> "&&" <inclusive_or_expression>*/logical_and_expression inclusive_or_expression .and .loop logical_and_expression_1;logical_and_expression_1 ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND;/* <logical_xor_expression> ::= <logical_and_expression> | <logical_xor_expression> "^^" <logical_and_expression>*/logical_xor_expression logical_and_expression .and .loop logical_xor_expression_1;logical_xor_expression_1 caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR;/* <logical_or_expression> ::= <logical_xor_expression> | <logical_or_expression> "||" <logical_xor_expression>*/logical_or_expression logical_xor_expression .and .loop logical_or_expression_1;logical_or_expression_1 barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR;/* <conditional_expression> ::= <logical_or_expression> | <logical_or_expression> "?" <expression> ":" <conditional_expression>*/conditional_expression logical_or_expression .and .loop conditional_expression_1;conditional_expression_1 question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT;/* <assignment_expression> ::= <conditional_expression> | <unary_expression> <assignment_operator> <assignment_expression> <assignment_operator> ::= "=" | "*=" | "/=" | "+=" | "-=" | "%=" // reserved | "<<=" // reserved | ">>=" // reserved | "&=" // reserved | "^=" // reserved | "|=" // reserved*/assignment_expression assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or assignment_expression_4 .or assignment_expression_5/* .or assignment_expression_6 .or assignment_expression_7 .or assignment_expression_8 .or assignment_expression_9 .or assignment_expression_10 .or assignment_expression_11*/ .or conditional_expression;assignment_expression_1 unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN;assignment_expression_2 unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN;assignment_expression_3 unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN;assignment_expression_4 unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN;assignment_expression_5 unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN;/*assignment_expression_6 unary_expression .and percentequals .and assignment_expression .and .true .emit OP_MODASSIGN;*//*assignment_expression_7 unary_expression .and lesslessequals .and assignment_expression .and .true .emit OP_LSHASSIGN;*//*assignment_expression_8 unary_expression .and greatergreaterequals .and assignment_expression .and .true .emit OP_RSHASSIGN;*//*assignment_expression_9 unary_expression .and ampersandequals .and assignment_expression .and .true .emit OP_ANDASSIGN;*//*assignment_expression_10 unary_expression .and caretequals .and assignment_expression .and .true .emit OP_XORASSIGN;*//*assignment_expression_11 unary_expression .and barequals .and assignment_expression .and .true .emit OP_ORASSIGN;*//* <expression> ::= <assignment_expression> | <expression> "," <assignment_expression>*/expression assignment_expression .and .loop expression_1;expression_1 comma .and assignment_expression .and .true .emit OP_SEQUENCE;/* <constant_expression> ::= <conditional_expression>*/constant_expression conditional_expression .and .true .emit OP_END;/* <declaration> ::= <function_prototype> ";" | <init_declarator_list> ";"*/declaration declaration_1 .or declaration_2;declaration_1 function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon;declaration_2 init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon;/* <function_prototype> ::= <function_header> "void" ")" | <function_declarator> ")"*/function_prototype function_prototype_1 .or function_prototype_2;function_prototype_1 function_header .and "void" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;function_prototype_2 function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;/* <function_declarator> ::= <function_header> | <function_header_with_parameters>*/function_declarator function_header_with_parameters .or function_header;/* <function_header_with_parameters> ::= <function_header> <parameter_declaration> | <function_header_with_parameters> "," <parameter_declaration>*/function_header_with_parameters function_header .and parameter_declaration .and .loop function_header_with_parameters_1;function_header_with_parameters_1 comma .and parameter_declaration;/* <function_header> ::= <fully_specified_type> <identifier> "("*/function_header function_header_nospace .or function_header_space;function_header_space fully_specified_type_space .and space .and function_decl_identifier .and lparen;function_header_nospace fully_specified_type_nospace .and function_decl_identifier .and lparen;/* <function_decl_identifier> ::= "__constructor"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?