📄 analyzetable.cpp
字号:
/************************************************************************ Copyright IBMTC Written by Xinxi Wang**************************************************************************/#include "AnalyzeTable.h"#include <iostream>using namespace std;/** * @brief 获取索引所对应的产生式 * @param index 索引 * @return 索引对应的产生式 */Production AnalyzeTable::getProduction (const Index& index ) constthrow(ProductionNotExists){ TableType::const_iterator it = table.find(index); if(it == table.end()) throw ProductionNotExists(); else return Production(it->second);}/** * @brief 添加索引所对应的产生式 * @param index 索引 * @param production 索引对应的产生式 */void AnalyzeTable::addProduction (const Index& index, const Production& production ) throw(ProductionAlreadyExists) { if(table.count(index) != 0) throw ProductionAlreadyExists(); table[index] = production;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -