摘要: import java.awt.*;import javax.swing.*;import java.awt.event.ActionListener;import java.awt.event.ActionEvent;import javax.swing.ImageIcon;import java... 阅读全文
posted @ 2014-06-28 21:31 天羽屠龙舞 阅读(392) 评论(0) 推荐(0)
摘要: 1、先读入终结符,非终结符,和所有产生式。2、预处理:初始化;getpp()获得每个非终结符在产生式左边时的产生式编号,记录在 string getp[]中(可以多个)。3.获得所有的符号的first集:dfs法,从S开始DFS,遇到终结符则是递归出口,回溯时候沿路保存记录所有路径上VN的first... 阅读全文
posted @ 2014-06-28 10:56 天羽屠龙舞 阅读(2235) 评论(0) 推荐(0)
摘要: #include#include#include#include#include#include#includeusing namespace std;mapgetnum;char getchar[100]; //获得对应字符vectorproce;int table[100][10... 阅读全文
posted @ 2014-06-28 10:53 天羽屠龙舞 阅读(5167) 评论(0) 推荐(1)
摘要: #include#include#include#include#include#include#includeusing namespace std;int line=1,row=1;char c;mapma;struct kind{ string na; //单词 int n... 阅读全文
posted @ 2014-06-28 10:50 天羽屠龙舞 阅读(259) 评论(0) 推荐(0)