1 /* Asset Package Compiler */
9 extern int lexer_init();
16 %define parse.error verbose
18 %define api.value.type union
31 %type <str> elem_label
46 /* Syntax Directed Translation Scheme of the APC grammar */
52 class_list {condense();} //Seperate file?
56 class_list class {inc_cbi()};
61 label CLOPEN class_closure CLCLOSE {set_class_label($1);};
66 | subclass_list set_list
71 subclass_list class {inc_subclass_idx();};
76 set_list set {inc_set_index();};
81 //set needs a label, vdat_id.
83 set_map_data element_list HIGH {insert_set();};
88 //TODO: Figure out what to do with hitbox and root.
92 | ref_list hitbox root
103 quads quad {inc_ref();};
108 NUM NUM NUM NUM {insert_ref($1, $2, $3, $4);};
119 //parent_id is the set_index of the subclass_index.
121 element_list element HIGH {inc_ele();};
126 set_label elem_label vdat LOW {insert_ele($2,$3); };
138 vdat model {inc_models();};
149 label SS FNAME {insert_fdat($1, $2, $3);};
168 yyerror (char const *s)
169 { fprintf(stderr, "%s\n", s);