glcpp: Handle missing newline at EOF.

Fixes CorrectFuncOverload.vert.
This commit is contained in:
Kenneth Graunke 2010-06-16 12:53:19 -07:00
parent 739ba06680
commit f82d673648

View file

@ -33,6 +33,8 @@
%option extra-type="glcpp_parser_t *"
%option prefix="glcpp_"
%x DONE
SPACE [[:space:]]
NONSPACE [^[:space:]]
NEWLINE [\n]
@ -207,6 +209,13 @@ NON_STARS_THEN_STARS [^*]*[*]+
return NEWLINE;
}
/* Handle missing newline at EOF. */
<INITIAL><<EOF>> {
BEGIN DONE; /* Don't keep matching this rule forever. */
yyextra->lexing_if = 0;
return NEWLINE;
}
%%
void