diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-03-22 13:20:56 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-03-22 13:20:56 -0400 |
commit | ac591cc542f039af8f66567439fbb0aee3d93963 (patch) | |
tree | 470c4277bf3b4bfafdd2b37aae064ee9ea53f77c /dimension/common.rules | |
parent | bb71a70253ae5bf91e99dcd2809471abebea1b69 (diff) | |
download | dimension-ac591cc542f039af8f66567439fbb0aee3d93963.tar.xz |
Add built-in float constants.
Diffstat (limited to 'dimension/common.rules')
-rw-r--r-- | dimension/common.rules | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/dimension/common.rules b/dimension/common.rules index c8e0767..fea7794 100644 --- a/dimension/common.rules +++ b/dimension/common.rules @@ -498,6 +498,27 @@ ARITH_EXPR: FLOAT_LITERAL | "vlength" "(" ARITH_EXPR ")" { $$ = dmnsn_new_astnode1(DMNSN_AST_VLENGTH, @$, $3); } + | "pi" { + $$ = dmnsn_new_astnode(DMNSN_AST_PI, @$); + } + | "true" { + $$ = dmnsn_new_astnode(DMNSN_AST_TRUE, @$); + } + | "on" { + $$ = dmnsn_new_astnode(DMNSN_AST_TRUE, @$); + } + | "yes" { + $$ = dmnsn_new_astnode(DMNSN_AST_TRUE, @$); + } + | "false" { + $$ = dmnsn_new_astnode(DMNSN_AST_FALSE, @$); + } + | "off" { + $$ = dmnsn_new_astnode(DMNSN_AST_FALSE, @$); + } + | "no" { + $$ = dmnsn_new_astnode(DMNSN_AST_FALSE, @$); + } | IDENTIFIER | "x" { $$ = dmnsn_new_ast_ivector(1, 0, 0, 0, 0); } | "u" { $$ = dmnsn_new_ast_ivector(1, 0, 0, 0, 0); } |