%{ //====================================================== /** Zoo main configuration file parser **/ //====================================================== #include #include #include #include #include static int defaultsc=0; static maps* my_maps=NULL; static maps* current_maps=NULL; static map* previous_content=NULL; static map* current_content=NULL; static elements* current_element=NULL; static map* scontent=NULL; static char* curr_key; static int debug=0; static int previous_data=0; static int current_data=0; using namespace std; extern void crerror(const char *s); void usage(void) ; extern int crdebug; extern char crtext[]; extern int crlineno; extern FILE* crin; extern int crlex(void); extern int crlex_destroy(void); %} //====================================================== /* le type des lval des jetons et des elements non terminaux bison */ //====================================================== %union { char* s;char* chaine; char* key;char* val;} //====================================================== // jetons // //====================================================== /* les jetons que l on retrouve dans FLEX */ //====================================================== /* texte on a besoin de récupérer une valeur char* pour la comparer */ %token ID %token CHAINE /* STARTXMLDECL et ENDXMLDECL qui sont */ %token STARTXMLDECL ENDXMLDECL //====================================================== /* version="xxx" et encoding="xxx" */ %token VERSIONDECL ENCODINGDECL SDDECL //====================================================== /* < et > */ %token INFCAR SUPCAR //====================================================== /* / = a1 texte "texte" */ %token SLASH Eq CHARDATA ATTVALUE PAIR SPAIR EPAIR EPAIRS ANID %type PAIR %type EPAIRS %type EPAIR %type SPAIR //====================================================== /*