Interactive assistant that guides the student step-by-step through the SLR(1) parsing table. More...
#include <slrwizard.h>
Public Member Functions | |
SLRWizard (SLR1Parser &parser, const QVector< QVector< QString > > &rawTable, const QStringList &colHeaders, const QVector< QPair< QString, QVector< QString > > > &sortedGrammar, QWidget *parent=nullptr) | |
Constructs the SLR(1) wizard with all necessary parsing context. | |
QVector< QString > | stdVectorToQVector (const std::vector< std::string > &vec) |
Converts a std::vector<std::string> to QVector<QString> for UI compatibility. | |
Interactive assistant that guides the student step-by-step through the SLR(1) parsing table.
This wizard-based dialog presents the user with one cell of the SLR(1) parsing table at a time, asking them to deduce the correct ACTION or GOTO entry based on the LR(0) automaton and FOLLOW sets. It is designed as an educational aid to explain the reasoning behind each parsing decision.
Each page includes:
|
inline |
Constructs the SLR(1) wizard with all necessary parsing context.
parser | The SLR(1) parser instance containing the LR(0) states and transitions. |
rawTable | The target parsing table (student version or reference). |
colHeaders | Header symbols (terminals and non-terminals). |
sortedGrammar | Ordered list of grammar rules for reduce explanations. |
parent | Parent widget. |
|
inline |
Converts a std::vector<std::string> to QVector<QString> for UI compatibility.
vec | The input vector of strings. |