fix: specify start, allow parse file as cmd arg
This commit is contained in:
parent
7f11aaf21e
commit
a529b6e3f6
|
|
@ -96,6 +96,8 @@ namespace DragonLisp {
|
|||
|
||||
%define parse.error verbose
|
||||
|
||||
%start S
|
||||
|
||||
%%
|
||||
|
||||
S
|
||||
|
|
|
|||
|
|
@ -14,8 +14,10 @@ DLDriver::~DLDriver() {
|
|||
|
||||
int DLDriver::parse(const std::string& f) {
|
||||
std::ifstream in(f);
|
||||
if (!in.good())
|
||||
if (!in.good()) {
|
||||
std::printf("Could not open file %s\n", f.c_str());
|
||||
return 1;
|
||||
}
|
||||
return this->parse(in, f);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue