20100914

20100914 - Times flies like an arrow -- a number parsings...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Err:510 CS 441 Fall 2010 -- JWJ Pre-class notes - do not distribute 09/14/10 Err:510 Scope: ------ Grammars for formal languages. Context-free grammars. Installing a live-CD for Linux. Outline: ------- Concepts and definitions: Language hierarchy Definition of grammars Types of grammars (regular, context-free, context-sensitive) Derivation process Parse trees Properties of grammars (ambiguity) PARSING PROBLEM: instance: string (program) s, and CFG G question: is s in L(G)? [provide a witness in a form of parse tree] Examples/Questions: ------- Regular grammars and its relation to FA. A CFG for the language of palindromes. How many grammars can one language have? Syntactic ambiguity: http://en.wikipedia.org/wiki/Syntactic_ambiguity
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Times flies like an arrow -- a number parsings and meanings (e.g., Time those flies that are like arrows.)-------Different grammars for arithmetical expressions and their different properties. Defining syntax for programming languages Railroad diagram-----------------------------------------[tokens are often capitalized] BNF notation <for-statement> ::= 'for' <variable-name> ':=' <expression> 'to' <expression> 'do' <statement> | 'for' <variable-name> ':=' <expression> Sheet1 Page 2 'downto' <expression> 'do' <statement> EBNF notation <for-statement> ::= 'for' <variable-name> ':=' <expression> ( 'to' | 'downto' ) <expression> 'do' <statement> C-language...
View Full Document

Page1 / 2

20100914 - Times flies like an arrow -- a number parsings...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online