1 / 44

Finishing up context-free languages

Context-free Languages. ReviewA language is context-free if it can be generated by a context-free grammar (cfg) or recognized by a pushdown automaton (pda)A context-free grammar is one in which every production is of the form: X ? w that is, of the form in which the left-hand side is a single

cade
Download Presentation

Finishing up context-free languages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. Finishing up context-free languages Review properties of cfls material covered in Chapters 5-8

    2. Context-free Languages Review A language is context-free if it can be generated by a context-free grammar (cfg) or recognized by a pushdown automaton (pda) A context-free grammar is one in which every production is of the form: X ? w that is, of the form in which the left-hand side is a single variable and the right-hand side is any string of variables and terminals.

    3. Context-free Languages Review a cfg production X ? xXy generates from the center and produces an equal number of xs and ys the cfg productions X ? xY, Y ? xYy will generate more xs than ys. the cfg productions X ? aXa | bXb generates palindromic strings. x ? y is the same as x > y or x < y

    4. Context-free Languages Review Derivation trees Derivations Left-most and right-most derivations Ambiguity (grammars) Inherent Ambiguity (languages) {anbmcm} ? {anbncm} is INHERENTLY AMBIGUOUS! There has to be at least two ways to generate abc since it could be in the language because the b's equal the c's, or because the a's equal the b's

    5. Context-free Languages Review ? rules (X ? ?) unit rules useless productions

More Related