Subversion Repositories wimsdev

Rev

Rev 13121 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13121 Rev 17747
Line 6... Line 6...
6
   #include "chemeq.h"
6
   #include "chemeq.h"
7
 
7
 
8
   char * ind;
8
   char * ind;
9
   int position = 0;
9
   int position = 0;
10
 
10
 
-
 
11
   #ifndef size_t
-
 
12
   #define size_t int
11
     
13
   #endif     
12
 
14
 
13
/* les nombres */
15
/* les nombres */
14
digits         [0-9]
16
digits         [0-9]
15
spc            [ \t]+
17
spc            [ \t]+
16
int            {digits}+
18
int            {digits}+
Line 22... Line 24...
22
/* la flèche */
24
/* la flèche */
23
fleche         [-]+>
25
fleche         [-]+>
24
 
26
 
25
/* la double flèche */
27
/* la double flèche */
26
dfleche        <[-]+>
28
dfleche        <[-]+>
-
 
29
 
-
 
30
/* fonction spéciale : toute chaîne préfixée par "func:" */
-
 
31
func          func:.*
27
 
32
 
28
%%
33
%%
29
 /* les règles */
34
 /* les règles */
30
 
35
 
31
 /* pour les atomes */
36
 /* pour les atomes */
Line 89... Line 94...
89
_\(g\)|_g|g     {position += strlen(yytext); return Gas;}
94
_\(g\)|_g|g     {position += strlen(yytext); return Gas;}
90
_\(aq\)|_ag|aq   {position += strlen(yytext); return Aqueous;}
95
_\(aq\)|_ag|aq   {position += strlen(yytext); return Aqueous;}
91
=        {position ++; return Egal;}
96
=        {position ++; return Egal;}
92
#        {position ++; return Compose;}
97
#        {position ++; return Compose;}
93
~        {position+=2; return AntiCompose;}
98
~        {position+=2; return AntiCompose;}
-
 
99
{func}   {position += strlen(yytext); yytext[strlen(yytext)]=0; 
-
 
100
  yylval.s = yytext+strlen("func:"); return Func;}
94
{eol}    {/* rien c'est la fin des entrées */}
101
{eol}    {/* rien c'est la fin des entrées */}
95
.|\n     {position += strlen(yytext); /* rien */}
102
.|\n     {position += strlen(yytext); /* rien */}
-
 
103