Properly ignore single-digits

This commit is contained in:
smallmodel 2024-10-30 23:21:05 +01:00
parent 4853235d86
commit 74c8aa95f5
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -204,23 +204,23 @@ varname [a-zA-Z0-9_\"\$]+
\\[\r\n]+ { ; }
"//"[^\r\n]* { if( prev_yylex != TOKEN_EOL ) YYLEX( TOKEN_EOL ); }
<VARIABLES>"size" { BEGIN(INITIAL); YYLEX(TOKEN_SIZE); }
<VARIABLES>[ ]*\./([0-9]?[^0-9]) { YYLEX(TOKEN_PERIOD); }
<VARIABLES>\"{string}\" { BEGIN(INITIAL); TextEscapeValue(yytext + 1, strlen( yytext ) - 2 ); YYLEX(TOKEN_STRING); }
<VARIABLES>{varname} {
TextValue(yytext, strlen(yytext));
YYLEX(TOKEN_IDENTIFIER);
}
<VARIABLES>[ \t\r\n] {
BEGIN(INITIAL);
unput(yytext[yyleng - 1]);
yyreducepos(1);
}
<VARIABLES>. {
BEGIN(INITIAL);
unput(yytext[yyleng - 1]);
yyreducepos(1);
}
<VARIABLES>"size" { BEGIN(INITIAL); YYLEX(TOKEN_SIZE); }
<VARIABLES>[ ]*\./([0-9]?[^0-9[:space:]]) { YYLEX(TOKEN_PERIOD); }
<VARIABLES>\"{string}\" { BEGIN(INITIAL); TextEscapeValue(yytext + 1, strlen( yytext ) - 2 ); YYLEX(TOKEN_STRING); }
<VARIABLES>{varname} {
TextValue(yytext, strlen(yytext));
YYLEX(TOKEN_IDENTIFIER);
}
<VARIABLES>[ \t\r\n] {
BEGIN(INITIAL);
unput(yytext[yyleng - 1]);
yyreducepos(1);
}
<VARIABLES>. {
BEGIN(INITIAL);
unput(yytext[yyleng - 1]);
yyreducepos(1);
}
\"{string}\" { TextEscapeValue( yytext + 1, yyleng - 2 ); YYLEX( TOKEN_STRING ); }