mirror of https://github.com/vitalif/openscad
TOK_NUMBER lexer improvement by Steven Dick
git-svn-id: http://svn.clifford.at/openscad/trunk@579 b57f626f-c46c-0410-a088-ec61d464b74cstl_dim
parent
ae97a22883
commit
7f0551e538
|
@ -65,6 +65,8 @@ extern const char *parser_source_path;
|
|||
|
||||
%x comment
|
||||
|
||||
DIGIT [0-9]
|
||||
|
||||
%%
|
||||
|
||||
include[ \t\r\n>]*"<"[^ \t\r\n>]+">" {
|
||||
|
@ -135,7 +137,7 @@ use[ \t\r\n>]*"<"[^ \t\r\n>]+">" {
|
|||
"false" return TOK_FALSE;
|
||||
"undef" return TOK_UNDEF;
|
||||
|
||||
[0-9][0-9.]* { parserlval.number = QString(yytext).toDouble(); return TOK_NUMBER; }
|
||||
{DIGIT}+|{DIGIT}*\.{DIGIT}+|{DIGIT}+\.{DIGIT}* { parserlval.number = QString(yytext).toDouble(); return TOK_NUMBER; }
|
||||
"$"?[a-zA-Z0-9_]+ { parserlval.text = strdup(yytext); return TOK_ID; }
|
||||
|
||||
\"[^"]*\" {
|
||||
|
|
Loading…
Reference in New Issue