



























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




























































CS311 Computational Structures
Andrew P. Black Lecture 7
In 1957, Noam Chomsky published Syntactic Structures , an landmark book that defined the so- called Chomsky hierarchy of languages original name language generated productions: Type-3 Grammars Regular Type-2 Grammars Contex-free Type-1 Grammars Context-sensitive Type-0 Grammars Recursively-enumerable no restriction A → γ A → a and A → aB αAβ → αγβ A, B: terminals, a, b non-terminal, α, β sequences of terminals and non-terminals
S → w where w is any string of terminals and non-terminals
S → w where w is any string of terminals and non-terminals
S → w where w is any string of terminals and non-terminals
Context-free languages more general than regular languages
Context-free languages more general than regular languages
Context-free languages more general than regular languages
Context-free languages more general than regular languages
adding_operator ::= "+" | "−". multiplying_operator ::= "×" | "/" | "÷". primary ::= unsigned_number | variable | function_designator | "(" arithmetic_expression ")". factor ::= primary | factor | factor power primary. term ::= factor | term multiplying_operator factor. simple_arithmetic_expression ::= term | adding_operator term | simple_arithmetic_expression adding_operator term. if_clause ::= if Boolean_expression then. arithmetic_expression ::= simple_arithmetic_expression | if_clause simple_arithmetic_expression else arithmetic_expression. if a < 0 then U+V else if a * b < 17 then U/V else if k <> y then V/U else 0
finite-state automaton
° is the current state, ° , or the next character on the input tape is^ , and ° , or the top of the stack is
° The new state is ° if^ ,^ is popped off of the stack, and ° the (possibly empty) sequence of symbols^ is pushed onto the stack
′
Λ
Λ
∗
′