Fix ExtInst parsing: no IdRef* at end
authorDavid Neto <dneto@google.com>
Tue, 14 Jun 2016 20:41:27 +0000 (16:41 -0400)
committerDavid Neto <dneto@google.com>
Wed, 15 Jun 2016 14:00:06 +0000 (10:00 -0400)
commit1a18739650fffa25a786bc35caeb34d4e82aad9f
tree1a0019879fbf7984ea0cfef2a69c63ab6a713f7b
parent37e4600c3efad7b1cfdc1df70a977be82eb3c811
Fix ExtInst parsing: no IdRef* at end

The operands following the extended instruction literal
number are determined by the extended instruction itself.
So drop the zero-or-more IdRef pattern at the end of OpExtInst.

It's arguable whether this should actually be a grammar fix.  I've
chosen to patch this in SPIRV-Tools instead of in the grammar file.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/233

Also fix two test cases for OpenCL extended instructions.  These
errors of supplying too many operands are now detected.
test/BinaryParse.cpp
test/ExtInst.OpenCL.std.cpp
test/TextToBinary.Extension.cpp
utils/generate_grammar_tables.py