Advertisement
Sri27119

cd1.flex

Aug 20th, 2024 (edited)
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. %option noyywrap
  2. %%
  3. boolean|float|int|if|char printf("keywords");
  4. [0-9][0-9]* printf("constants");
  5. [a-z_A-Z][a-z_A-z0-9]* printf("identifiers");
  6. \\(n|r|t) printf("escape sequence %s\n", yytext);
  7. %%
  8.  
  9. int main()
  10. {
  11. yylex();
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement