From: Peep P. <so...@us...> - 2004-03-21 09:01:40
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10745 Modified Files: lex.l Log Message: Added k, m, K, M integer constants. Index: lex.l =================================================================== RCS file: /cvsroot/agd/server/src/lex.l,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- lex.l 20 Mar 2004 19:18:42 -0000 1.7 +++ lex.l 21 Mar 2004 08:51:36 -0000 1.8 @@ -251,6 +251,10 @@ "}]" RET(s, "])", L_CLOSE_MAPPING); ":)" RET(s, ":)", L_CLOSE_FUNP); +[0-9]+k yylval.i = atoi(yytext) * 1000; RET(d, yylval.i, L_INTEGER); +[0-9]+m yylval.i = atoi(yytext) * 1000000; RET(d, yylval.i, L_INTEGER); +[0-9]+K yylval.i = atoi(yytext) * 1024; RET(d, yylval.i, L_INTEGER); +[0-9]+M yylval.i = atoi(yytext) * 1048576; RET(d, yylval.i, L_INTEGER); [0-9]+ yylval.i = atoi(yytext); RET(d, yylval.i, L_INTEGER); return RET(s, "return", L_RETURN); if RET(s, "if", L_IF); |