forked from qt-creator/qt-creator
Handle logical xor.
This commit is contained in:
@@ -26,10 +26,6 @@
|
||||
-- contact the sales department at http://qt.nokia.com/contact.
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
--
|
||||
-- todo:
|
||||
-- spelling of XOR_OP and CARET
|
||||
|
||||
%decl glslparser.h
|
||||
%impl glslparser.cpp
|
||||
%parser GLSLParserTable
|
||||
@@ -204,7 +200,7 @@
|
||||
%token VOID "void"
|
||||
%token WHILE "while"
|
||||
%token XOR_ASSIGN "^="
|
||||
%token XOR_OP "^"
|
||||
%token XOR_OP "^^"
|
||||
%token TRUE "true"
|
||||
%token FALSE "false"
|
||||
%token PREPROC "preprocessor directive"
|
||||
|
||||
@@ -331,8 +331,11 @@ int Lexer::yylex_helper(const char **position, int *line)
|
||||
if (_yychar == '=') {
|
||||
yyinp();
|
||||
return Parser::T_XOR_ASSIGN;
|
||||
} else if (_yychar == '^') {
|
||||
yyinp();
|
||||
return Parser::T_XOR_OP;
|
||||
}
|
||||
return Parser::T_XOR_OP;
|
||||
return Parser::T_CARET;
|
||||
|
||||
// {
|
||||
case '{':
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
|
||||
#line 217 "./glsl.g"
|
||||
#line 213 "./glsl.g"
|
||||
|
||||
/**************************************************************************
|
||||
**
|
||||
|
||||
@@ -61,7 +61,7 @@ const char *const GLSLParserTable::spell [] = {
|
||||
"samplerCube", "samplerCubeArray", "samplerCubeArrayShadow", "samplerCubeShadow", ";", "/", "smooth", "*", "struct", "subroutine",
|
||||
"-=", "switch", "~", "type_name", "uint", "uniform", "usampler1D", "usampler1DArray", "usampler2D", "usampler2DArray",
|
||||
"usampler2DMS", "usampler2DMSarray", "usampler2DRect", "usampler3D", "usamplerBuffer", "usamplerCube", "usamplerCubeArray", "uvec2", "uvec3", "uvec4",
|
||||
"varying", "vec2", "vec3", "vec4", "|", "void", "while", "^=", "^", "true",
|
||||
"varying", "vec2", "vec3", "vec4", "|", "void", "while", "^=", "^^", "true",
|
||||
"false", "preprocessor directive", "comment", "error", "reserved word"};
|
||||
|
||||
const short GLSLParserTable::lhs [] = {
|
||||
|
||||
Reference in New Issue
Block a user