source: trunk/zoo-kernel/service_conf.y @ 65

Last change on this file since 65 was 65, checked in by djay, 13 years ago

Add support for multiple outputs format for DescribeProcess? and Execute requests. Note that currently if RawDataOutput? is asked, then only first output can be returned.

File size: 21.8 KB
Line 
1%{
2//======================================================
3/**
4 * Thx to Jean-Marie CODOL and Naitan GROLLEMUND
5 * copyright 2009 GeoLabs SARL
6 * Author : Gérald FENOY
7 *
8 */
9//======================================================
10
11#include <string>
12#include <stdio.h>
13#include <ctype.h>
14#include <service.h>
15  //#include <vector>
16
17static int tmp_count=1;
18static int defaultsc=0;
19static bool wait_maincontent=true;
20static bool wait_mainmetadata=false;
21static bool wait_metadata=false;
22static bool wait_inputs=false;
23static bool wait_defaults=false;
24static bool wait_supporteds=false;
25static bool wait_outputs=false;
26static bool wait_data=false;
27static int services_c=0;
28static service* my_service=NULL;
29static map* previous_content=NULL;
30static map* current_content=NULL;
31static elements* current_element=NULL;
32static map* scontent=NULL;
33static char* curr_key;
34static int debug=0;
35static int data=-1;
36static int previous_data=0;
37static int current_data=0;
38static char* myFinalObjectAsJSON="{";
39// namespace
40using namespace std;
41//======================================================
42
43// srerror
44void srerror(char *s);
45//======================================================
46
47// usage ()
48void usage(void) ;
49//======================================================
50
51// srdebug
52extern int srdebug;
53//======================================================
54
55extern char srtext[];
56
57// srlineno
58extern int srlineno;
59//======================================================
60
61// srin
62extern FILE* srin;
63//======================================================
64
65// srlex
66extern int srlex(void);
67extern int srlex_destroy(void);
68
69//vector<char*> lattribute;
70
71%}
72
73
74
75%union
76{char * s;char* chaine;char* key;char* val;}
77
78// jetons //
79%token <s> ID
80%token <s> CHAINE
81/* STARTXMLDECL et ENDXMLDECL qui sont <?xml et ?>*/
82%token STARTXMLDECL ENDXMLDECL
83//======================================================
84/* version="xxx" et encoding="xxx" */
85%token VERSIONDECL ENCODINGDECL SDDECL
86//======================================================
87/* < et > */
88%token INFCAR SUPCAR
89//======================================================
90/* / = a1  texte "texte" */
91%token SLASH Eq CHARDATA ATTVALUE PAIR SPAIR EPAIR ANID
92%type <chaine> PAIR
93%type <chaine> EPAIR
94%type <chaine> SPAIR
95//======================================================
96/* <!-- xxx -> <? xxx yyy ?> */
97%token PI PIERROR /** COMMENT **/
98//======================================================
99/* <!-- xxx -> <? xxx yyy ?> */
100%token ERREURGENERALE CDATA WHITESPACE NEWLINE
101%type <s> STag
102%type <s> ETag
103%type <s> ANID
104//======================================================
105// %start
106//======================================================
107
108%%
109// document <//===
110//======================================================
111// regle 1
112// on est a la racine du fichier xml
113//======================================================
114document
115 : miscetoile element miscetoile {}
116 | contentetoile processid contentetoile document {}
117 ;
118
119miscetoile
120 : miscetoile PIERROR {  srerror("processing instruction begining with <?xml ?> impossible\n");}
121 | miscetoile PI {}
122 | {}
123 ;
124// element
125//======================================================
126// regle 39
127// OUVRANTE CONTENU FERMANTE obligatoirement
128// ou neutre
129// on ne peut pas avoir Epsilon
130// un fichier xml ne peut pas etre vide ou seulement avec un prolog
131//======================================================
132element
133 : STag contentetoile ETag     
134{
135}
136
137// pour neutre
138// on a rien a faire, meme pas renvoyer l identificateur de balise
139// vu qu'il n y a pas de comparaison d'identificateurs avec un balise jumelle .
140 | EmptyElemTag          {}
141 ;
142
143//======================================================
144// STag
145//======================================================
146// regle 40
147// BALISE OUVRANTE
148// on est obligé de faire appel a infcar et supcar
149// pour acceder aux start conditions DANSBALISE et INITIAL
150//======================================================
151STag
152: INFCAR ID Attributeetoile SUPCAR
153{
154  if(my_service->content==NULL){
155#ifdef DEBUG_SERVICE_CONF
156    fprintf(stderr,"NO CONTENT\n");
157#endif
158    addMapToMap(&my_service->content,current_content);
159    freeMap(&current_content);
160    free(current_content);
161    current_content=NULL;
162    my_service->metadata=NULL;
163    wait_maincontent=false;
164  }
165  if(strncasecmp($2,"DataInputs",10)==0){
166    if(wait_mainmetadata==true){
167      addMapToMap(&my_service->metadata,current_content);
168      freeMap(&current_content);
169      free(current_content);
170      current_content=NULL;
171    }
172    if(current_element==NULL){
173#ifdef DEBUG_SERVICE_CONF
174      fprintf(stderr,"(DATAINPUTS - 184) FREE current_element\n");
175#endif
176      freeElements(&current_element);
177      free(current_element);
178#ifdef DEBUG_SERVICE_CONF
179      fprintf(stderr,"(DATAINPUTS - 186) ALLOCATE current_element\n");
180#endif
181      current_element=NULL;
182      current_element=(elements*)malloc(ELEMENTS_SIZE);
183      current_element->name=NULL;
184      current_element->content=NULL;
185      current_element->metadata=NULL;
186      current_element->format=NULL;
187      current_element->defaults=NULL;
188      current_element->supported=NULL;
189      current_element->next=NULL;
190    }
191    wait_inputs=true;
192    current_data=1;
193    previous_data=1;
194  }
195  else
196    if(strncasecmp($2,"DataOutputs",11)==0){
197      if(wait_inputs==true){
198#ifdef DEBUG_SERVICE_CONF
199        fprintf(stderr,"(DATAOUTPUTS) DUP INPUTS current_element\n");
200        fprintf(stderr,"CURRENT_ELEMENT\n");
201        dumpElements(current_element);
202        fprintf(stderr,"SERVICE INPUTS\n");
203        dumpElements(my_service->inputs);
204        dumpService(my_service);
205#endif 
206        if(my_service->inputs==NULL){
207          my_service->inputs=dupElements(current_element);
208          my_service->inputs->next=NULL;
209        }
210        else if(current_element!=NULL && current_element->name!=NULL){
211          addToElements(&my_service->inputs,current_element);
212        }
213#ifdef DEBUG_SERVICE_CONF
214        fprintf(stderr,"CURRENT_ELEMENT\n");
215        dumpElements(current_element);
216        fprintf(stderr,"SERVICE INPUTS\n");
217        dumpElements(my_service->inputs);
218        fprintf(stderr,"(DATAOUTPUTS) FREE current_element\n");
219#endif
220        freeElements(&current_element);
221        free(current_element);
222        current_element=NULL;
223        wait_inputs=false;
224      }
225      if(current_element==NULL){
226#ifdef DEBUG_SERVICE_CONF
227        fprintf(stderr,"(DATAOUTPUTS - 206) ALLOCATE current_element (%s)\n",$2);
228#endif
229        current_element=(elements*)malloc(ELEMENTS_SIZE);
230        current_element->name=NULL;
231        current_element->content=NULL;
232        current_element->metadata=NULL;
233        current_element->format=NULL;
234        current_element->defaults=NULL;
235        current_element->supported=NULL;
236        current_element->next=NULL;
237      }
238      wait_outputs=true;
239      current_data=2;
240      previous_data=2;
241    }
242    else
243      if(strncasecmp($2,"MetaData",8)==0){
244        current_data=3;
245        if(current_element!=NULL){
246          wait_metadata=true;
247#ifdef DEBUG_SERVICE_CONF
248          fprintf(stderr,"add current_content to current_element->content\n");
249          fprintf(stderr,"LINE 247");
250#endif
251          addMapToMap(&current_element->content,current_content);
252          freeMap(&current_content);
253          free(current_content);
254        }
255        else{
256          wait_mainmetadata=true;
257        }
258        current_content=NULL;
259      }
260      else
261        if(strncasecmp($2,"ComplexData",11)==0 || strncasecmp($2,"LiteralData",10)==0
262           || strncasecmp($2,"ComplexOutput",13)==0 || strncasecmp($2,"LiteralOutput",12)==0){
263          current_data=4;
264          if(wait_metadata==true){
265            if(current_content!=NULL){
266              addMapToMap(&current_element->metadata,current_content);
267              current_element->next=NULL;
268              current_element->format=strdup($2);
269              current_element->defaults=NULL;
270              current_element->supported=NULL;
271              freeMap(&current_content);
272              free(current_content);
273            }
274          }else{
275            // No MainMetaData
276            addMapToMap(&current_element->content,current_content);
277            freeMap(&current_content);
278            free(current_content);
279            current_element->metadata=NULL;
280            current_element->next=NULL;
281            current_element->format=strdup($2);
282            current_element->defaults=NULL;
283            current_element->supported=NULL;
284          }
285          current_content=NULL;
286          wait_metadata=false;
287        }
288        else
289          if(strncasecmp($2,"Default",7)==0){
290            wait_defaults=true;
291            current_data=5;
292          }
293          else
294            if(strncasecmp($2,"Supported",9)==0){
295              wait_supporteds=true;
296              if(wait_defaults==true){
297                defaultsc++;
298              }
299              current_data=5;
300            }
301#ifdef DEBUG_SERVICE_CONF
302  printf("* Identifiant : %s\n",$2);
303#endif
304}
305 ;
306
307//======================================================
308// Attributeetoile
309//======================================================
310// regle 41
311// une liste qui peut etre vide d'attributs
312// utiliser la récursivité a gauche
313//======================================================
314Attributeetoile
315 : Attributeetoile attribute  {}
316 |                                {/* Epsilon */}
317 ;
318
319//======================================================
320// attribute
321//======================================================
322// regle 41
323// un attribut est compose d'un identifiant
324// d'un "="
325// et d'une définition de chaine de caractere
326// ( "xxx" ou 'xxx' )
327//======================================================
328attribute
329 : ID Eq ATTVALUE               
330{
331#ifdef DEBUG_SERVICE_CONF
332  printf ("attribute : %s\n",$1) ;
333#endif
334}
335 ;
336
337//======================================================
338// EmptyElemTag
339//======================================================
340// regle 44
341// ICI ON DEFINIT NEUTRE
342// on ne renvoie pas de char*
343// parce qu'il n'y a pas de comparaisons a faire
344// avec un identifiant d'une balise jumelle
345//======================================================
346EmptyElemTag
347 : INFCAR ID Attributeetoile SLASH SUPCAR       {/*lattribute.clear();/* voir Stag */}
348 ;
349
350//======================================================
351// ETag
352//======================================================
353// regle 42
354// BALISE FERMANTE
355// les separateurs après ID sont filtrés
356//======================================================
357ETag
358 : INFCAR SLASH ID SUPCAR
359{
360  if(strcmp($3,"DataInputs")==0){
361    current_data=1;
362  }
363  if(strcmp($3,"DataOutputs")==0){
364    current_data=2;
365  }
366  if(strcmp($3,"MetaData")==0){
367    current_data=previous_data;
368  }
369  if(strcmp($3,"ComplexData")==0 || strcmp($3,"LiteralData")==0
370     || strcmp($3,"ComplexOutput")==0 || strcmp($3,"LiteralOutput")==0){
371    current_content=NULL;
372  }
373  if(strcmp($3,"Default")==0){
374    current_data=previous_data;
375    if(current_element->defaults==NULL){
376      current_element->defaults=(iotype*)malloc(IOTYPE_SIZE);
377      current_element->defaults->content=NULL;
378    }
379    addMapToMap(&current_element->defaults->content,current_content);
380    freeMap(&current_content);
381    free(current_content);
382    current_element->defaults->next=NULL;
383    wait_defaults=false;
384    current_content=NULL;
385    current_element->supported=NULL;
386    current_element->next=NULL;
387  }
388  if(strcmp($3,"Supported")==0){
389    current_data=previous_data;
390    if(current_element->supported==NULL){
391      if(current_content!=NULL){
392        current_element->supported=(iotype*)malloc(IOTYPE_SIZE);
393        current_element->supported->content=NULL;
394        addMapToMap(&current_element->supported->content,current_content);
395        freeMap(&current_content);
396        free(current_content);
397        current_element->supported->next=NULL;
398        current_content=NULL;
399      }else{
400        current_element->supported=NULL;
401        current_element->next=NULL;
402      }
403    }
404    else{
405#ifdef DEBUG_SERVICE_CONF
406      fprintf(stderr,"SECOND SUPPORTED FORMAT !!!!\n");
407#endif
408      addMapToIoType(&current_element->supported,current_content);
409      freeMap(&current_content);
410      free(current_content);
411      current_content=NULL;
412#ifdef DEBUG_SERVICE_CONF
413      dumpElements(current_element);
414      fprintf(stderr,"SECOND SUPPORTED FORMAT !!!!\n");
415#endif
416    }
417    current_content=NULL;
418  }
419}
420 ;
421
422//======================================================
423// contentetoile
424//======================================================
425// regle 43
426// ENTRE 2 BALISES
427// entre 2 balises, on peut avoir :
428// --- OUVRANTE CONTENU FERMANTE (recursivement !)
429// --- DU TEXTE quelconque
430// --- COMMENTS
431// --- DES PROCESSES INSTRUCTIONS
432// --- /!\ il peut y avoir une processing instruction invalide ! <?xml
433// --- EPSILON
434// ### et/ou tout ca a la suite en nombre indeterminé
435// ### donc c'est un operateur etoile (*)
436//======================================================
437contentetoile
438: contentetoile element           {}
439 | contentetoile PIERROR                  {srerror("processing instruction <?xml ?> impossible\n");}
440 | contentetoile PI                       {}
441///// on filtre les commentaires | contentetoile comment              {}
442 | contentetoile NEWLINE {/*printf("NEWLINE FOUND !!");*/}
443 | contentetoile pair {}
444 | contentetoile processid {}
445 | contentetoile texteinterbalise         {}
446 | contentetoile CDATA {} 
447 | {/* Epsilon */}
448 ;
449
450//======================================================
451// texteinterbalise
452//======================================================
453// regle 14
454// DU TEXTE quelconque
455// c'est du CHARDATA
456// il y a eut un probleme avec ID,
457// on a mis des starts conditions,
458// maintenant on croise les ID dans les dbalises
459// et des CHARDATA hors des balises
460//======================================================
461texteinterbalise
462 : CHARDATA             {}
463 ;
464//======================================================
465
466pair: PAIR {  if(debug) fprintf(stderr,"PAIR FOUND !!\n");if(curr_key!=NULL){free(curr_key);curr_key=NULL;} }
467| EPAIR {
468#ifdef DEBUG_SERVICE_CONF
469    fprintf(stderr,"EPAIR FOUND !! \n");
470    fprintf(stderr,"[%s=>%s]\n",curr_key,$1);
471    fprintf(stderr,"[ZOO: service_conf.y line 482 free(%s)]\n",curr_key);
472    dumpMap(current_content);
473    fflush(stderr);
474#endif
475  if(current_content==NULL){
476#ifdef DEBUG_SERVICE_CONF
477    fprintf(stderr,"[ZOO: service_conf.y line 482 free(%s)]\n",curr_key);
478#endif
479    current_content=createMap(curr_key,$1);
480#ifdef DEBUG_SERVICE_CONF
481    fprintf(stderr,"[ZOO: service_conf.y line 482 free(%s)]\n",curr_key);
482#endif
483    //current_content->next=NULL;
484  }
485  else{
486#ifdef DEBUG_SERVICE_CONF
487    dumpMap(current_content);
488    fprintf(stderr,"addToMap(current_content,%s,%s) !! \n",curr_key,$1);
489#endif
490    addToMap(current_content,curr_key,$1);
491#ifdef DEBUG_SERVICE_CONF
492    fprintf(stderr,"addToMap(current_content,%s,%s) end !! \n",curr_key,$1);
493#endif   
494  }
495#ifdef DEBUG_SERVICE_CONF
496  fprintf(stderr,"EPAIR FOUND !! \n");
497  fprintf(stderr,"[%s=>%s]\n",curr_key,$1);
498  fprintf(stderr,"[ZOO: service_conf.y line 505 free(%s)]\n",curr_key);
499  fflush(stderr);
500#endif
501  if(curr_key!=NULL){
502    free(curr_key);
503    curr_key=NULL;
504  }
505  }
506| SPAIR  { curr_key=strdup($1);if(debug) fprintf(stderr,"SPAIR FOUND !!\n"); }
507 ;
508
509
510processid
511: ANID  {
512  if(data==-1){
513    data=1;
514    char *cen=strdup($1);
515    my_service->name=(char*)malloc((strlen(cen)-1)*sizeof(char*));
516    cen[strlen(cen)-1]=0;
517    cen+=1;
518    sprintf(my_service->name,"%s",cen);
519    cen-=1;
520    free(cen);
521    my_service->content=NULL;
522    my_service->metadata=NULL;
523    my_service->inputs=NULL;
524    my_service->outputs=NULL;
525  } else {
526    if(current_data==1){
527      if(my_service->content!=NULL && current_element->name!=NULL){
528        if(my_service->inputs==NULL){
529          my_service->inputs=dupElements(current_element);
530          my_service->inputs->next=NULL;
531          tmp_count++;
532        }
533        else{
534          addToElements(&my_service->inputs,current_element);
535        }
536#ifdef DEBUG_SERVICE_CONF
537        fprintf(stderr,"(%s %d)FREE current_element (after adding to allread existing inputs)",__FILE__,__LINE__);
538        dumpElements(current_element);
539        fprintf(stderr,"(%s %d)FREE current_element (after adding to allread existing inputs)",__FILE__,__LINE__);
540        dumpElements(my_service->inputs);
541#endif
542        freeElements(&current_element);
543        free(current_element);
544        current_element=NULL;
545#ifdef DEBUG_SERVICE_CONF
546        fprintf(stderr,"(DATAINPUTS - 489) ALLOCATE current_element\n");
547#endif
548        current_element=(elements*)malloc(ELEMENTS_SIZE);
549        current_element->name=NULL;
550        current_element->content=NULL;
551        current_element->metadata=NULL;
552        current_element->format=NULL;
553        current_element->defaults=NULL;
554        current_element->supported=NULL;
555        current_element->next=NULL;
556      }
557      if(current_element->name==NULL){
558#ifdef DEBUG_SERVICE_CONF
559        fprintf(stderr,"NAME IN %s (current - %s)\n",
560                $1,current_element->name);
561#endif
562        wait_inputs=true;
563#ifdef DEBUG_SERVICE_CONF
564        fprintf(stderr,"(DATAINPUTS - 501) SET NAME OF current_element\n");
565#endif
566        char *cen=strdup($1);
567        current_element->name=(char*)malloc((strlen(cen)-1)*sizeof(char*));
568        cen[strlen(cen)-1]=0;
569        cen+=1;
570        sprintf(current_element->name,"%s",cen);
571        cen-=1;
572        free(cen);
573#ifdef DEBUG_SERVICE_CONF
574        fprintf(stderr,"NAME IN %s (current - %s)\n",$1,current_element->name);
575#endif
576        current_element->content=NULL;
577        current_element->metadata=NULL;
578        current_element->format=NULL;
579        current_element->defaults=NULL;
580        current_element->supported=NULL;
581        current_element->next=NULL;
582#ifdef DEBUG_SERVICE_CONF
583        fprintf(stderr,"NAME IN %s (current - %s)\n",$1,current_element->name);
584#endif
585      }
586    }
587    else
588      if(current_data==2){
589        wait_outputs=true;
590        if(wait_inputs){
591          if(current_element!=NULL && current_element->name!=NULL){
592            if(my_service->outputs==NULL){
593              my_service->outputs=dupElements(current_element);
594              my_service->outputs->next=NULL;
595            }
596            else{
597#ifdef DEBUG_SERVICE_CONF
598              fprintf(stderr,"LAST NAME IN %s (current - %s)\n",$1,current_element->name);
599#endif
600              addToElements(&my_service->outputs,current_element);
601            }
602#ifdef DEBUG_SERVICE_CONF
603            dumpElements(current_element);
604            fprintf(stderr,"(DATAOUTPUTS) FREE current_element %s %i\n",__FILE__,__LINE__);
605#endif
606            freeElements(&current_element);
607            free(current_element);
608            current_element=NULL;
609#ifdef DEBUG_SERVICE_CONF
610            fprintf(stderr,"(DATAOUTPUTS) ALLOCATE current_element %s %i\n",__FILE__,__LINE__);
611#endif
612            current_element=(elements*)malloc(ELEMENTS_SIZE);
613            current_element->name=NULL;
614            current_element->content=NULL;
615            current_element->metadata=NULL;
616            current_element->format=NULL;
617            current_element->defaults=NULL;
618            current_element->supported=NULL;
619            current_element->next=NULL;
620          }
621          if(current_element->name==NULL){
622#ifdef DEBUG_SERVICE_CONF
623            fprintf(stderr,"NAME OUT %s\n",$1);
624            fprintf(stderr,"(DATAOUTPUTS - 545) SET NAME OF current_element\n");
625#endif
626            char *cen=strdup($1);
627            current_element->name=(char*)malloc((strlen(cen)-1)*sizeof(char));
628            cen[strlen(cen)-1]=0;
629            cen+=1;
630            sprintf(current_element->name,"%s",cen);
631            cen-=1;
632            free(cen);
633            current_element->content=NULL;
634            current_element->metadata=NULL;
635            current_element->format=NULL;
636            current_element->defaults=NULL;
637            current_element->supported=NULL;
638            current_element->next=NULL;
639          }
640
641          current_content=NULL;
642        }
643        else
644          if(current_element!=NULL && current_element->name!=NULL){
645            if(my_service->outputs==NULL)
646              my_service->outputs=dupElements(current_element);
647            else
648              addToElements(&my_service->outputs,current_element);
649            fprintf(stderr,"ADD TO OUTPUTS Elements\n");
650            dupElements(current_element);
651
652            freeElements(&current_element);
653            free(current_element);
654            current_element=NULL;
655          }
656          else{
657#ifdef DEBUG_SERVICE_CONF
658            fprintf(stderr,"NAME OUT %s\n",$1);
659            fprintf(stderr,"(DATAOUTPUTS - 545) SET NAME OF current_element\n");
660#endif
661            char *cen=strdup($1);
662            current_element->name=(char*)malloc((strlen(cen)-1)*sizeof(char*));
663            cen[strlen(cen)-1]=0;
664#ifdef DEBUG
665            fprintf(stderr,"tmp %s\n",cen);
666#endif
667            cen+=1;
668            sprintf(current_element->name,"%s",cen);
669            cen-=1;
670            free(cen);
671            current_element->content=NULL;
672            current_element->metadata=NULL;
673            current_element->format=NULL;
674            current_element->defaults=NULL;
675            current_element->supported=NULL;
676            current_element->next=NULL;
677          }
678        wait_inputs=false;
679        wait_outputs=true;
680        //wait_outputs=true;
681      }
682  }
683 }
684 ;
685
686%%
687
688// srerror
689//======================================================
690/* fonction qui affiche l erreur si il y en a une */
691//======================================================
692void srerror(char *s)
693{
694  if(debug)
695    fprintf(stderr,"\nligne %d : %s\n",srlineno,s);
696}
697
698/**
699 * getServiceFromFile :
700 * set service given as second parameter with informations extracted from the
701 * definition file.
702 */
703int getServiceFromFile(char* file,service** service){
704
705  freeMap(&previous_content);
706  previous_content=NULL;
707  freeMap(&current_content);
708  current_content=NULL;
709  freeMap(&scontent);
710#ifdef DEBUG_SERVICE_CONF
711  fprintf(stderr,"(STARTING)FREE current_element\n");
712#endif
713  freeElements(&current_element);
714  free(current_element);
715  current_element=NULL;
716  my_service=NULL;
717  scontent=NULL;
718
719  wait_maincontent=true;
720  wait_mainmetadata=false;
721  wait_metadata=false;
722  wait_inputs=false;
723  wait_defaults=false;
724  wait_supporteds=false;
725  wait_outputs=false;
726  wait_data=false;
727  data=-1;
728  previous_data=1;
729  current_data=0;
730 
731  my_service=*service;
732
733  srin = fopen(file,"r");
734  if (srin==NULL){
735    fprintf(stderr,"error : file not found\n") ;
736    return -1;
737  }
738
739  int resultatYYParse = srparse() ;
740 
741  if(wait_outputs && current_element!=NULL && current_element->name!=NULL){
742    if(my_service->outputs==NULL){     
743#ifdef DEBUG_SERVICE_CONF
744      fprintf(stderr,"(DATAOUTPUTS - 623) DUP current_element\n");
745#endif
746      my_service->outputs=dupElements(current_element);
747      my_service->outputs->next=NULL;
748    }
749    else{
750#ifdef DEBUG_SERVICE_CONF
751      fprintf(stderr,"(DATAOUTPUTS - 628) COPY current_element\n");
752#endif
753      addToElements(&my_service->outputs,current_element);
754    }
755#ifdef DEBUG_SERVICE_CONF
756    fprintf(stderr,"(DATAOUTPUTS - 631) FREE current_element\n");
757#endif
758    freeElements(&current_element);
759    free(current_element);
760    current_element=NULL;
761#ifdef DEBUG_SERVICE_CONF
762    fprintf(stderr,"(DATAOUTPUTS - 631) FREE current_element\n");
763#endif
764  }
765  if(current_element!=NULL){
766    freeElements(&current_element);
767    free(current_element);
768    current_element=NULL;
769  }
770  if(current_content!=NULL){
771    freeMap(&current_content);
772    free(current_content);
773    current_content=NULL;
774  }
775  fclose(srin);
776#ifdef DEBUG_SERVICE_CONF
777  dumpService(my_service);
778#endif
779  *service=my_service;
780
781  srlex_destroy();
782  return resultatYYParse;
783}
Note: See TracBrowser for help on using the repository browser.

Search

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png