[Mesa-dev] [PATCH] RFC: glsl/glcpp: Allow for '#' characters to appear in shader body
Carl Worth
cworth at cworth.org
Thu Aug 7 15:29:58 PDT 2014
Erik Faye-Lund <kusmabite at gmail.com> writes:
> On Tue, Aug 5, 2014 at 11:22 PM, Carl Worth <cworth at cworth.org> wrote:
>
>> Now, what we could do if we were so inclined, would be to defer the
>> errors for illegal characters until they actually appeared in the
>> pre-processor output.
>
> What you describe here seems to actually be what the standard requires:
>
> The relevant bit of the parse rule for a define statement of this type
> is like so (Section 16 [cpp] of the C++ spec):
...
> each non-white-space character that cannot be one of the above
Yes, that does seem clear. Thanks for chasing that down.
> Note that '$' is a bit different, as it's not a part of the
> preprocessor's character set, so using it might be interpreted as
> undefined behavior.
Right. That could easily go either way. Is the phrase "each
non-white-space character" restricted to characters of the original
character set?
Regardless, I've just sent a second version of the relevant patch from
my subsequent series that now implements exactly what is described
above. (And I sent another patch (7/6) in that series to test things.)
I'm pretty happy with the result, but would of course appreciate review
From anyone.
-Carl
--
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140807/16ce9a22/attachment.sig>
More information about the mesa-dev
mailing list