Skip to content

Commit

Permalink
Merge pull request #40 from halogenandtoast/mm-yyin
Browse files Browse the repository at this point in the history
Set yyin to file if provided.
  • Loading branch information
matz committed Dec 18, 2014
2 parents 0014385 + fd3df81 commit a63a29f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ main(int argc, const char**argv)
{
int n;

if (argc > 1) {
yyin = fopen(argv[1], "r");
}

// yydebug = 1;
n = yyparse(NULL);
if (n == 0) {
Expand Down

0 comments on commit a63a29f

Please sign in to comment.