<commit_before>from logbook import Logger

from exc import ParserError


class BaseParser(object):
    @property
    def lineno(self):
        return self.tokenizer.lineno

    @property
    def colno(self):
        return self.tokenizer.colno

    def _expect(self, *args):
        t = self.tokens.next()
        if not args == t[:len(args)]:
            raise ParserError(self, 'Expected %s, got %s instead' %
                              (args, t))
        return t


class BlockParser(BaseParser):
    BLOCK_TYPES = ['LC_IDENTIFICATION', 'LC_CTYPE', 'LC_COLLATE', 'LC_TIME',
                   'LC_NUMERIC', 'LC_MONETARY', 'LC_MESSAGES', 'LC_PAPER',<commit_msg>Use relative import of exc.<commit_after>from logbook import Logger

from .exc import ParserError


class BaseParser(object):
    @property
    def lineno(self):
        return self.tokenizer.lineno

    @property
    def colno(self):
        return self.tokenizer.colno

    def _expect(self, *args):
        t = self.tokens.next()
        if not args == t[:len(args)]:
            raise ParserError(self, 'Expected %s, got %s instead' %
                              (args, t))
        return t


class BlockParser(BaseParser):
    BLOCK_TYPES = ['LC_IDENTIFICATION', 'LC_CTYPE', 'LC_COLLATE', 'LC_TIME',
                   'LC_NUMERIC', 'LC_MONETARY', 'LC_MESSAGES', 'LC_PAPER',
{'fraction_non_alphanumeric': 0.11581291759465479, 'fraction_numerical': 0.0, 'mean_word_length': 2.4475703324808182, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6396646', 'n_tokens_mistral': 440, 'n_tokens_neox': 423, 'n_words': 105}