Lecture 3 - Parsing Flashcards
A ? is a formal language used to communicate algorithms both from programmer to programmer and from programmer to machine.
Syntax
programming language
(3) A formal language consists of:
Syntax
- A set of symbols
- Rules for forming term
- Rules for transforming terms to terms
(3) To use programming language effectively, the following must study and understand it from three perspectives:
Syntax
- Syntax
- Semantics
- Pragmatics
?
the set of symbols and rules for forming terms
Three perspectives
Syntax
Syntax
?
the rules for transforming terms to terms
Three perspectives
Syntax
Semantics
?
using the particular constructs of the language
Three perspectives
Syntax
Pragmatics
In ?, a language is defined as a set of strings of symbols that may be constrained by specific rules.
Context Free Language
formal language theory
Similarly, the written ? is made up of groups of letters (words) separated by spaces
Context Free Language
English language
A valid (accepted) sentence in the language must follow particular rules, the ?
Context Free Language
grammar
?
If L and P are CFL, then L∪P is also a CFL
Closure Properties
Context Free Language
Union
?
if L and P are CFL, then LP is also CFL
Closure Properties
Context Free Language
Concatenation
?
if L is CFL, then L* is also CFL
Closure Properties
Context Free Language
Kleene Star
?
can generate context-free languages.
Closure Properties
Context Free Grammar
Context-free grammar
They do this by taking a set of variables which are defined ?, in terms of one another, by a set of production rules.
Closure Properties
Context Free Grammar
recursively
?
is defined by 4 tuples as G = {V, ∑, S, P} where
Closure Properties
Context Free Grammar
Context-Free Grammar