1 %{
2 #include<stdio.h>
3 #include<ctype.h>
4 %}
5 %option noyywrap
6 %%
7 [a-z] { putchar(yytext[0]); }
8
9 "/*"
10 {
11 char ch;
12 while((ch = input()) != '*')
13 putchar(toupper(ch));
14 while((ch = input()) == '*');
15 if((ch = input()) == '/')
16 return 0;
17 }
%%
int main()
{
yylex();
return 0;
}
~
when i'm trying to compile this "lex comment.lex" i'm getting unrecognized rule error in lines 12 ,14 ,15...... Can anyone tell me the answer.........