[Mesa-dev] [PATCH 22/23] glsl/glcpp: Add a catch-all rule for unexpected characters.

Carl Worth cworth at cworth.org
Tue Jul 1 15:27:55 PDT 2014


Kristian Høgsberg <krh at bitplanet.net> writes:
> Oh, I should have read the rest of the page - there's %option warn to
> go with nodefault:
>
>      warn about certain things. In particular, if the default rule can
>      be matched but no default rule has been given, the flex will warn
>      you.  We recommend using this option always.
>
> which looks like flex can detect this condition at compile time and
> warn about it.

Thanks, Kristian! That's a very handy feature, and yes, it does work
like you hoped. Flex can tell us at compile-time whether the set of
rules we have will cover all characters and in all start conditions.

I've just sent a little series of 4 patches to add these options to both
glcpp and the main glsl compiler. (I would have sent them as replies,
but I botched the git-send-email command yet again and they went out
already).

-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/20140701/f6ecf061/attachment-0001.sig>


More information about the mesa-dev mailing list