From: Derek Hower Date: Wed, 5 Aug 2009 19:23:32 +0000 (-0500) Subject: merge X-Git-Tag: Calvin_Submission~159 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dff7c9eaa0795dc23b32608dc1e26026a5292d30;p=gem5.git merge --- dff7c9eaa0795dc23b32608dc1e26026a5292d30 diff --cc src/mem/slicc/parser/parser.py index c042ba2c1,95e8d25e5..7fecfd273 --- a/src/mem/slicc/parser/parser.py +++ b/src/mem/slicc/parser/parser.py @@@ -549,10 -531,19 +538,11 @@@ def scan(filenames) for filename in filenames: lex.lexer.lineno = 1 try: + print "parsing ",filename results = yacc.parse(file(filename, 'r').read()) - except (ParseError,TokenError), e: - print "File ",filename," ",e - raise e - #except ParseError, e: - # print "File ",filename," "e - # raise e, tuple([filename] + [ i for i in e ]) - - #except ParseError, e: - # print e - + except (TokenError, ParseError), e: + sys.exit("%s: %s:%d" % (e, filename, e.token.lineno)) - + for result in results: result.add(hh, cc)