Skip to content
Snippets Groups Projects
Commit 02cba80e authored by benjamin.franksen's avatar benjamin.franksen
Browse files

snc: removed stand-alone lexer test program

parent 1a32af4a
No related branches found
No related tags found
No related merge requests found
...@@ -29,12 +29,6 @@ snc_SRCS += builtin.c # builtin constants and functions ...@@ -29,12 +29,6 @@ snc_SRCS += builtin.c # builtin constants and functions
snc_LIBS += Com snc_LIBS += Com
ifdef LEXER_TEST
PROD_HOST =
TESTPROD_HOST = lexer
USR_CFLAGS = -DTEST_LEXER
endif
# locally overwrite default value for this variable # locally overwrite default value for this variable
INSTALL_DOC = $(INSTALL_LOCATION)/documentation INSTALL_DOC = $(INSTALL_LOCATION)/documentation
DOCS += bnf.inc DOCS += bnf.inc
......
...@@ -437,28 +437,6 @@ c_code_line: ...@@ -437,28 +437,6 @@ c_code_line:
DONE; /* dead code, only here to make compiler warning go away */ DONE; /* dead code, only here to make compiler warning go away */
} }
#ifdef TEST_LEXER
void report_loc(const char *f, int l) {
fprintf(stderr, "%s:%d: ", f, l);
}
int main() {
Scanner s;
int tt; /* token type */
Token tv; /* token value */
memset(&s, 0, sizeof(s));
s.cur = fill(&s, s.cur);
s.line = 1;
while( (tt = scan(&s, &tv)) != EOI) {
printf("%s:%d: %2d\t$%s$\n", tv.file, tv.line, tt, tv.str);
}
return 0;
}
#else
Expr *parse_program(const char *src_file) Expr *parse_program(const char *src_file)
{ {
Scanner s; Scanner s;
...@@ -484,5 +462,3 @@ Expr *parse_program(const char *src_file) ...@@ -484,5 +462,3 @@ Expr *parse_program(const char *src_file)
snlParserFree(parser, free); snlParserFree(parser, free);
return result; return result;
} }
#endif /* TEST_LEXER */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment