aboutsummaryrefslogtreecommitdiff
path: root/odf/odf_ExpressionParser.mly
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2017-01-02 17:56:04 +0100
committerSébastien Dailly <sebastien@chimrod.com>2017-01-10 14:35:04 +0100
commit0d1f9ff76aa6df3f17edd2d73c76ab444fec8528 (patch)
treee6a628b78a08beb7fd9912c3f4b9bbdcee59c3c4 /odf/odf_ExpressionParser.mly
parent444c0baa87b6edfb21c002bf9e079e10509ee0e9 (diff)
Corrected some issues with odf documents
Diffstat (limited to 'odf/odf_ExpressionParser.mly')
-rwxr-xr-xodf/odf_ExpressionParser.mly5
1 files changed, 4 insertions, 1 deletions
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 <string> STR
%token <string> LETTERS
+%token <string> 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: