5 #include "textparser.hxx"
6 #include "htmlparser.hxx"
7 #include "latexparser.hxx"
14 main(int argc
, char** argv
)
17 /* first parse the command line options */
20 fprintf(stderr
,"correct syntax is:\n");
21 fprintf(stderr
,"testparser file\n");
22 fprintf(stderr
,"example: testparser /dev/stdin\n");
26 /* open the words to check list */
27 f
= fopen(argv
[1],"r");
29 fprintf(stderr
,"Error - could not open file of words to check\n");
33 TextParser
* p
= new LaTeXParser("qwertzuiopasdfghjklyxcvbnméáúõûóüöíQWERTZUIOPASDFGHJKLYXCVBNMÍÉÁÕÚÖÜÓÛ");
38 while(fgets(buf
,MAXLNLEN
,f
)) {
39 fprintf(stdout
,"---------------------------------------\n");
41 fprintf(stderr
, "x:%s\n", buf
);
42 p
->set_url_checking(1);
43 while ((next
=p
->next_token())) {
44 fprintf(stdout
,"token: %s\n",next
);