📄 mylexer.l
字号:
%{
/****************************************************************************
exp01.l
ParserWizard generated Lex file.
Date: 2008年5月8日
****************************************************************************/
#include "stdio.h"
%}
/////////////////////////////////////////////////////////////////////////////
// declarations section
// place any declarations here
// word count
// char count
// line count
int wcount=0;
int ccount=0;
int lcount=1;
%%
[A-Za-z0-9]+ { wcount++; ccount += yyleng; }
\n {lcount++;ccount++;}
. ccount++;
/////////////////////////////////////////////////////////////////////////////
// rules section
// place your Lex rules here
%%
/////////////////////////////////////////////////////////////////////////////
// programs section
int main(void)
{
yylex();
printf("in this file , there are : \n %d chars %d words %d lines ",ccount,wcount,lcount);
return yywrap();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -