merge
authorDerek Hower <drh5@cs.wisc.edu>
Wed, 5 Aug 2009 19:23:32 +0000 (14:23 -0500)
committerDerek Hower <drh5@cs.wisc.edu>
Wed, 5 Aug 2009 19:23:32 +0000 (14:23 -0500)
1  2 
src/mem/slicc/parser/parser.py

index c042ba2c18cb8ce05c64d09b67e053b0c5363684,95e8d25e513b229e452a81e54eac3449ea8c9e62..7fecfd27303da3aef8c2f27cb5b6d6aafaa99b37
@@@ -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)