File: main.cpp

package info (click to toggle)
pccts 1.33MR33-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,212 kB
  • ctags: 5,280
  • sloc: ansic: 46,051; cpp: 3,234; makefile: 957
file content (20 lines) | stat: -rw-r--r-- 564 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "tokens.h"
#include "SimpleParser.h"
typedef ANTLRCommonToken ANTLRToken;
#include "SimpleTreeParser.h"
#include "DLGLexer.h"
#include "PBlackBox.h"

main()
{
	ParserBlackBox<DLGLexer, SimpleParser, ANTLRToken> lang(stdin);
	AST *root=NULL, *result;
	SimpleTreeParser tparser;

	lang.parser()->stat((ASTBase **)&root);	/* get the tree to walk with SORCERER */
	printf("input tree:"); root->preorder(); printf("\n");
	tparser.gen_stat((SORASTBase **)&root);
/*	in transform mode, use:
	tparser.gen_stat((SORASTBase **)&root, (SORASTBase **)&result);
 */
}