mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Check for tabs alongside spaces in the lexer between expressions and variables
This fixes a compile error in some scripts that use tabs instead of spaces between expressions
This commit is contained in:
parent
c9373cbc97
commit
b5c32a41de
1 changed files with 6 additions and 6 deletions
|
@ -205,7 +205,7 @@ varname [a-zA-Z0-9_\"\$]+
|
||||||
"//"[^\r\n]* { if( prev_yylex != TOKEN_EOL ) YYLEX( TOKEN_EOL ); }
|
"//"[^\r\n]* { if( prev_yylex != TOKEN_EOL ) YYLEX( TOKEN_EOL ); }
|
||||||
|
|
||||||
<VARIABLES>"size" { BEGIN(INITIAL); YYLEX(TOKEN_SIZE); }
|
<VARIABLES>"size" { BEGIN(INITIAL); YYLEX(TOKEN_SIZE); }
|
||||||
<VARIABLES>[ ]*\./([0-9]*[^0-9[:space:]]) { YYLEX(TOKEN_PERIOD); }
|
<VARIABLES>[ \t]*\./([0-9]*[^0-9[:space:]]) { YYLEX(TOKEN_PERIOD); }
|
||||||
<VARIABLES>\"{string}\" { BEGIN(INITIAL); TextEscapeValue(yytext + 1, strlen( yytext ) - 2 ); YYLEX(TOKEN_STRING); }
|
<VARIABLES>\"{string}\" { BEGIN(INITIAL); TextEscapeValue(yytext + 1, strlen( yytext ) - 2 ); YYLEX(TOKEN_STRING); }
|
||||||
<VARIABLES>{varname} {
|
<VARIABLES>{varname} {
|
||||||
TextValue(yytext, strlen(yytext));
|
TextValue(yytext, strlen(yytext));
|
||||||
|
@ -264,15 +264,15 @@ varname [a-zA-Z0-9_\"\$]+
|
||||||
">" { YYLEX( TOKEN_GREATER_THAN ); }
|
">" { YYLEX( TOKEN_GREATER_THAN ); }
|
||||||
"<=" { YYLEX( TOKEN_LESS_THAN_OR_EQUAL ); }
|
"<=" { YYLEX( TOKEN_LESS_THAN_OR_EQUAL ); }
|
||||||
">=" { YYLEX( TOKEN_GREATER_THAN_OR_EQUAL ); }
|
">=" { YYLEX( TOKEN_GREATER_THAN_OR_EQUAL ); }
|
||||||
[ ]"-" { YYLEX( TOKEN_NEG ); }
|
[ \t]"-" { YYLEX( TOKEN_NEG ); }
|
||||||
|
|
||||||
"+" { YYLEX( TOKEN_PLUS ); }
|
"+" { YYLEX( TOKEN_PLUS ); }
|
||||||
"+=" { YYLEX( TOKEN_PLUS_EQUALS ); }
|
"+=" { YYLEX( TOKEN_PLUS_EQUALS ); }
|
||||||
"++"|[ ]"++" { YYLEX( TOKEN_INCREMENT ); }
|
"++"|[ \t]"++" { YYLEX( TOKEN_INCREMENT ); }
|
||||||
"-"|"-"[ ]|[ ]"-"[ ] { YYLEX( TOKEN_MINUS ); }
|
"-"|"-"[ \t]|[ \t]"-"[ \t] { YYLEX( TOKEN_MINUS ); }
|
||||||
"-=" { YYLEX( TOKEN_MINUS_EQUALS ); }
|
"-=" { YYLEX( TOKEN_MINUS_EQUALS ); }
|
||||||
[ ]"-=" { YYLEX( TOKEN_MINUS_EQUALS ); }
|
[ \t]"-=" { YYLEX( TOKEN_MINUS_EQUALS ); }
|
||||||
"--"|[ ]"--" { YYLEX( TOKEN_DECREMENT ); }
|
"--"|[ \t]"--" { YYLEX( TOKEN_DECREMENT ); }
|
||||||
"*" { YYLEX( TOKEN_MULTIPLY ); }
|
"*" { YYLEX( TOKEN_MULTIPLY ); }
|
||||||
"*=" { YYLEX( TOKEN_MULTIPLY_EQUALS ); }
|
"*=" { YYLEX( TOKEN_MULTIPLY_EQUALS ); }
|
||||||
"/" { YYLEX( TOKEN_DIVIDE ); }
|
"/" { YYLEX( TOKEN_DIVIDE ); }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue