10.07.2015 Views

Analyse syntaxique - LAMP

Analyse syntaxique - LAMP

Analyse syntaxique - LAMP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Analyse</strong> <strong>syntaxique</strong> par descente récursive<strong>Analyse</strong> <strong>syntaxique</strong> ascendanteGestion des erreurs<strong>Analyse</strong> <strong>syntaxique</strong> d’une grammaire non-contextuelleExemple : <strong>Analyse</strong>ur <strong>syntaxique</strong> EBNFGrammaires LL(1)On peut réécrire cette définition comme suit :{Y 1, . . . ,Y k } ⊆ nullable ⇒ X ∈ nullable{Y 1, . . . ,Y i−1} ⊆ nullable ⇒ first(X) = first(X) ∪ first(Y i){Y i+1, . . . ,Y k } ⊆ nullable ⇒ follow(Y i) = follow(Y i) ∪ follow(X){Y i+1, . . . ,Y j−1} ⊆ nullable ⇒ follow(Y i) = follow(Y i) ∪ first(Y j)Pour calculer first(X), follow(X) et nullable, on utilise uneitération aux points fixes basées sur cette dernière définition.<strong>Analyse</strong> <strong>syntaxique</strong> Martin Odersky 14 de 42

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!