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.
|
-- contact the sales department at http://qt.nokia.com/contact.
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
--
|
|
||||||
-- todo:
|
|
||||||
-- spelling of XOR_OP and CARET
|
|
||||||
|
|
||||||
%decl glslparser.h
|
%decl glslparser.h
|
||||||
%impl glslparser.cpp
|
%impl glslparser.cpp
|
||||||
%parser GLSLParserTable
|
%parser GLSLParserTable
|
||||||
@@ -204,7 +200,7 @@
|
|||||||
%token VOID "void"
|
%token VOID "void"
|
||||||
%token WHILE "while"
|
%token WHILE "while"
|
||||||
%token XOR_ASSIGN "^="
|
%token XOR_ASSIGN "^="
|
||||||
%token XOR_OP "^"
|
%token XOR_OP "^^"
|
||||||
%token TRUE "true"
|
%token TRUE "true"
|
||||||
%token FALSE "false"
|
%token FALSE "false"
|
||||||
%token PREPROC "preprocessor directive"
|
%token PREPROC "preprocessor directive"
|
||||||
|
|||||||
@@ -331,8 +331,11 @@ int Lexer::yylex_helper(const char **position, int *line)
|
|||||||
if (_yychar == '=') {
|
if (_yychar == '=') {
|
||||||
yyinp();
|
yyinp();
|
||||||
return Parser::T_XOR_ASSIGN;
|
return Parser::T_XOR_ASSIGN;
|
||||||
}
|
} else if (_yychar == '^') {
|
||||||
|
yyinp();
|
||||||
return Parser::T_XOR_OP;
|
return Parser::T_XOR_OP;
|
||||||
|
}
|
||||||
|
return Parser::T_CARET;
|
||||||
|
|
||||||
// {
|
// {
|
||||||
case '{':
|
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",
|
"samplerCube", "samplerCubeArray", "samplerCubeArrayShadow", "samplerCubeShadow", ";", "/", "smooth", "*", "struct", "subroutine",
|
||||||
"-=", "switch", "~", "type_name", "uint", "uniform", "usampler1D", "usampler1DArray", "usampler2D", "usampler2DArray",
|
"-=", "switch", "~", "type_name", "uint", "uniform", "usampler1D", "usampler1DArray", "usampler2D", "usampler2DArray",
|
||||||
"usampler2DMS", "usampler2DMSarray", "usampler2DRect", "usampler3D", "usamplerBuffer", "usamplerCube", "usamplerCubeArray", "uvec2", "uvec3", "uvec4",
|
"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"};
|
"false", "preprocessor directive", "comment", "error", "reserved word"};
|
||||||
|
|
||||||
const short GLSLParserTable::lhs [] = {
|
const short GLSLParserTable::lhs [] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user