Improve errors for missing ; and unexpected )
This commit is contained in:
parent
d315187a1c
commit
62670e756e
4 changed files with 13 additions and 8 deletions
|
|
@ -13,12 +13,8 @@ Version 3.0.4 (in progress)
|
|||
problem.
|
||||
|
||||
2015-01-08: olly
|
||||
Improve error message for extraneous '%}'.
|
||||
|
||||
2015-01-08: olly
|
||||
Improve error message when an unknown SWIG directive is used - this
|
||||
previously gave the cryptic "Error: Syntax error in input(1).", but
|
||||
now gives "Error: Unknown directive '%foo'."
|
||||
Improve error messages for a few cases which previously gave the
|
||||
one of the cryptic catch-all errors "Syntax error in input".
|
||||
|
||||
2015-01-08: olly
|
||||
Provide -cppext as a general command line option for setting the
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
c_missing_semi.i:3: Error: Syntax error in input(1).
|
||||
c_missing_semi.i:3: Error: Syntax error - missing ';'?
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
cpp_extra_brackets.i:5: Error: Syntax error in input(3).
|
||||
cpp_extra_brackets.i:5: Error: Unexpected ')'.
|
||||
|
|
|
|||
|
|
@ -3024,6 +3024,15 @@ c_decl_tail : SEMI {
|
|||
skip_balanced('{','}');
|
||||
$$ = 0;
|
||||
}
|
||||
| error {
|
||||
$$ = 0;
|
||||
if (yychar == RPAREN) {
|
||||
Swig_error(cparse_file, cparse_line, "Unexpected ')'.\n");
|
||||
} else {
|
||||
Swig_error(cparse_file, cparse_line, "Syntax error - missing ';'?\n");
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
;
|
||||
|
||||
initializer : def_args {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue