Lex Program to Identify Comment Lines
Lex Program to Identify both single line and multi line comments using regular expressions in lex
%{
#include<stdio.h>
%}
%%
[/]{1}[/]{1}[a-zA-Z0-9]* printf("Single Line Comment");
[/]{1}[*]{1}[a-zA-Z0-9]*[*]{1}[/]{1} printf("MultiLine Comment");
%%
main(){yylex();}
Recent Comments