- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
main.cpp
资源名称:pccts133.zip [点击查看]
上传用户:itx_2006
上传日期:2007-01-06
资源大小:493k
文件大小:1k
源码类别:
编译器/解释器
开发平台:
Others
- /* 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 <stdio.h>
- #include <stdlib.h>
- #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 file2n");
- //
- // 7-Apr-97 MR1
- //
- //// MR1 exit(EXIT_SUCCESS);
- exit(PCCTS_EXIT_SUCCESS); //// MR1
- }
- ParserBlackBox<ALexer, A, ANTLRToken> p1(argv[1]);
- p1.parser()->e();
- ParserBlackBox<BLexer, B, ANTLRToken> 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;
- }