/* * Author : Gérald FENOY * * Copyright (c) 209-2015 GeoLabs SARL * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ %{ #include #include #include #include static int tmp_count=1; static int defaultsc=0; static bool wait_maincontent=true; static bool wait_mainmetadata=false; static bool wait_metadata=false; static bool wait_nested=false; static bool wait_inputs=false; static bool wait_defaults=false; static bool wait_supporteds=false; static bool wait_outputs=false; static bool wait_data=false; static service* my_service=NULL; static map* current_content=NULL; static elements* current_element=NULL; static char* curr_key; static int debug=0; static int data=-1; static int previous_data=0; static int current_data=0; static int nested_level=0; // namespace using namespace std; // srerror void srerror(const char *s); // usage () void usage(void) ; // srdebug extern int srdebug; extern char srtext[]; // srlineno extern int srlineno; // srin extern FILE* srin; // srlex extern int srlex(void); extern int srlex_destroy(void); %} %union {char * s;char* chaine;char* key;char* val;} // jetons // %token ID %token CHAINE %token INFCAR SUPCAR /* / = a1 texte "texte" */ %token SLASH Eq CHARDATA ATTVALUE PAIR SPAIR EPAIR ANID %type PAIR %type EPAIR %type SPAIR /*