Parsing Posts

5 posts in this category

Recursive Descent Parser
A parser is a program that usually takes a stream of lexical tokens and transforms them into another data structure, usually in the form of a parse tree that satisfies the language's grammar rules. ##...
Parsing
Railroad Diagram
**Railroad Diagrams** (or **Syntax Diagrams**) are the graphical way to represent [context-free grammars](/everyday/02-10-2022-parsing-context-free-grammar). Each diagram defines a nonterminal. And th...
Parsing
BNF
**Backus-Naur Form (BNF)** is a metasyntax for [context-free grammars](/everyday/02-10-2022-parsing-context-free-grammar), is used to describe the syntax of languages used in computing such as program...
Parsing
Context-Free Grammar Derivations Leftmost Rightmost
A derivation of *a string* for *a grammar* is a *sequence of production rule applications*. The process of getting the string through the derivation is the parsing process. For example, with the follo...
Parsing
Context-Free Grammar
Context-Free Grammar (CFG) is a grammar where **production (or rewrite) rules** are in the form of: $$ A \rightarrow \alpha...
Parsing