[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LEX and comments.
I am a poor LEX programmer...
In my language, there are comments such:
{line 1
line 2
...
line n}
currently I use the following lines in the .tokens file:
<sentences>"{" BEGIN comment;\
<comment>[^}\\n]* {fprintf(yyout,"-1\\n%d\\n%s\\n",yyleng,yytext); }\
<comment>"}" BEGIN sentences ;\
For several reasons I would like that the delimiters appear in the comment;
so the result of compilation would be for example:
{^comment_s [comment {line1,
comment line2,
comment line3}]}
Is it a way to update the .tokens file in order to achieve that?
Thanks in advance.
-- Guy DURRIEU.