automata-5

# automata-5 - Automata Chapter 5 Context-Free Languages 5...

This preview shows pages 1–6. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Automata Chapter 5. Context-Free Languages 5. Context-Free Languages With L={a n b n : n ≥ 0}, Let h(a) = (, h(b) = ) Then (()) and ((())) are in L. Nested structure in programming languages. We need something beyond regular languages context-free languages Parsing : explain a sentence through its grammatical derivation . 5.1 Context-Free Grammars Definition 5.1 A grammar G=(V, T, S, P) is context-free if all productions in P have the form A x , where A ∈ V and x ∈ (V ∪ T)* . A language L is context-free iff 5 a context-free grammar G such that L=L(G). Regular languages .vs. Context-free languages ? 5.1 Context-Free Grammars Ex 5.1 G =({S}, {a, b}, S, P) with productions S aSa, S bSb, S λ L(G) =? Ex 5.2 S abB, A aaBb, B bbAa, A λ Ex 5.3 Show L={a n b m : n ≠ m} is context-free Linear grammar vs context-free grammar? 5.1 Context-Free Grammars Definition 5.2 A derivation is leftmost if in each step the leftmost variable in the sentential form is replaced. If in each step the rightmost variable is replaced, we call the derivation rightmost ....
View Full Document

## This note was uploaded on 11/03/2009 for the course CS automata taught by Professor Prof.jung during the Fall '09 term at 홍익대학교.

### Page1 / 17

automata-5 - Automata Chapter 5 Context-Free Languages 5...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online