source: trunk/zoo-kernel/service_conf.l @ 57

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

Adding contains and getIoTypeFromElement functions in service.h. Remove memory leaks from the Service Configuration Parser, add the support for multiple supported formats as before. Small modification of the ZOO-Kernel Java Support, adding the capability to access the modified main_conf HashMap? from the Kernel to let lenv message map pass when an error occurs and it is handled in the Service code. Adding same capability for the ZOO-Kernel Python Support. Use strcasecmp in service.h rather than strlen+strncasecmp. Ensure that only OWS compliant informations are available for Contact.Phone and Contact.Adress. Remove memory leak in createExceptionReportNode. Correction of the addDefaultValues function to add the default format using the informations from DataInputs? if present, this should correct the behavior of the ZOO-Kernel when choosing the extension value which should now point to the corresponding zcfg value if present. Don't set the NULL value for inputs not provided in the DataInputs?, still set NULL as default value for outputs. Avoid segfault in freeElements when some zcfg values was not set correctly. Link against the client libjvm.so file rather than the server one.

File size: 4.0 KB
Line 
1%option noyywrap
2%option yylineno
3
4
5%{
6//======================================================
7/**
8
9 authors : Jean-Marie CODOL, Naitan GROLLEMUND
10
11**/
12//======================================================
13
14
15#include <string.h>
16#include "service_conf.tab.h"
17
18#ifdef DEBUG_SERVICE_CONF
19int affichetrace = 1;
20#else
21int affichetrace = 0;
22#endif
23
24
25int attentionImpossibleDeTrouverXMLDeclapres = 0 ;
26
27int attentionImpossibleDeTrouverPIapres = 0 ;
28
29%}
30
31
32S               [ \t\r\n]+
33
34CharRef         "&#"[0-9]+";"|"&#x"[0-9a-fA-F]+";"
35
36egalevolue              {S}?"="{S}?
37
38Name            ([_:]|[\x41-\x5A]|[\x61-\x7A]|[\xC0-\xD6]|[\xD8-\xF6]|[\xF8-\xFF])(([\x41-\x5A]|[\x61-\x7A]|[\xC0-\xD6]|[\xD8-\xF6]|[\xF8-\xFF])|[0-9.\-_:])*
39
40chardata        [^<]*
41
42attname [a-zA-Z0-9_\-]+
43attvalue1       [\*\+,;@a-zA-Z0-9_\-::.:" "\"\'/\\\(\)]+
44
45attvalue                \"[^"]*\"|\'[^']*\'\(\)
46
47whitespace                      [ ]{0,}
48whitesp                      [ ]
49newline                 [\r\n]|[\n]
50newlines                 [\r\n]{1,}|[\n]{1,}
51
52
53%x DANSBALISE HORSBALISE PAIRSTART
54
55
56
57
58%%
59
60"\n" {  if (affichetrace==1) fprintf (stderr,"\n\nNEWLINE\n") ;return NEWLINE;}
61
62{newline}+{whitesp}*                    {  if (affichetrace==1) fprintf (stderr,"\n\nNEWLINE 1\n") ; return NEWLINE;}
63
64<INITIAL,HORSBALISE>"["{attname}"]"             {  srlval.chaine=yytext;return ANID; }
65
66<INITIAL,HORSBALISE>{attname}             {  srlval.chaine=yytext; return SPAIR; }
67
68<PAIRSTART,HORSBALISE>{attvalue1}             { srlval.chaine=yytext;/*BEGIN(INITIAL);*/ return EPAIR;}
69
70<PAIRSTART,INITIAL,HORSBALISE>{whitesp}*"="{whitesp}*             {  BEGIN(PAIRSTART);}
71
72<PAIRSTART,INITIAL,HORSBALISE,DANSBALISE>{newline}+{whitesp}*             { BEGIN(INITIAL);  return NEWLINE;}
73
74<INITIAL>"<?"[Xx][Mm][Ll]  {   if (attentionImpossibleDeTrouverXMLDeclapres == 1 || attentionImpossibleDeTrouverPIapres == 1) {/* il y a eut un commentaire ou une balise applicative avant la declaration xml */ fprintf(stderr,"\nerror : a la ligne %d : il y a eut un commentaire ou un PI avant la declaration xml\n",srlineno); exit (10) ; } ; return STARTXMLDECL;}
75
76<INITIAL>"version"{egalevolue}\"1.0\"|"version"{egalevolue}\'1.0\'  { return VERSIONDECL;  }
77<INITIAL>"version"{egalevolue}\"[^"]*\"|"version"{egalevolue}\'[^']*\'  {/* erreur de version encoding */ fprintf(stderr,"\nerror : a la ligne %d : la version xml n est pas reconnue : %s\n",srlineno,yytext); exit (9) ; }
78
79
80<INITIAL>"encoding"{egalevolue}\"[Ii][Ss][Oo]"-8859-1"\"|"encoding"{egalevolue}\'[Ii][Ss][Oo]"-8859-1"\'  { return ENCODINGDECL;}
81<INITIAL>"encoding"{egalevolue}\"[^"]*\"|"encoding"{egalevolue}\'[^']*\'  {/* erreur de version encoding */     fprintf(stderr,"\nerror : a la ligne %d : la version d encodage n est pas reconnue : %s\n",srlineno,yytext); exit (8) ; }
82
83
84<INITIAL>"standalone"{egalevolue}\"yes\"|"standalone"{egalevolue}\'yes\'|"standalone"{egalevolue}\"no\"|"standalone"{egalevolue}\'no\'  { return SDDECL;}
85
86<INITIAL>"standalone"{egalevolue}\"[^"]*\"|"standalone"{egalevolue}\'[^']*\'|"standalone"{egalevolue}\"[^"]*\"|"standalone"{egalevolue}\'[^']*\'  { /* erreur de version encoding */    fprintf(stderr,"\nerror : a la ligne %d : la version standalone n est pas reconnue : %s\n",srlineno,yytext); exit (7) ; }
87
88
89<INITIAL>"?>"  { BEGIN(HORSBALISE); return ENDXMLDECL;}
90
91
92<DANSBALISE,INITIAL,HORSBALISE>{S}   {  }
93
94
95<HORSBALISE>"<?"[Xx][Mm][Ll]{S}({S}|{chardata})*"?>"|"<?"[Xx][Mm][Ll]"?>"       { return PIERROR;}
96<INITIAL,HORSBALISE>"<?"([^xX]|([xX][^mM])|([xX][mM][^lL]))({S}|([^?]|("?"[^>])))*"?>"          { attentionImpossibleDeTrouverPIapres=1 ; return PI;}
97
98
99<INITIAL,HORSBALISE>{newline}*"<"                   { BEGIN(DANSBALISE); return INFCAR;}
100
101
102<DANSBALISE>">"                 { BEGIN(HORSBALISE);return SUPCAR;}
103
104
105<DANSBALISE>"/"         {return SLASH;}
106
107
108<DANSBALISE>{egalevolue}                        {return Eq;}
109
110
111<DANSBALISE>{Name}{newline}*                    {memmove(srlval.chaine,yytext,(strlen(yytext)+1)*sizeof(char));return ID;}
112
113
114<DANSBALISE>{attvalue}          {return ATTVALUE;}
115
116
117<INITIAL,HORSBALISE>"<!--"([^-]|"-"[^-])*"-->"          {attentionImpossibleDeTrouverXMLDeclapres=1; }
118
119
120<INITIAL,DANSBALISE,HORSBALISE>.|\n     {fprintf(stderr,"error : ligne %d : caractere non reconnu '%s'\n",srlineno,yytext);}
121
122%%
123
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