Parse decimal values

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-09-06 08:19:22 -07:00
parent f3f74b9ff5
commit 3dc55c452c
3 changed files with 17 additions and 1 deletions

View file

@ -884,10 +884,14 @@ class parser::imp {
}
expr parse_decimal() {
not_implemented_yet();
auto p = pos();
expr r = save(mk_real_value(m_scanner.get_num_val()), p);
next();
return r;
}
expr parse_string() {
// TODO
not_implemented_yet();
}

5
tests/lean/arith8.lean Normal file
View file

@ -0,0 +1,5 @@
Eval 10.3
Eval 0.3
Eval 0.3 + 0.1
Eval 0.2 + 0.7
Eval 1/3 + 0.1

View file

@ -0,0 +1,7 @@
Set: pp::colors
Set: pp::unicode
103/10
3/10
2/5
9/10
13/30