I am working on writing a flex scanner for a language supporting nested comment like this:
/* /**/ */
I use to work on ocaml/ocamllex that supp
I resolve this problem by using yy_push_state , yy_pop_state and start condition like this :
%x comment %% "/*" { yy_push_state(comment); } { "*/" { yy_pop_state(); } "/*" { yy_push_state(comment); } } %%
In this way, I can handle any level of nested comment.