diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l index 4e39bf659..c9c43bbbd 100644 --- a/libs/vkd3d-shader/preproc.l +++ b/libs/vkd3d-shader/preproc.l @@ -80,7 +80,11 @@ INT_SUFFIX [uUlL]{0,2} return T_NEWLINE; } "*/" {yy_pop_state(yyscanner);} -<> {yy_pop_state(yyscanner);} +<> { + yy_pop_state(yyscanner); + BEGIN(INITIAL); + yyterminate(); + } . {} \n {} @@ -196,6 +200,10 @@ INT_SUFFIX [uUlL]{0,2} BEGIN(INITIAL); return T_NEWLINE; } +<> { + BEGIN(INITIAL); + yyterminate(); + } {WS}+ {} [-()\[\]{},+!*/<>&|^?:] {return yytext[0];}