The syntax of a programming language oftentimes is best represented in the form of a context-free grammar. Construction of a suitable grammar is essential for simplifying and expediting the syntactical analysis phase of a modern compiler.
This library provides several tools to transform a context-free grammar into an equivalent form more conducive for predictive parsing, that is, recursive-descent parsing which requires no backtracking.
-
Elimination of Left Recursion.
-
Left Factoring.
-
First Set Generation.