-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cc
26 lines (24 loc) · 1009 Bytes
/
main.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*-------------------------------------------------------*
* main.cc *
* *
* Defines the main() function so that the compilation *
* can proceed. Also defines PrintOneToken() which can be*
* used to simplify debugging by printing the scanned *
* tokens. *
*-------------------------------------------------------*/
#include <string.h>
#include <stdio.h>
#include "utility.h"
#include "errors.h"
#include "parser.h"
#include "location.h"
/*--------------------------------------------------------*
* Function: main() *
* Entry point to the program. *
*--------------------------------------------------------*/
int main(int argc, char **argv) {
InitScanner();
InitParser();
yyparse();
return (ReportError::findNumErrors() == 0? 0 : -1); // No error reporting yet
}