summaryrefslogtreecommitdiffstats
path: root/dimension/common.rules
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-03-09 00:14:42 -0500
committerTavian Barnes <tavianator@gmail.com>2010-03-09 00:14:42 -0500
commit2afc9be712c69a66833de75683cdbaa3886379f1 (patch)
treead1b8adedbfded210d9389739b0edab05313ba79 /dimension/common.rules
parent66b9177cce4e186bf3572443af2436d7a9d0f162 (diff)
downloaddimension-2afc9be712c69a66833de75683cdbaa3886379f1.tar.xz
Implement unit vectors.
Diffstat (limited to 'dimension/common.rules')
-rw-r--r--dimension/common.rules6
1 files changed, 6 insertions, 0 deletions
diff --git a/dimension/common.rules b/dimension/common.rules
index 72480c0..c03eee8 100644
--- a/dimension/common.rules
+++ b/dimension/common.rules
@@ -397,6 +397,12 @@ ARITH_EXPR: FLOAT_LITERAL
}
| "(" ARITH_EXPR ")" { $$ = $2; }
| 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); }
;
/* Colors */