![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
公用代码
汪星人来地球
这个作者很懒,什么都没留下…
展开
-
删除字符串的空格
void remove_spaces(const char* s) { int i = 0, j = 0; while(s[j] != '\0') { if(s[j] != ' ')s[i++] = s[j]; j++; } s[i] = '\0'; }原创 2016-09-03 19:03:35 · 310 阅读 · 0 评论 -
去除代码中的注释——完整实现代码
#include class Token{ public: int type, value; const static int END_OF_FILE = EOF; const static int BLCOK_COMMENT_START = 0; const static int LINE_COMMENT_START = 1; const s原创 2017-01-05 10:26:46 · 2343 阅读 · 0 评论 -
词法分析
#include #include const int INT=0; const int BOOL = 1; const int VOID = 2; const int TRUE = 3; const int FALSE = 4; const int IF = 5; const int ELSE = 6; const int FOR = 7; const int WHILE = 8; con原创 2017-01-16 19:07:22 · 415 阅读 · 0 评论