Fix grammar error for Google decorate_string & hlsl_functionality1
authorLei Zhang <antiagainst@google.com>
Fri, 2 Mar 2018 20:45:55 +0000 (15:45 -0500)
committerLei Zhang <antiagainst@google.com>
Fri, 2 Mar 2018 20:47:59 +0000 (15:47 -0500)
include/spirv/unified1/spirv.core.grammar.json
tools/buildHeaders/jsonToSpirv.cpp
tools/buildHeaders/jsonToSpirv.h

index 4403250..8c95bf6 100644 (file)
       "opcode" : 5632,
       "operands" : [
         { "kind" : "IdRef",         "name" : "'Target'" },
-        { "kind" : "Decoration" },
-        { "kind" : "LiteralString" },
-        { "kind" : "LiteralString", "quantifier" : "*" }
+        { "kind" : "Decoration" }
       ],
       "extensions" : [ "SPV_GOOGLE_decorate_string" ],
       "version" : "None"
       "operands" : [
         { "kind" : "IdRef",          "name" : "'Struct Type'" },
         { "kind" : "LiteralInteger", "name" : "'Member'" },
-        { "kind" : "Decoration" },
-        { "kind" : "LiteralString" },
-        { "kind" : "LiteralString",  "quantifier" : "*" }
+        { "kind" : "Decoration" }
       ],
       "extensions" : [ "SPV_GOOGLE_decorate_string" ],
       "version" : "None"
index a460edc..bb32566 100755 (executable)
@@ -119,7 +119,8 @@ ClassOptionality ToOperandClassAndOptionality(const std::string& operandKind, co
         else if (quantifier == "?")
             return {OperandLiteralString, true};
         else {
-            return {OperandVariableLiteralStrings, false};
+            assert(0 && "this case should not exist");
+            return {OperandNone, false};
         }
     } else if (operandKind == "PairLiteralIntegerIdRef") {
         // Used by OpSwitch in the grammar
index 273b639..b25b89e 100755 (executable)
@@ -47,7 +47,6 @@ enum OperandClass {
     OperandOptionalLiteral,
     OperandOptionalLiteralString,
     OperandVariableLiterals,
-    OperandVariableLiteralStrings,
     OperandVariableIdLiteral,
     OperandVariableLiteralId,
     OperandLiteralNumber,