29.04.2015 Views

Syntax Analysis

Syntax Analysis

Syntax Analysis

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Leftmost Derivations (ASU Ch 4.2)<br />

• leftmost replacement (LL grammars)<br />

– E =lm=> - E =lm=> -(E) =lm=> -(EAE) =lm=> -(idAE) =lm=><br />

– -(id+E) =lm=> -(id+id)<br />

– =lm=> means replace the leftmost NT<br />

– if wAc =lm=> wβc and P: A => β then w consists of Ts<br />

– a =lm=> b a derives b by leftmost derivation<br />

– S =lm=> a a is a left-sentential form of G<br />

• rightmost derivation =rm=><br />

– mutatis mutandum<br />

– sometimes called canonical forms<br />

10<br />

14/10/2014 DFR - CC - <strong>Syntax</strong> <strong>Analysis</strong>

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

Saved successfully!

Ooh no, something went wrong!