// //The purpose of this file is to demonstrate the ability of BYACC/Java //to parse a heirarchial file structure. Note the use of comments //and nested objects. A group is an object with child objects. //Thus we demonstrate the ability of YACC to process recursive definitions // objectviewer { camera { position < 0 0 0 > up < 0 1 0 > direction < 0 0 1 > } scene { group { rotate < 0 0 40 > scale < 10 10 10 > translate < 5 5 5 > sphere { pos < 5 5 5 > 2 color < 0.5 0.5 0.5 > } sphere { pos < -2 2 2 > 3 color < 0.7 0.7 0.5 > } plane { pos < 5 10 5 > norm < 0 1 0 > } }//group group { rotate < 0 0 40 > scale < 10 10 10 > translate < 5 5 5 > sphere { pos < 5 5 5 > 2 color < 0.5 0.5 0.5 > } sphere { pos < -2 2 2 > 3 color < 0.7 0.7 0.5 > } plane { pos < 5 10 5 > norm < 0 1 0 > } }//group }//scene }//file