table of Contents
basic concepts
- Alphabet
- Alphabet operations: multiplication, n-th power, n closure, the Kleene closure (any symbol string set)
0 power is an empty string
- String operations: connecting, exponentiation
Defined grammar
- Grammar formal definition:
- Terminator: the basic language of symbolic token
- Not enclosed in angle brackets portion
- Nonterminal symbol: indicates the syntax component symbols
- With angle brackets portion
- S start symbol: the grammar largest grammatical elements.
Definition Language
- Sentence: meet the rules of grammar end symbol string . A sentence that does not contain nonterminals sentence.
How to determine whether a word string satisfying the relation of the sentence? Deduction and reduction
- Language
- Derivation
- Reduction
- Operation on language
- and
- connection
- power
- Closure is
- Brooklyn closure
Classification grammar
- Type 0 grammar: unrestricted grammar / phrase structure grammar
- Type 1 grammar: context-sensitive grammar (CSG)
- Production does not contain null
- Type 2 grammar: context-free grammar (CFG)
- Type 3 Grammar: Regular Grammar
- Relationship four kinds of grammar: the gradual restrictions, contains step by step
CFG parse tree
- Sentence phrases: analysis of each of them in sub-edge tree tree
- Direct phrases: height edge sub-tree 2
- Direct production phrase must be a right portion, a right portion of the production but not necessarily directly given sentence phrases
- Ambiguous grammar: If a grammar can be generated for more than a sentence parse tree