Menu

#29 certain errors don't cause make_dparser to fail

v1.0_(example)
open
nobody
5
2013-12-31
2013-12-31
No

Note the missing semicolon for production B below. This causes an error, but the tool generates a .c file (I think just containing stuff for A) and returns success (status code 0). Should this really be a successful execution? I would much rather it fail, as right now, it's difficult to develop properly with Makefiles, as even when my grammar has errors, all the rest of the build process proceeds incorrectly.

$ cat k.g
A: "foo";
B: "bar"
C: "baz";

$ make_dparser k.g
k.g:3: syntax error after ':'

$ echo $?
0

Discussion


Log in to post a comment.

MongoDB Logo MongoDB