diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-03-20 02:01:16 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-03-20 02:01:16 -0400 |
commit | 4566f4e34afaab1c47120e8a377859d88a142ffe (patch) | |
tree | 626541ad48efe078a4e6f86cf1af903d8225320b /dimension/common.rules | |
parent | fc06cb624d79788923ab2dedb3cd2ccab53cb2b4 (diff) | |
download | dimension-4566f4e34afaab1c47120e8a377859d88a142ffe.tar.xz |
A bunch more float functions.
Diffstat (limited to 'dimension/common.rules')
-rw-r--r-- | dimension/common.rules | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/dimension/common.rules b/dimension/common.rules index bb03577..fb38039 100644 --- a/dimension/common.rules +++ b/dimension/common.rules @@ -396,9 +396,54 @@ ARITH_EXPR: FLOAT_LITERAL $$ = dmnsn_new_astnode1(DMNSN_AST_DOT_TRANSMIT, @$, $1); } | "(" ARITH_EXPR ")" { $$ = $2; } + | "abs" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_ABS, @$, $3); + } + | "acos" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_ACOS, @$, $3); + } + | "acosh" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_ACOSH, @$, $3); + } + | "asc" "(" STRING ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_ASC, @$, $3); + } + | "asin" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_ASIN, @$, $3); + } + | "asinh" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_ASINH, @$, $3); + } + | "atan" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_ATAN, @$, $3); + } + | "atan2" "(" ARITH_EXPR "," ARITH_EXPR ")" { + $$ = dmnsn_new_astnode2(DMNSN_AST_ATAN2, @$, $3, $5); + } + | "atanh" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_ATANH, @$, $3); + } + | "ceil" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_CEIL, @$, $3); + } + | "cos" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_COS, @$, $3); + } + | "cosh" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_COSH, @$, $3); + } + | "degrees" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_DEGREES, @$, $3); + } + | "div" "(" ARITH_EXPR "," ARITH_EXPR ")" { + $$ = dmnsn_new_astnode2(DMNSN_AST_INT_DIV, @$, $3, $5); + } | "exp" "(" ARITH_EXPR ")" { $$ = dmnsn_new_astnode1(DMNSN_AST_EXP, @$, $3); } + | "floor" "(" ARITH_EXPR ")" { + $$ = dmnsn_new_astnode1(DMNSN_AST_FLOOR, @$, $3); + } | IDENTIFIER | "x" { $$ = dmnsn_new_ast_ivector(1, 0, 0, 0, 0); } | "u" { $$ = dmnsn_new_ast_ivector(1, 0, 0, 0, 0); } |