init with {: System.out.println("Calculatrice avec grammaire LL (associatif droit!)"); :} terminal NL, LPAR, RPAR, PLUS, MOINS, MULT, DIV; terminal String IDENT; terminal Integer INT; nonterminal lignes; nonterminal Exp, Terme, SuiteTerme, SuiteFacteur, Facteur; lignes ::= /*mot vide */ {: :} | lignes Exp {: System.out.println("OK"); :} NL | lignes NL {: /* instruction vide */ :} | lignes error NL {: /* assume warning aready exists */ :} ; Exp ::= Terme SuiteTerme ; Terme ::= Facteur SuiteFacteur ; SuiteTerme ::= /* vide */ | PLUS Terme SuiteTerme | MOINS Terme SuiteTerme ; SuiteFacteur ::= /* vide */ | MULT Facteur SuiteFacteur | DIV Facteur SuiteFacteur ; Facteur ::= IDENT | INT | LPAR Exp RPAR ;