summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorGravatar Dietrich <dgeisler50@gmail.com>2015-05-18 22:08:43 -0600
committerGravatar Dietrich <dgeisler50@gmail.com>2015-05-18 22:08:43 -0600
commit25fca02e1deb9e60e6e330803731c9b4fcd45d34 (patch)
treeae0e3e76d76b00b756ff5844876e6d02f638c500 /Source/Core
parentc55533de9fc0b0bcc47cfca5fd26de93afac4d3b (diff)
added interpretation of floating point constants to the parser
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Parser.cs9
1 files changed, 6 insertions, 3 deletions
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<Variable>/*!*/ ins, out List<Variable>/*!*/ 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<Variable>/*!*/ ins, out List<Variable>/*!*/ outs, out QKeyValue kv) {
catch (FormatException)
{
this.SemErr("incorrectly formatted floating point");
- n = BigFloat.ZERO;
+ n = BigFloat.ZERO(8, 23);
}
}