Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
11 Cards in this Set
- Front
- Back
Context Free Grammar |
A context free grammar consists of non-terminals and terminals |
|
Non-terminal |
defined by a string of terminals and non-terminals |
|
Parsing |
Parsing is the process of determining how a sentence was generated by the grammar.
The result is a Parse Tree |
|
Type 3 |
Regular
The left-hand side of a production rule is a single non-terminal
|
|
Type 2 |
Context Free
The left-hand side of a production rule is a single non-terminal
|
|
Type 1 |
Context Sensitive
The left-hand side of a production rule consists of a sequence of terminals and non-terminals that contains at least one non-terminal.
|
|
Type 0 |
Phrase Structured
There is no restriction on either the left-hand side or the right-hand side of a production rule.
|
|
Recursive Decent Parsing |
Given a context-free grammar one can construct a parser as follows:
|
|
Lexer |
The Lexer parses the input into tokens.
|
|
Parse Tree |
records how a sentence is derived from the grammar. |
|
Abstract Syntax Tree |
tree that shows the structure of the sentence.
|