Commit 76ec2088 authored by Sergio Costas's avatar Sergio Costas

The exponent of hexadecimal floating point constants is not optional

parent a7f42410
......@@ -7,18 +7,57 @@
*/
#ifndef ENABLE_CRUST_TAGS
#define ENABLE_CRUST_TAGS
#ifndef __crust__
#define __crust__
#endif
#ifndef __crust_borrow__
#define __crust_borrow__
#endif
#ifndef __crust_recycle__
#define __crust_recycle__
#endif
#ifndef __crust_alias__
#define __crust_alias__
#endif
#ifndef __crust_no_0__
#define __crust_no_0__
#endif
#ifndef __crust_not_null__
#define __crust_not_null__
#endif
#ifndef __crust_enable__
#define __crust_enable__
#endif
#ifndef __crust_disable__
#define __crust_disable__
#endif
#ifndef __crust_full_enable__
#define __crust_full_enable__
#endif
#ifndef __crust_debug__
#define __crust_debug__
#endif
#ifndef __crust_set_null__
#define __crust_set_null__(p)
#endif
#ifndef __crust_set_not_null__
#define __crust_set_not_null__(p)
#endif
#ifndef __crust_override__
#define __crust_override__
#endif
#endif
......@@ -21,9 +21,9 @@ D [0-9]
L [a-zA-Z_]
H [a-fA-F0-9]
E ([Ee][+-]?{D}+)
P ([Pp][+-]?{D}+)
P ([Pp][+-]?{D}+)
FS (f|F|l|L)
IS ((u|U)|(u|U)?(l|L|ll|LL)|(l|L|ll|LL)(u|U))
IS ((u|U)|(u|U)?(l|L|ll|LL)|(l|L|ll|LL)(u|U))
WS [ \\t\\v\\n\\f]
WS2 [ \\t]
......@@ -167,8 +167,8 @@ L?'(\\.|[^\\'\n])+' { char *start;
{D}*"."{D}+{E}?{FS}? { sscanf(yytext,"%lf",&tmpfloat); return prepare_leaf(0,tmpfloat,FCONSTANT); }
{D}+"."{D}*{E}?{FS}? { sscanf(yytext,"%lf",&tmpfloat); return prepare_leaf(0,tmpfloat,FCONSTANT); }
0[xX]{H}+{P}{FS}? { sscanf(yytext,"%lfx",&tmpfloat); return prepare_leaf(0,tmpfloat,FCONSTANT); }
0[xX]{H}*"."{H}+{P}?{FS}? { sscanf(yytext,"%lfx",&tmpfloat); return prepare_leaf(0,tmpfloat,FCONSTANT); }
0[xX]{H}+"."{H}*{P}?{FS}? { sscanf(yytext,"%lfx",&tmpfloat); return prepare_leaf(0,tmpfloat,FCONSTANT); }
0[xX]{H}*"."{H}+{P}{FS}? { sscanf(yytext,"%lfx",&tmpfloat); return prepare_leaf(0,tmpfloat,FCONSTANT); }
0[xX]{H}+"."{H}*{P}{FS}? { sscanf(yytext,"%lfx",&tmpfloat); return prepare_leaf(0,tmpfloat,FCONSTANT); }
L?\"(\\.|[^\\"\n])*\" { return prepare_leaf(0,0.0,STRING_LITERAL); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment