summaryrefslogtreecommitdiffstats
path: root/dimension/common.rules
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-03-22 13:20:56 -0400
committerTavian Barnes <tavianator@gmail.com>2010-03-22 13:20:56 -0400
commitac591cc542f039af8f66567439fbb0aee3d93963 (patch)
tree470c4277bf3b4bfafdd2b37aae064ee9ea53f77c /dimension/common.rules
parentbb71a70253ae5bf91e99dcd2809471abebea1b69 (diff)
downloaddimension-ac591cc542f039af8f66567439fbb0aee3d93963.tar.xz
Add built-in float constants.
Diffstat (limited to 'dimension/common.rules')
-rw-r--r--dimension/common.rules21
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); }