From 25fca02e1deb9e60e6e330803731c9b4fcd45d34 Mon Sep 17 00:00:00 2001 From: Dietrich Date: Mon, 18 May 2015 22:08:43 -0600 Subject: added interpretation of floating point constants to the parser --- Source/Core/Parser.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Source/Core/Parser.cs') diff --git a/Source/Core/Parser.cs b/Source/Core/Parser.cs index 7335dd37..6f793503 100644 --- a/Source/Core/Parser.cs +++ b/Source/Core/Parser.cs @@ -1887,9 +1887,12 @@ out List/*!*/ ins, out List/*!*/ outs, out QKeyValue kv) { Get(); //Skip the fp token Get(); if (t.val != "(") { throw new FormatException(); } - while (la.kind == 3 || la.kind == 6) { //Get values between the parens + while (la.kind == 1 || la.kind == 3 || la.kind == 6 || la.kind == 75) { //Get values between the parens Get(); - s += t.val + " "; + if (t.val == "-") //special negative case (la.kind == 75) + s += t.val; + else + s += t.val + " "; } Get(); if (t.val != ")") { throw new FormatException(); } @@ -1901,7 +1904,7 @@ out List/*!*/ ins, out List/*!*/ outs, out QKeyValue kv) { catch (FormatException) { this.SemErr("incorrectly formatted floating point"); - n = BigFloat.ZERO; + n = BigFloat.ZERO(8, 23); } } -- cgit v1.2.3