Commit cf793418 authored by Roberto Raggi's avatar Roberto Raggi

Handle logical xor.

parent 5aacd959
......@@ -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 '{':
......
This diff is collapsed.
#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 [] = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment