Clarified the syntax for real number literals. 1.0 is the same precision as AcReal, 1.0f is an explicit float and 1.0d is an explicit double.

This commit is contained in:
jpekkila
2019-10-07 18:24:32 +03:00
parent aa6c2b23d9
commit ff12332f06
4 changed files with 184 additions and 171 deletions

View File

@@ -39,7 +39,8 @@ L [a-zA-Z_]
"return" { return RETURN; }
{D}+"."{D}+ { return REAL_NUMBER; } /* Literals */
{D}+"."{D}+[fd]+ { return NUMBER; }
{D}+"."{D}+d+ { return DOUBLE_NUMBER; }
{D}+"."{D}+f+ { return NUMBER; }
{D}+[lu]* { return NUMBER; }
{L}({L}|{D})* { return IDENTIFIER; }
\"(.)*\" { return IDENTIFIER; } /* String */