support of operators

This commit is contained in:
Ilia Filippov
2013-10-07 15:43:31 +04:00
parent 2741e3c1d0
commit 2e724b095e
7 changed files with 299 additions and 45 deletions

8
lex.ll
View File

@@ -419,6 +419,14 @@ while { RT; return TOKEN_WHILE; }
\"C\" { RT; return TOKEN_STRING_C_LITERAL; }
\.\.\. { RT; return TOKEN_DOTDOTDOT; }
"operator*" { return TOKEN_IDENTIFIER; }
"operator+" { return TOKEN_IDENTIFIER; }
"operator-" { return TOKEN_IDENTIFIER; }
"operator<<" { return TOKEN_IDENTIFIER; }
"operator>>" { return TOKEN_IDENTIFIER; }
"operator/" { return TOKEN_IDENTIFIER; }
"operator%" { return TOKEN_IDENTIFIER; }
L?\"(\\.|[^\\"])*\" { lStringConst(&yylval, &yylloc); return TOKEN_STRING_LITERAL; }
{IDENT} {