summaryrefslogtreecommitdiffstats
path: root/dimension/common.rules
diff options
context:
space:
mode:
Diffstat (limited to 'dimension/common.rules')
-rw-r--r--dimension/common.rules20
1 files changed, 20 insertions, 0 deletions
diff --git a/dimension/common.rules b/dimension/common.rules
index 89b7ab8..e5e6543 100644
--- a/dimension/common.rules
+++ b/dimension/common.rules
@@ -283,6 +283,7 @@ OBJECT: FINITE_SOLID_OBJECT
;
FINITE_SOLID_OBJECT: BOX
+ | CYLINDER
| SPHERE
;
@@ -296,6 +297,25 @@ BOX: "box" "{"
}
;
+CYLINDER: "cylinder" "{"
+ VECTOR "," VECTOR "," FLOAT
+ MAYBE_OPEN
+ OBJECT_MODIFIERS
+ "}"
+ {
+ dmnsn_astnode object
+ = dmnsn_new_astnode4(DMNSN_AST_CYLINDER, @$, $3, $5, $7, $8);
+ $$ = dmnsn_new_astnode2(DMNSN_AST_OBJECT, @$, object, $9);
+ }
+;
+
+MAYBE_OPEN: /* empty */ {
+ $$ = dmnsn_new_ast_integer(false);
+ }
+ | "open" {
+ $$ = dmnsn_new_ast_integer(true);
+ }
+
SPHERE: "sphere" "{"
VECTOR "," FLOAT
OBJECT_MODIFIERS