summaryrefslogtreecommitdiffstats
path: root/dimension/grammar.rules
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-11-19 20:30:14 -0500
committerTavian Barnes <tavianator@gmail.com>2010-11-19 20:31:06 -0500
commitd47af986a7832add1c149235f44fa8f57b56e6d8 (patch)
tree40fbd4a5e84afa188c2f23a7727d3d9d2acb6840 /dimension/grammar.rules
parent6137aed0179476eaa626660885f01ea3f04f988a (diff)
downloaddimension-d47af986a7832add1c149235f44fa8f57b56e6d8.tar.xz
Implement sky spheres.
Diffstat (limited to 'dimension/grammar.rules')
-rw-r--r--dimension/grammar.rules22
1 files changed, 22 insertions, 0 deletions
diff --git a/dimension/grammar.rules b/dimension/grammar.rules
index 0e9d6f1..8b110c0 100644
--- a/dimension/grammar.rules
+++ b/dimension/grammar.rules
@@ -94,9 +94,31 @@ GLOBAL_CHARSET: "ascii" {
/* Atmospheric effects */
ATMOSPHERIC_EFFECT: BACKGROUND
+ | SKY_SPHERE
;
BACKGROUND: "background" "{" COLOR "}" {
$$ = dmnsn_new_astnode1(DMNSN_AST_BACKGROUND, @$, $3);
}
;
+
+SKY_SPHERE: "sky_sphere" "{"
+ SKY_SPHERE_ITEMS
+ "}"
+ {
+ $$ = $3;
+ }
+;
+
+SKY_SPHERE_ITEMS: /* empty */ {
+ $$ = dmnsn_new_astnode(DMNSN_AST_SKY_SPHERE, @$);
+ }
+ | SKY_SPHERE_ITEMS PIGMENT {
+ $$ = $1;
+ dmnsn_array_push($$.children, &$2);
+ }
+ | SKY_SPHERE_ITEMS TRANSFORMATION {
+ $$ = $1;
+ dmnsn_array_push($$.children, &$2);
+ }
+;