SyntaxTutor
Educational app designed to help compiler students understand LL(1) and SLR(1) parsing algorithms.
 
Loading...
Searching...
No Matches
grammar.hpp File Reference
#include "symbol_table.hpp"
#include <string>
#include <unordered_map>
#include <vector>
Include dependency graph for grammar.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Grammar
 Represents a context-free grammar, including its rules, symbol table, and starting symbol. More...
 

Typedefs

using production = std::vector<std::string>
 Represents the right-hand side of a grammar rule.
 

Typedef Documentation

◆ production

using production = std::vector<std::string>

Represents the right-hand side of a grammar rule.

A production is a sequence of grammar symbols (terminals or non-terminals) that can be derived from a non-terminal symbol in the grammar.

For example, in the rule A → a B c, the production would be: {"a", "B", "c"}