summaryrefslogtreecommitdiff
path: root/test/raytracer/gml.h
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2008-08-09 08:06:33 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2008-08-09 08:06:33 +0000
commit285f5bec5bb03d4e825e5d866e94008088dd6155 (patch)
tree9df69ded9ed4f4049e0b3887fdd99fcdf3b1746f /test/raytracer/gml.h
parenta83f0c1710cc5143dd885e84c94e14f7d3216f93 (diff)
Ajout nouveaux tests
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@708 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/raytracer/gml.h')
-rw-r--r--test/raytracer/gml.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/test/raytracer/gml.h b/test/raytracer/gml.h
new file mode 100644
index 0000000..20ca3e9
--- /dev/null
+++ b/test/raytracer/gml.h
@@ -0,0 +1,73 @@
+/* The GML abstract syntax tree */
+
+enum operation {
+ Identifier,
+ Binder,
+ Boolean,
+ Integer,
+ Real,
+ String,
+ Array,
+ Function,
+ Op_acos,
+ Op_addi,
+ Op_addf,
+ Op_apply,
+ Op_asin,
+ Op_clampf,
+ Op_cone,
+ Op_cos,
+ Op_cube,
+ Op_cylinder,
+ Op_difference,
+ Op_divi,
+ Op_divf,
+ Op_eqi,
+ Op_eqf,
+ Op_floor,
+ Op_frac,
+ Op_get,
+ Op_getx,
+ Op_gety,
+ Op_getz,
+ Op_if,
+ Op_intersect,
+ Op_length,
+ Op_lessi,
+ Op_lessf,
+ Op_light,
+ Op_modi,
+ Op_muli,
+ Op_mulf,
+ Op_negi,
+ Op_negf,
+ Op_plane,
+ Op_point,
+ Op_pointlight,
+ Op_real,
+ Op_render,
+ Op_rotatex,
+ Op_rotatey,
+ Op_rotatez,
+ Op_scale,
+ Op_sin,
+ Op_sphere,
+ Op_spotlight,
+ Op_sqrt,
+ Op_subi,
+ Op_subf,
+ Op_translate,
+ Op_union,
+ Op_uscale,
+ Op_print
+};
+
+struct tok {
+ enum operation tag;
+ union {
+ char * s; /* Identifier, Binder, String */
+ int i; /* Boolean, Integer */
+ flt d; /* Real */
+ struct array * a; /* Array, Function */
+ } u;
+};