You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
461 B
27 lines
461 B
1 year ago
|
//
|
||
|
// Created by lenfrex on 2023/5/5.
|
||
|
//
|
||
|
|
||
|
#ifndef LEXER_CPP_CHECKER_H
|
||
|
#define LEXER_CPP_CHECKER_H
|
||
|
|
||
|
#include "stack"
|
||
|
#include "grammar/Grammar.h"
|
||
|
|
||
|
class Checker {
|
||
|
private:
|
||
|
Grammar grammar;
|
||
|
|
||
|
static std::string getStackContent(std::stack<char> source);
|
||
|
|
||
|
public:
|
||
|
explicit Checker(Grammar grammar);
|
||
|
|
||
|
bool identifyString(std::string input);
|
||
|
|
||
|
static bool canDeducedEmpty(const std::set<std::string> &productions);
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif //LEXER_CPP_CHECKER_H
|