代码搜索结果
找到约 10,000 项符合
L 的代码
ckeyword.l
%{
/* Recognising ckeyword
*/
#include
%}
%%
[\t ]+
auto |
break |
char |
case |
const |
continue |
default |
do |
double |
else |
does |
enum |
extern |
float |
goto |
int |
long |
registe
5.l
%{
#include
%}
%%
[1-9][0-9][0-9]([0]|[5]) {printf("divisible by 5");}
. {}
%%
int yywrap(void)
{
return 1;
}
int main(void)
{
yylex();
return 0;
}
cidentifier.l
%{
/* example for verb and article
*/
%}
#include
%%
[\t ]+
auto
break |
char |
case |
const |
continue |
default |
do |
double |
else |
does |
enum |
extern |
float |
for |
goto |
if |
int
file.l
%{
#include
%}
%%
auto |
break |
case |
char |
const |
continue |
default |
do |
double |
else |
enum |
extern |
float |
for |
goto |
if |
int |
long |
register |
return |
short |
signed
identifier.l
%{
#include
%}
%%
[0-9]+[_]*[a-zA-Z]* printf("It is not an identifier\n",yytext);
[_]*[a-zA-Z]*[_]*[a-zA-Z0-9]* printf("It is a identifier\n",yytext);
%%
float.l
%{
#include
%}
%%
[0-9]*[.][0-9]+ printf("%s is float number",yytext);
[0-9]+ printf("%s is not a float number",yytext);
[.]+ printf("%s is not a valid input",yytext);
%%
1.l
%%
%%
int yywrap(void) { return 1; }
int main(void)
{
yylex();
return 0;
}
cal.l
%{
#include
#include
#include
#include
#define YYSTYPE double
#include "y.tab.h"
extern YYSTYPE yylval;
%}
digit [0-9]
space [ \t]
%%
{space}