Change yapps.py t exit 1 on failure to parse
This commit is contained in:
parent
be9ccd5758
commit
d845a26c95
2 changed files with 9 additions and 2 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
|
@ -1,3 +1,9 @@
|
|||
yapps (2.1.1-7) unstable; urgency=low
|
||||
|
||||
* Change yapps.py t exit 1 on failure to parse
|
||||
|
||||
-- Matthias Urlichs <smurf@debian.org> Wed, 31 Dec 2003 13:57:38 +0100
|
||||
|
||||
yapps (2.1.1-6) unstable; urgency=low
|
||||
|
||||
* Update to 3.6.1, use build-depends-indep.
|
||||
|
|
@ -45,7 +45,7 @@ def generate(inputfilename, outputfilename='', dump=0, **flags):
|
|||
|
||||
parser = grammar.ParserDescription(scanner)
|
||||
t = runtime.wrap_error_reporter(parser, 'Parser')
|
||||
if t is None: return # Failure
|
||||
if t is None: return 1 # Failure
|
||||
if preparser is not None: t.preparser = preparser
|
||||
if postparser is not None: t.postparser = postparser
|
||||
|
||||
|
|
@ -64,6 +64,7 @@ def generate(inputfilename, outputfilename='', dump=0, **flags):
|
|||
else:
|
||||
t.output = open(outputfilename, 'w')
|
||||
t.generate_output()
|
||||
return 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
import doctest
|
||||
|
|
@ -109,4 +110,4 @@ if __name__ == '__main__':
|
|||
else:
|
||||
from yapps import grammar
|
||||
|
||||
generate(*tuple(args), **flags)
|
||||
sys.exit(generate(*tuple(args), **flags))
|
||||
Loading…
Reference in a new issue