summaryrefslogtreecommitdiffstats
path: root/dimension/grammar.rules
diff options
context:
space:
mode:
Diffstat (limited to 'dimension/grammar.rules')
-rw-r--r--dimension/grammar.rules127
1 files changed, 0 insertions, 127 deletions
diff --git a/dimension/grammar.rules b/dimension/grammar.rules
deleted file mode 100644
index 148e082..0000000
--- a/dimension/grammar.rules
+++ /dev/null
@@ -1,127 +0,0 @@
-#line 2 "grammar.rules"
-
-/*************************************************************************
- * Copyright (C) 2010 Tavian Barnes <tavianator@tavianator.com> *
- * *
- * This file is part of Dimension. *
- * *
- * Dimension is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU General Public License as published by the *
- * Free Software Foundation; either version 3 of the License, or (at *
- * your option) any later version. *
- * *
- * Dimension is distributed in the hope that it will be useful, but *
- * WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program. If not, see <http://www.gnu.org/licenses/>. *
- *************************************************************************/
-
-/*
- * Start symbol
- */
-
-SCENE: /* empty */
- | SCENE SCENE_ITEM {
- dmnsn_array_push(astree, &$2);
- }
-;
-
-/* Top-level scene item */
-SCENE_ITEM: GLOBAL_SETTINGS
- | ATMOSPHERIC_EFFECT
- | CAMERA
- | OBJECT
-;
-
-/* Global settings */
-
-GLOBAL_SETTINGS: "global_settings" "{"
- GLOBAL_SETTINGS_ITEMS
- "}"
- {
- $$ = $3;
- }
-;
-
-GLOBAL_SETTINGS_ITEMS: /* empty */ {
- $$ = dmnsn_new_astnode(DMNSN_AST_GLOBAL_SETTINGS, @$);
- }
- | GLOBAL_SETTINGS_ITEMS GLOBAL_SETTINGS_ITEM {
- $$ = $1;
- dmnsn_array_push($$.children, &$2);
- }
-;
-
-GLOBAL_SETTINGS_ITEM: "adc_bailout" FLOAT {
- $$ = dmnsn_new_astnode1(DMNSN_AST_ADC_BAILOUT, @$, $2);
- }
- | "ambient_light" COLOR {
- $$ = dmnsn_new_astnode1(DMNSN_AST_AMBIENT, @$, $2);
- }
- | "assumed_gamma" FLOAT {
- dmnsn_diagnostic(@1,
- "WARNING: assumed_gamma not supported");
- $$ = dmnsn_new_astnode1(DMNSN_AST_ASSUMED_GAMMA, @$, $2);
- }
- | "charset" GLOBAL_CHARSET {
- dmnsn_diagnostic(@1,
- "WARNING: charset not supported");
- $$ = dmnsn_new_astnode1(DMNSN_AST_CHARSET, @$, $2);
- }
- | "max_intersections" INT {
- dmnsn_diagnostic(@1,
- "WARNING: max_intersections is"
- " unnecessary for Dimension");
- $$ = dmnsn_new_astnode1(DMNSN_AST_MAX_INTERSECTIONS, @$,
- $2);
- }
- | "max_trace_level" INT {
- $$ = dmnsn_new_astnode1(DMNSN_AST_MAX_TRACE_LEVEL, @$,
- $2);
- }
-;
-
-GLOBAL_CHARSET: "ascii" {
- $$ = dmnsn_new_astleaf(DMNSN_AST_ASCII, @$);
- }
- | "utf8" {
- $$ = dmnsn_new_astleaf(DMNSN_AST_UTF8, @$);
- }
- | "sys" {
- $$ = dmnsn_new_astleaf(DMNSN_AST_SYS, @$);
- }
-
-/* 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);
- }
-;