📄 cal.l
字号:
%{#include <stdio.h>#include <unistd.h>#include <stdlib.h>#include <math.h>#define YYSTYPE double#include "y.tab.h"extern YYSTYPE yylval;%}digit [0-9]space [ \t]%%{space} { ; } /* spaces are ignored */{digit}+\.?|{digit}*\.{digit}+ { yylval = strtod(yytext,0); return NUMBER; }\*\* { return '^'; }cos { return COS; }exp { return EXP; }sin { return SIN; }sqrt { return SQRT; }tan { return TAN; }\n { return '\n'; }. { return yytext[0]; }%%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -