Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. \/\/ {
  2. BEGIN(COMMENT);
  3. comment = "//";
  4.  
  5. }
  6.  
  7. <COMMENT>([^/\n]|((\/)+[^/\n]))*(\/+)\n {
  8. comment += string(yytext);
  9. }
  10.  
  11. <COMMENT>([^/\n]|((\/)+[^/\n]))* {
  12. BEGIN(INITIAL);
  13. comment += string(yytext);
  14. fprintf(f_log, "Line No. %d: Token <COMMENT> Lexeme %s found\n", line_count, comment.c_str());
  15. line_count = yylineno;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement