Table of Contents
- Alphabet is the set of symbols.
- Word is a sequence of symbols.
- Language is the set of words.
- Sentence is a sequence of words.
1. Hierarchy
1.1. Type-3
- Regular. It does not require any memory other than a state to parse it.
- is completely equivalent to this. And so is Finite State
- The production rule: \(A \to a\) and \(A\to aB\)
- ./web.html#orgbdead17 and XML notations comes from this.
Example:
<identifier> ::= <letter><tail>
<letter> ::= [A-Za-z]
<tail> ::= [A-Za-z0-9_]<tail>
<tail> ::= [;]
1.2. Type-2
- Context-free
- Non-deterministic pushdown automaton
- \(A\to \alpha\)
1.3. Type-1
- Context-sensitive
- Linear-bounded non-deterministic Turing machine
- \(\alpha A\beta \to \alpha\gamma\beta\)
1.4. Type-0
- Recursively enumerable
- \(\gamma\to \alpha\) (\(\gamma\) non-empty)