📄 lex.c
字号:
#include <stdio.h>#include <stdlib.h>#include <ctype.h>#ifdef UNIX#include "parser.tab.h"#else#include "parser.h"#endifint yylex(){ int c = getchar(); if (isdigit(c)) { char buff[128]; char *p = buff; do { *p++ = c; c = getchar(); } while (isdigit(c)); ungetc(c, stdin); *p = '\0'; yylval = atoi(buff); return NUM; } return c;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -