updated main()
git-svn-id: svn://anubis/misc/llvm@74 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
416f9a3b8e
commit
4862781f5b
@ -1,6 +1,8 @@
|
||||
|
||||
%{
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
extern "C" {
|
||||
int yylex(void);
|
||||
@ -153,6 +155,11 @@ int main(int argc, char * argv[])
|
||||
if (argc > 0)
|
||||
{
|
||||
yyin = fopen(argv[1], "r");
|
||||
if (yyin == NULL)
|
||||
{
|
||||
cerr << "Failed to open file '" << argv[1] << "'" << endl;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
yyparse();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user