SyntaxTutor
Educational app designed to help compiler students understand LL(1) and SLR(1) parsing algorithms.
 
Loading...
Searching...
No Matches
GrammarFactory::FactoryItem Struct Reference

Represents an individual grammar item with its associated symbol table. More...

#include <grammar_factory.hpp>

Collaboration diagram for GrammarFactory::FactoryItem:

Public Member Functions

 FactoryItem (const std::unordered_map< std::string, std::vector< production > > &grammar)
 Constructor that initializes a FactoryItem with the provided grammar.
 

Public Attributes

std::unordered_map< std::string, std::vector< production > > g_
 Stores the grammar rules where each key is a non-terminal symbol and each value is a vector of production rules.
 
SymbolTable st_
 Symbol table associated with this grammar item.
 

Detailed Description

Represents an individual grammar item with its associated symbol table.

Constructor & Destructor Documentation

◆ FactoryItem()

GrammarFactory::FactoryItem::FactoryItem ( const std::unordered_map< std::string, std::vector< production > > & grammar)
explicit

Constructor that initializes a FactoryItem with the provided grammar.

Parameters
grammarThe grammar to initialize the FactoryItem with.

Member Data Documentation

◆ g_

std::unordered_map<std::string, std::vector<production> > GrammarFactory::FactoryItem::g_

Stores the grammar rules where each key is a non-terminal symbol and each value is a vector of production rules.

◆ st_

SymbolTable GrammarFactory::FactoryItem::st_

Symbol table associated with this grammar item.


The documentation for this struct was generated from the following files: