Explore tens of thousands of sets crafted by our community.
Parsing Techniques
10
Flashcards
0/10
Packrat Parser
A Packrat Parser leverages memoization to parse with backtracking efficiently and avoid repeated work. It handles left recursion and is known for its use in parsing expression grammars (PEGs).
GLR Parser
Generalized LR (GLR) Parser can handle ambiguous grammars by creating multiple parse trees simultaneously if a conflict arises, using a graph-structured stack for state management.
Earley Parser
Earley Parser is a dynamic programming parser suitable for all context-free grammars. It uses a set of states represented in chart entries that are processed in three steps: prediction, scanning, and completion.
Shift-Reduce Parser
Shift-Reduce Parser is a bottom-up parser that uses two main actions (shift and reduce) to manipulate a stack and input buffer to build the parse tree.
CYK (Cocke-Younger-Kasami) Parser
The CYK Parser is a bottom-up parser for context-free grammars in Chomsky normal form. It uses a parsing table to hold the subsets of rules that can generate the input substring.
Chart Parser
A Chart Parser maintains a data structure called 'chart' for dynamic programming, thus storing intermediate parse trees to share and reuse work during backtracking operations.
Predictive Parser
A Predictive Parser is an LL parser that removes the need for backtracking by using look-ahead pointers and parsing tables to predict which production to use.
Recursive Descent Parser
A Recursive Descent Parser is an LL(1) parser that uses a set of recursive procedures to process the input. One procedure is defined for each non-terminal in the grammar.
LL Parser
LL parsers read input from left to right and construct a leftmost derivation of the sentence using a top-down approach. They employ a predictive method which doesn't require backtracking.
LR Parser
LR parsers read input from left to right and construct a rightmost derivation in reverse. They use a bottom-up approach and often utilize parsing tables (SLR, LALR, or canonical LR).
© Hypatia.Tech. 2024 All rights reserved.