aboutsummaryrefslogtreecommitdiff
path: root/odf/odf_ExpressionParser.mly
diff options
context:
space:
mode:
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: