diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2016-02-04 22:54:58 -0500 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2016-02-04 22:54:58 -0500 |
| commit | 05997f69d8130de2457b5560abf1889bb7fc0c91 (patch) | |
| tree | 8224335e1dfd119b658aaa2c7ef3fabdd032f55e /BibTeX.py | |
| parent | 9096b58187e2bffb5846d727c61aaf616fddc9bc (diff) | |
| download | anonbib-05997f69d8130de2457b5560abf1889bb7fc0c91.tar.gz | |
Diffstat (limited to 'BibTeX.py')
| -rw-r--r-- | BibTeX.py | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -6,12 +6,10 @@ Based on perl code by Eddie Kohler; heavily modified. """ -import cStringIO import re import sys import config - from entry import BibTeXEntry __all__ = ['ParseError', 'BibTeX', 'FileIter', 'Parser', 'parseFile'] @@ -67,7 +65,8 @@ class BibTeX: del ent['crossref'] if cr.entryLine < ent.entryLine: - print "Warning: crossref %s used after declaration" % cr.key + print ("Warning: crossref %s used after " + "declaration" % cr.key) for k in cr: if k in ent: @@ -246,7 +245,8 @@ class Parser: data.append(m.group(1)) line = m.group(2) else: - raise ParseError("Questionable line at line %s" % self.lineno) + raise ParseError("Questionable line " + "at line %s" % self.lineno) # Got a string, check for concatenation. if line.isspace() or not line: @@ -268,7 +268,8 @@ class Parser: m = BRACE_BEGIN_RE.match(line) if not m: - raise ParseError("Expected an opening brace at line %s" % self.lineno) + raise ParseError("Expected an opening " + "brace at line %s" % self.lineno) line = m.group(1) proto = {'string': 'p', 'preamble': 'v'}.get(self.curEntType, 'kp*') |
