From f3eb6f6965276c055818264f5c0fa19bf590e05c Mon Sep 17 00:00:00 2001 From: Terence Parr <> Date: Tue, 3 Oct 1995 18:44:42 -0500 Subject: [PATCH] auto commit for import --- testcpp/6/main.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 testcpp/6/main.cpp diff --git a/testcpp/6/main.cpp b/testcpp/6/main.cpp new file mode 100755 index 0000000..e5f9652 --- /dev/null +++ b/testcpp/6/main.cpp @@ -0,0 +1,50 @@ +/* we must define ANTLRTokenType, but it will be different for parsers A and B; + * so, we just define it as an 'int', which is bad, but we can do nothing + * else. + */ +#include +#include +#include "A/tokens.h" +#include "A.h" +#include "B.h" +#include "ALexer.h" +#include "BLexer.h" + +#include "PBlackBox.h" + +typedef ANTLRCommonToken ANTLRToken; + +int main(int argc, char *argv[]) +{ + ANTLRToken aToken; /* create a token to fill in for DLG */ + DLGFileInput in(stdin); + + if ( argc!=3 ) { + fprintf(stderr, "usage: t file1 file2\n"); + exit(EXIT_SUCCESS); + } + + ParserBlackBox p1(argv[1]); + p1.parser()->e(); + + ParserBlackBox p2(argv[2]); + p2.parser()->e(); + +/* + ALexer scan1(&in,2000); + ANTLRTokenBuffer pipe1(&scan1); + scan1.setToken(&aToken); + A parser1(&pipe1); + parser1.init(); + parser1.e(); + + BLexer scan2(&in,2000); + ANTLRTokenBuffer pipe2(&scan2); + scan2.setToken(&aToken); + B parser2(&pipe2); + parser2.init(); + parser2.e(); +*/ + + return 0; +} -- 2.40.0