analyzetable.h
来自「LL1通用语法分析器」· C头文件 代码 · 共 50 行
H
50 行
/************************************************************************ Copyright IBMTC Written by Xinxi Wang**************************************************************************/#ifndef ANALYZETABLE_H#define ANALYZETABLE_H#include <string>#include <map>#include "istream"#include "Index.h"#include "Exception.h"#include "Production.h"/** * LL分析表 */class AnalyzeTable{public: /** * @brief 获取索引所对应的产生式 * @param index 索引 * @return 索引对应的产生式 */ Production getProduction (const Index& index ) const throw(ProductionNotExists); /** * @brief 添加索引所对应的产生式 * @param index 索引 * @param production 索引对应的产生式 */ void addProduction (const Index& index, const Production& production ) throw(ProductionAlreadyExists); private: typedef std::map<Index, Production> TableType; TableType table;};#endif // ANALYZETABLE_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?