imageworks/OpenShadingLanguage — pull request #169 by lgritz (2012-10-17 00:17:43+00:00)
Title: Fix oso parsing -- bug thought braces in string metadata was corruption.

This shader:

shader test (
int myparam = 0 [[ string mymetadata = "blah{}blah" ]]
)
{
printf ("myparam = %d\n", myparam);
}

would report the metadata incorrectly with 'oslinfo', and would parse incorrectly by liboslexec (erroring that it was a corrupted oso file).

The problem was the way I was parsing the oso representation of the metadata.

The fix is just the two lines in osolex.l; everything else is just a test case.

Also fixed a bug I noticed along the way, where oslinfo didn't print integer metadata correctly