11,7 → 11,7 |
#include <sstream> |
|
#include "html_table.cc" |
|
|
int yylex(); |
int chemerror(char * msg); |
int yyerror(const char * msg); |
28,7 → 28,7 |
std::string s; |
} yystype; |
|
#define YYSTYPE yystype |
#define YYSTYPE yystype |
|
/* variables globales */ |
|
68,7 → 68,7 |
%% |
|
/* les règles */ |
but : chcompose { |
but : chcompose { |
result=$1; |
isequation=1; |
} |
87,7 → 87,7 |
$1.cq->addChemeq($5.cq); |
$$=$1; |
} |
| chcompose spc01 AntiCompose spc01 chc { |
| chcompose spc01 AntiCompose spc01 chc { |
$1.cq->subChemeq($5.cq); |
$$=$1; |
} |
155,7 → 155,7 |
$$.m->nombre($1.i,$1.d); |
} |
| molec{ |
$$ = $1; |
$$ = $1; |
} |
; |
|
191,7 → 191,7 |
; |
|
groupe : Lpar composition Rpar { |
$$=$2; |
$$=$2; |
} |
; |
|
201,7 → 201,7 |
| Atome{ |
char buffer[25]; |
if ($1.i==-2) { /* ce n'est pas un atome recensé */ |
sprintf(buffer,"nonexistent atom : %s", $1.symb); |
snprintf(buffer,sizeof(buffer),"nonexistent atom : %s", $1.symb); |
chemerror(buffer); |
} |
$$.al = new AtomeListe($1.symb,$1.i); |
223,7 → 223,7 |
$$.i=1; |
} |
| Int { |
$$=$1; |
$$=$1; |
} |
; |
|
307,7 → 307,7 |
if (envinput !=NULL){ |
std::istringstream iss(envinput); |
thelexer= new yyFlexLexer (&iss); |
} |
} |
yyparse(); |
|
bool wantedlatex=(strchr(asked,'l')!=NULL); |