From 0d1f9ff76aa6df3f17edd2d73c76ab444fec8528 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 2 Jan 2017 17:56:04 +0100 Subject: Corrected some issues with odf documents --- odf/odf_ExpressionParser.mly | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'odf/odf_ExpressionParser.mly') diff --git a/odf/odf_ExpressionParser.mly b/odf/odf_ExpressionParser.mly index 6c34c1d..9731699 100755 --- a/odf/odf_ExpressionParser.mly +++ b/odf/odf_ExpressionParser.mly @@ -13,6 +13,7 @@ %token STR %token LETTERS +%token IDENT %token DOLLAR %token DOT @@ -43,7 +44,8 @@ value: expr: | num {Value (Num ((snd $1), Some (u(fst $1))))} - | MINUS num {Value (Num (Num.minus_num (snd $2), Some (u("-" ^(fst $2)) )))} + | MINUS expr {Call (F.sub, [$2])} + | PLUS expr {Call (F.add, [$2])} | L_SQ_BRACKET ref R_SQ_BRACKET {$2} @@ -85,6 +87,7 @@ num: | NUM {$1} ident: + | IDENT { $1 } | text+ { String.concat "" $1 } text: -- cgit v1.2.3