17.01.2015 Views

Course Notes on Formal Languages and Compilers

Course Notes on Formal Languages and Compilers

Course Notes on Formal Languages and Compilers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

2<br />

CONTENTS<br />

1. LANGUAGES AND GRAMMARS 6<br />

Strings <strong>and</strong> sets of strings 6<br />

5<br />

Vocabulary <strong>and</strong> language 7<br />

N<strong>on</strong> languages 7<br />

Grammars 7<br />

Derivati<strong>on</strong>s <strong>and</strong> language of a Grammar 8<br />

Classificati<strong>on</strong> of Phrase Structure Grammars 8<br />

10<br />

Recogniti<strong>on</strong> of C<strong>on</strong>text Sensitive <strong>Languages</strong> 11<br />

2. CONTEXT FREE GRAMMARS AND LANGUAGES 12<br />

Derivati<strong>on</strong>s in C<strong>on</strong>text Free Grammars 12<br />

Ambiguity 13<br />

Recogniti<strong>on</strong> of c<strong>on</strong>text free languages 13<br />

15<br />

Lemma: Removing rules of the form A 13<br />

Lemma: Removing rules of the form AB 14<br />

Chomsky normal form 15<br />

Theorem: C<strong>on</strong>versi<strong>on</strong> to Chomsky normal form 15<br />

Derivati<strong>on</strong> In Chomsky Normal Form And Syntax analysis 17<br />

20<br />

Importance of Chomsky Normal Form 17<br />

Forward Deterministic C<strong>on</strong>text Free Grammars 19<br />

Discussi<strong>on</strong> 20<br />

3. REGULAR GRAMMARS AND LANGUAGES 21<br />

Backward Deterministic Regular Grammars 22<br />

25<br />

Recogniti<strong>on</strong> Algorithm for Backward Deterministic Regular Grammars 22<br />

Theorem: C<strong>on</strong>versi<strong>on</strong> to backward deterministic form 22<br />

Some comments <strong>on</strong> the set c<strong>on</strong>structi<strong>on</strong> 23<br />

Theorem: Closure properties of regular languages 24<br />

Pumping Lemma for regular languages 27

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

Saved successfully!

Ooh no, something went wrong!