%{ #include char ltxml[100]; char fext[6] = ".ltxml"; char symstr[200]; char ltxmlstr[200]; int i,t,c,tmp,q; FILE *lt; %} ID [a-zA-Z0-9._:\|-]* NR [0-9]* %s idenv env sym %% "\\begin{module}"(" ")*"[" BEGIN(idenv); "]" BEGIN(INITIAL); "id="{ID} { for (i=3; i"symdef{\\"{ID}"}"(.)* { i=7; while (yytext[i]!='}'){ symstr[i-7]=yytext[i]; i++; } symstr[i-7]=0; BEGIN(sym); } "latexmldef{"(.)* { i=11; while (i"\\end{module}" { fclose(lt); BEGIN(INITIAL); } \n c++; . c++; %% main(argc, argv) int argc; char **argv; { if (argc==1) { printf("arguments expected: [-q] filename(s)\n"); } else { q=0; i=1; if (argv[1][0]=='-'){ i++; if (argv[1][1]=='q') q=1; } while (i