From be64e5856eacb6f5674b23a9653980c206581c7e Mon Sep 17 00:00:00 2001 From: Xawirses Date: Sun, 14 Feb 2016 11:37:50 +0100 Subject: [PATCH] Rajout des est_premier manquant --- src/analyseur_syntaxyque.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/analyseur_syntaxyque.c b/src/analyseur_syntaxyque.c index 2e40e48..20fc1a9 100644 --- a/src/analyseur_syntaxyque.c +++ b/src/analyseur_syntaxyque.c @@ -47,7 +47,7 @@ void programme() { if( est_premier( _optDecVariables_, uniteCourante ) || est_premier( _listeDecFonctions_, uniteCourante )) { optDecVariables(); listeDecFonctions(); - } else { + } else if ( !est_suivant( _listeDecFonctions_, uniteCourante ) ) { syntaxError(); } @@ -156,7 +156,7 @@ void optTailleTableau() { void listeDecFonctions() { openSection( __func__ ); - if( est_premier( _declarationFonction_, uniteCourante ) ) { + if( est_premier( _declarationFonction_, uniteCourante ) || est_premier( _listeDecFonctions_, uniteCourante ) ) { declarationFonction(); listeDecFonctions(); } else if( !est_suivant( _listeDecFonctions_, uniteCourante ) ) { @@ -296,7 +296,7 @@ void instructionBloc() { void listeInstructions() { openSection( __func__ ); - if( est_premier( _instruction_, uniteCourante ) ) { + if( est_premier( _instruction_, uniteCourante ) || est_premier( _listeInstructions_, uniteCourante ) ) { instruction(); listeInstructions(); } else if( !est_suivant( _listeInstructions_, uniteCourante ) ) { @@ -756,7 +756,7 @@ void appelFct() { void listeExpressions() { openSection( __func__ ); - if( est_premier( _expression_, uniteCourante ) ) { + if( est_premier( _expression_, uniteCourante ) || est_premier( _listeExpressions_, uniteCourante ) ) { expression(); listeExpressionsBis(); } else if( !est_suivant( _listeExpressions_, uniteCourante ) ) {