資源簡介
相關文章請訪問 https://blog.csdn.net/boss_crabe/article/details/80760348
代碼片段和文件信息
#include?
#include?
#include?
using?namespace?std;
struct?grammar?{
??int?n?p;
??struct?node?{
????int?line;
????string?word;
????node()?{}
????node(int?_line?string?_word){
??????line?=?_line;
??????word?=?_word;
????}
??}?que[100005];
??node?get(int?p)?{
????if?(p?==?n)?{
??????return?node(-1?““);
????}
????else?return?que[p];
??}
??void?read()?{
????freopen(“file_out.txt“?“r“?stdin);
????int?t;
????string?s;
????while?(cin?>>?t?&&?cin?>>?s)?{
??????que[n++]?=?node(t?s);
//??????cout?<????}
//????cout?<??}
??bool?is_number(char?c)?{
????return?c?>=?‘0‘?&&?c?<=?‘9‘;
??}
??bool?is_loweralpha(char?c)?{
????return?c?>=?‘a‘?&&?c?<=?‘z‘;
??}
??bool?is_upperalpha(char?c)?{
????return?c?>=?‘A‘?&&?c?<=?‘Z‘;
??}
??bool?is_alpha(char?c)?{
????return?is_loweralpha(c)?||?is_upperalpha(c);
??}
??void?print(int?x?int?y)?{
//????cout?<“line?“?<
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????152??2017-12-15?14:11??語法分析\file_out.txt
?????文件???????11158??2018-01-09?15:04??語法分析\語法分析.cpp
?????文件???????35218??2018-06-21?14:29??語法分析\語法分析.docx
?????文件?????1884063??2018-01-09?15:04??語法分析\語法分析.exe
?????目錄???????????0??2018-06-21?14:29??語法分析\
- 上一篇:KEIL 漢字編譯0xfd補丁
- 下一篇:鍵盤掃描及顯示設計實驗 微機原理
評論
共有 條評論