aboutsummaryrefslogtreecommitdiff
path: root/boot/parser.yy
diff options
context:
space:
mode:
Diffstat (limited to 'boot/parser.yy')
-rw-r--r--boot/parser.yy13
1 files changed, 10 insertions, 3 deletions
diff --git a/boot/parser.yy b/boot/parser.yy
index 411922d..c45fdbc 100644
--- a/boot/parser.yy
+++ b/boot/parser.yy
@@ -82,7 +82,8 @@ along with GCC; see the file COPYING3. If not see
%token <std::pair<std::uint8_t, elna::boot::integer_sign>> INTEGER8 WORD8
%token <std::pair<std::uint16_t, elna::boot::integer_sign>> INTEGER16 WORD16
%token <std::pair<std::uint32_t, elna::boot::integer_sign>> INTEGER32 WORD32
-%token <double> FLOAT
+%token <float> SINGLE
+%token <double> DOUBLE
%token <std::uint32_t> CHARACTER
%token <std::string> STRING
%token <bool> BOOLEAN
@@ -298,9 +299,15 @@ literal:
$$ = new boot::literal<boot::integer_literal>(boot::make_position(@$),
boot::integer_literal::from(magnitude), wants_signed);
}
- | FLOAT
+ | SINGLE
{
- $$ = new boot::literal<double>(boot::make_position(@$), $1, boot::integer_sign::unmarked);
+ $$ = new boot::literal<boot::float_literal>(boot::make_position(@$),
+ boot::float_literal::from($1), boot::integer_sign::unmarked);
+ }
+ | DOUBLE
+ {
+ $$ = new boot::literal<boot::float_literal>(boot::make_position(@$),
+ boot::float_literal::from($1), boot::integer_sign::unmarked);
}
| BOOLEAN
{