summaryrefslogtreecommitdiffstats
path: root/dimension/common.rules
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-03-22 13:53:24 -0400
committerTavian Barnes <tavianator@gmail.com>2010-03-22 13:53:24 -0400
commit80b15832f59b5a5b4e7476c6eb4099b6edccbb1b (patch)
tree089318e423a51487e2de1cf58bb1dcd4e3f1f662 /dimension/common.rules
parentac591cc542f039af8f66567439fbb0aee3d93963 (diff)
downloaddimension-80b15832f59b5a5b4e7476c6eb4099b6edccbb1b.tar.xz
Handle built-in vector IDs the same way as floats.
Diffstat (limited to 'dimension/common.rules')
-rw-r--r--dimension/common.rules40
1 files changed, 13 insertions, 27 deletions
diff --git a/dimension/common.rules b/dimension/common.rules
index fea7794..02f2010 100644
--- a/dimension/common.rules
+++ b/dimension/common.rules
@@ -498,34 +498,20 @@ 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, @$);
- }
+ | "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, @$); }
+ | "x" { $$ = dmnsn_new_astnode(DMNSN_AST_X, @$); }
+ | "u" { $$ = dmnsn_new_astnode(DMNSN_AST_X, @$); }
+ | "y" { $$ = dmnsn_new_astnode(DMNSN_AST_Y, @$); }
+ | "v" { $$ = dmnsn_new_astnode(DMNSN_AST_Y, @$); }
+ | "z" { $$ = dmnsn_new_astnode(DMNSN_AST_Z, @$); }
+ | "t" { $$ = dmnsn_new_astnode(DMNSN_AST_T, @$); }
| IDENTIFIER
- | "x" { $$ = dmnsn_new_ast_ivector(1, 0, 0, 0, 0); }
- | "u" { $$ = dmnsn_new_ast_ivector(1, 0, 0, 0, 0); }
- | "y" { $$ = dmnsn_new_ast_ivector(0, 1, 0, 0, 0); }
- | "v" { $$ = dmnsn_new_ast_ivector(0, 1, 0, 0, 0); }
- | "z" { $$ = dmnsn_new_ast_ivector(0, 0, 1, 0, 0); }
- | "t" { $$ = dmnsn_new_ast_ivector(0, 0, 0, 1, 0); }
;
MAX_LIST: ARITH_EXPR "," ARITH_EXPR {