Ignore:
Timestamp:
Sep 14, 2010, 9:09:05 PM (14 years ago)
Author:
djay
Message:

Fix ticket #6 about UTF8 support in main.cfg file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-kernel/main_conf_read.l

    r11 r12  
    1 /* pour pouvoir acceder au numero de ligne dans bison */
     1/* Line number from bison */
    22%option yylineno
    33
     
    1919
    2020
    21 /*====================================================*/
    22 /*====================================================*/
    23 /* Les Separateurs xml */
    24 /*====================================================*/
    2521S               [ \t\r\n]+
    26 /*====================================================*/
    2722
     23CharRef         "&#"[0-9]+";"|"&#x"[0-9a-fA-F]+";"
    2824
     25egalevolue              {S}?"="{S}?
    2926
     27Name            ([_:]|[\x41-\x5A]|[\x61-\x7A]|[\xC0-\xD6]|[\xD8-\xF6]|[\xF8-\xFF])(([\x41-\x5A]|[\x61-\x7A]|[\xC0-\xD6]|[\xD8-\xF6]|[\xF8-\xFF])|[0-9.\-_:])*
    3028
    31 /*====================================================*/
    32 /* CharRef regle 66 */
    33 /*====================================================*/
    34 CharRef         "&#"[0-9]+";"|"&#x"[0-9a-fA-F]+";"
    35 /*====================================================*/
     29chardata        [^<]*
    3630
     31attname [a-zA-Z0-9_\-:]+
    3732
     33attvalue1       [,@a-zA-Z0-9_\-.:" "\"\'/\\\(\)\+\x41-\xff]+
    3834
    39 
    40 /*====================================================*/
    41 /*   espaces? '=' espaces?    regle 25  */
    42 /* si on veut pouvoir utiliser S dans bison, */
    43 /* il faut cr�r au moins une autre start condition */
    44 /* comme on n'utilise "egalevolue" que pour version et encoding */
    45 /* il est pr��able de rajouter cette macro */
    46 /*====================================================*/
    47 egalevolue              {S}?"="{S}?
    48 /*====================================================*/
    49 
    50 
    51 
    52 
    53 /*====================================================*/
    54 /* Name regle 5 */
    55 /*====================================================*/
    56 /*** Name               [a-zA-Z_:][a-zA-Z0-9.\-_:]* ***/
    57 Name            ([_:]|[\x41-\x5A]|[\x61-\x7A]|[\xC0-\xD6]|[\xD8-\xF6]|[\xF8-\xFF])(([\x41-\x5A]|[\x61-\x7A]|[\xC0-\xD6]|[\xD8-\xF6]|[\xF8-\xFF])|[0-9.\-_:])*
    58 /*====================================================*/
    59 
    60 
    61 
    62 
    63 
    64 /*====================================================*/
    65 /* chardata  regle 14 */
    66 /*====================================================*/
    67 /**chardata     [a-zA-Z0-9_\-.:" "\"\'\\]***/
    68 chardata        [^<]*
    69 /*====================================================*/
    70 attname [a-zA-Z0-9_\-:]+
    71 attvalue1       [,@a-zA-Z0-9_\-.:" "\"\'/\\\(\)\+]+
    72 
    73 
    74 
    75 
    76 
    77 /*====================================================*/
    78 /* attvalue regle 10 */
    79 /*====================================================*/
    80 /* attvalue             \"([^"&]|{CharRef})*\"|\'([^'&]|{CharRef})*\' */
    81 /* pas tr� classe mais ca marche . */
    8235attvalue                \"[^"]*\"|\'[^']*\'
    83 /*====================================================*/
    8436
    8537virgule [,]+
     38
    8639whitespace                      [ ]{0,}
    8740whitesp                      [ ]
     
    9144
    9245
    93 
    94 
    95 
    96 
    97 
    98 
    99 
    100 /*====================================================*/
    101 /* initial = de debut a ?> du prolog ; DANSBALISE = dans une balise ; HORSBALISE = hors d'une balise */
    102 /*====================================================*/
    10346%x DANSBALISE HORSBALISE PAIRSTART
    104 /*====================================================*/
    10547
    10648
     
    12365<PAIRSTART,INITIAL,HORSBALISE,DANSBALISE>{newline}+{whitesp}*                   {if (affichetrace==1) printf ("\n\nNEWLINE 2\n") ; BEGIN(INITIAL); return NEWLINE;}
    12466
    125 <INITIAL>"<?"[Xx][Mm][Ll]  { if (attentionImpossibleDeTrouverXMLDeclapres == 1 || attentionImpossibleDeTrouverPIapres == 1) {/* il y a eut un commentaire ou une balise applicative avant la declaration xml */         printf("\nerror : a la ligne %d : il y a eut un commentaire ou un PI avant la declaration xml\n",yylineno); exit (10) ; } ; if (affichetrace==1) printf ("\n\nSTARTXMLDECL:%s\n",yytext) ;return STARTXMLDECL;}
     67<INITIAL>"<?"[Xx][Mm][Ll]  { if (attentionImpossibleDeTrouverXMLDeclapres == 1 || attentionImpossibleDeTrouverPIapres == 1) { printf("\nerror : a la ligne %d : il y a eut un commentaire ou un PI avant la declaration xml\n",yylineno); exit (10) ; } ; if (affichetrace==1) printf ("\n\nSTARTXMLDECL:%s\n",yytext) ;return STARTXMLDECL;}
    12668
    12769<INITIAL>"version"{egalevolue}\"1.0\"|"version"{egalevolue}\'1.0\'  {if (affichetrace==1) printf ("\n\nVERSIONDECL:%s\n",yytext) ;return VERSIONDECL;}
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

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