/* * TEST_DLEX.C * * (c)Copyright 1993-2014, Matthew Dillon, All Rights Reserved. See the * COPYRIGHT file at the base of the distribution. * * test_dlex sourcefile */ #include "defs.h" int main(int ac, char **av) { int i; for (i = 1; i < ac; ++i) { Lex *lex; token_t tok; if ((lex = LexOpen(av[i], &tok)) != NULL) { printf("LEXICAL SCAN OF: %s\n", av[i]); while (LexToken(&tok) != TOK_EOF) LexDebugLine(&tok); LexClose(&lex); } else { printf("Unable to open %s\n", av[i]); } } return(0); }