📄 word.l
字号:
%{{* 下面的例子改编自lex和yacc第二版 识别更多的话 *} program IsVerb;{$APPTYPE CONSOLE}uses SysUtils, LexLib;%}%%[\t ]+ {* 忽略空格 *} ;is |am |are |were |was |be |being |been |do |does |did |will |would |should |can |could |has |have |had |go writeln(format('%s是动词', [yytext])); very |simply |gently |quietly |calmly |angrily writeln(format('%s是副词', [yytext])); to |from |behind |above |below |between |below writeln(format('%s是介词', [yytext])); if |then |and |but |or writeln(format('%s是连词', [yytext])); their |my |your |his |her |its writeln(format('%s是形容词', [yytext])); I |you |he |she |we |they writeln(format('%s是代词', [yytext])); [a-zA-Z]+ writeln(format('%s无法识别', [yytext])); \&.|\n ECHO; {* 其它 */ }%%begin yylex;end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -