diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2017-11-24 13:46:00 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2017-11-27 10:53:30 +0100 |
commit | 098ac444e731d7674d8910264ae58fb876618a5a (patch) | |
tree | 8f4c9ab6ddcbed53f1ad2d993db98b688c41396a /src/odf | |
parent | a6b5a6bdd138a5ccc6827bcc73580df1e9218820 (diff) |
Move function in their own modules
Diffstat (limited to 'src/odf')
-rwxr-xr-x | src/odf/odf_ExpressionParser.mly | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/odf/odf_ExpressionParser.mly b/src/odf/odf_ExpressionParser.mly index 6b571a9..54836cd 100755 --- a/src/odf/odf_ExpressionParser.mly +++ b/src/odf/odf_ExpressionParser.mly @@ -1,6 +1,6 @@ %{ open ScTypes - module F = Functions + module S = Symbols let u = UTF8.from_utf8string @@ -44,8 +44,8 @@ value: expr: | num {Value (number ($1))} - | MINUS expr {Call (F.sub, [$2])} - | PLUS expr {Call (F.add, [$2])} + | MINUS expr {Call (S.sub, [$2])} + | PLUS expr {Call (S.add, [$2])} | L_SQ_BRACKET ref R_SQ_BRACKET {$2} @@ -54,19 +54,19 @@ expr: | STR {Value (string (u $1))} (* Mathematical operators *) - | expr MINUS expr {Call (F.sub, [$1; $3])} - | expr DIVIDE expr {Call (F.div, [$1; $3])} - | expr TIMES expr {Call (F.mul, [$1; $3])} - | expr PLUS expr {Call (F.add, [$1; $3])} - | expr POW expr {Call (F.pow, [$1; $3])} + | expr MINUS expr {Call (S.sub, [$1; $3])} + | expr DIVIDE expr {Call (S.div, [$1; $3])} + | expr TIMES expr {Call (S.mul, [$1; $3])} + | expr PLUS expr {Call (S.add, [$1; $3])} + | expr POW expr {Call (S.pow, [$1; $3])} (* Comparaison *) - | expr EQ expr {Call (F.eq, [$1; $3])} - | expr NEQ expr {Call (F.neq, [$1; $3])} - | expr LT expr {Call (F.lt, [$1; $3])} - | expr GT expr {Call (F.gt, [$1; $3])} - | expr LE expr {Call (F.le, [$1; $3])} - | expr GE expr {Call (F.ge, [$1; $3])} + | expr EQ expr {Call (S.eq, [$1; $3])} + | expr NEQ expr {Call (S.neq, [$1; $3])} + | expr LT expr {Call (S.lt, [$1; $3])} + | expr GT expr {Call (S.gt, [$1; $3])} + | expr LE expr {Call (S.le, [$1; $3])} + | expr GE expr {Call (S.ge, [$1; $3])} | ident LPAREN separated_list(SEMICOLON, expr) RPAREN { Call (u $1, $3) } |