Debug Analyseur
This commit is contained in:
@@ -107,6 +107,7 @@ int yylex(void)
|
|||||||
|
|
||||||
c = lireCar();
|
c = lireCar();
|
||||||
|
|
||||||
|
|
||||||
// Symbole simple
|
// Symbole simple
|
||||||
for( int i = 0; tableSymbole[i] != '\0'; ++i ) {
|
for( int i = 0; tableSymbole[i] != '\0'; ++i ) {
|
||||||
if( c == tableSymbole[i] ) {
|
if( c == tableSymbole[i] ) {
|
||||||
@@ -117,8 +118,7 @@ int yylex(void)
|
|||||||
// Nombre
|
// Nombre
|
||||||
if( is_num( c ) )
|
if( is_num( c ) )
|
||||||
{
|
{
|
||||||
do
|
do {
|
||||||
{
|
|
||||||
lireCar();
|
lireCar();
|
||||||
} while( is_num( yytext[yyleng-1] ) );
|
} while( is_num( yytext[yyleng-1] ) );
|
||||||
delireCar();
|
delireCar();
|
||||||
@@ -130,8 +130,7 @@ int yylex(void)
|
|||||||
if( c == '$' ) {
|
if( c == '$' ) {
|
||||||
i = 1; // 1 pour $
|
i = 1; // 1 pour $
|
||||||
|
|
||||||
do
|
do {
|
||||||
{
|
|
||||||
lireCar();
|
lireCar();
|
||||||
i++;
|
i++;
|
||||||
} while( is_alphanum( yytext[yyleng-1] ) );
|
} while( is_alphanum( yytext[yyleng-1] ) );
|
||||||
@@ -150,7 +149,7 @@ int yylex(void)
|
|||||||
// Mot clefs
|
// Mot clefs
|
||||||
do {
|
do {
|
||||||
lireCar();
|
lireCar();
|
||||||
} while( !isspace( yytext[yyleng-1] ) );
|
} while( is_alphanum( yytext[yyleng-1] ) );
|
||||||
delireCar();
|
delireCar();
|
||||||
|
|
||||||
for( int i = 0; tableMotsClefs[i] != '\0'; ++i )
|
for( int i = 0; tableMotsClefs[i] != '\0'; ++i )
|
||||||
@@ -160,17 +159,18 @@ int yylex(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(; yyleng != 1; delireCar() );
|
||||||
|
|
||||||
//id_fct
|
//id_fct
|
||||||
if( is_alpha( c ) ) {
|
if( is_alpha( c ) ) {
|
||||||
int i = 1; // 1 pour $
|
int i = 1; // 1 pour $
|
||||||
|
|
||||||
do
|
do {
|
||||||
{
|
|
||||||
lireCar();
|
lireCar();
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
} while( is_alphanum( yytext[yyleng-1] ) );
|
} while( is_alphanum( yytext[yyleng-1] ) );
|
||||||
i--;
|
i--;
|
||||||
|
|
||||||
delireCar();
|
delireCar();
|
||||||
|
|
||||||
if(i > 99) {
|
if(i > 99) {
|
||||||
|
|||||||
Reference in New Issue
Block a user