某个编译原理的实验代码存档
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.
 
 
compile-work/parser/Checker.h

26 lines
461 B

//
// 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