# Path: z80/_source.py
# class _SourcePos(object):
#     def __init__(self, offset, file):
#         self.__offset = offset
#         self.__file = file
# 
#     @property
#     def __coordinates(self):
#         return self.__file.get_coordinates(self.__offset)
# 
#     @property
#     def column_no(self):
#         line, line_no, column_no = self.__coordinates
#         return column_no
# 
#     @property
#     def inline_text(self):
#         line, line_no, column_no = self.__coordinates
#         return '%s:%s:%s' % (self.__file, line_no, column_no)
# 
#     def __str__(self):
#         return self.inline_text
# 
#     @property
#     def context_text(self):
#         line, line_no, column_no = self.__coordinates
#         return '%s\n%s^\n' % (line, ' ' * column_no)


import re
from ._source import _SourcePos
    @property
    def pos(self):
        return _SourcePos(self.__offset, self.__source_file)

    def skip(self, pattern):
        match = pattern.match(self.__image, self.__offset)
        if match is not None:
            self.__offset = match.end()

    def skip_whitespace(self):
        self.skip(self.__WHITESPACE)

    def skip_to(self, pattern):
        match = pattern.search(self.__image, self.__offset)
        if match is not None:
            self.__offset = match.start()

    def skip_rest_of_line(self):
        self.skip_to(self.__END_OF_LINE)

    def skip_next(self, pattern):
        match = pattern.search(self.__image, self.__offset)
        if match is not None:
            self.__offset = match.end()
        return match

    def start_token(self):
        self.__token_offset = self.__offset

    def end_token(self):

# Path: z80/_source.py
# class _SourcePos(object):
#     def __init__(self, offset, file):
#         self.__offset = offset
#         self.__file = file
# 
#     @property
#     def __coordinates(self):
#         return self.__file.get_coordinates(self.__offset)
# 
#     @property
#     def column_no(self):
#         line, line_no, column_no = self.__coordinates
#         return column_no
# 
#     @property
#     def inline_text(self):
#         line, line_no, column_no = self.__coordinates
#         return '%s:%s:%s' % (self.__file, line_no, column_no)
# 
#     def __str__(self):
#         return self.inline_text
# 
#     @property
#     def context_text(self):
#         line, line_no, column_no = self.__coordinates
#         return '%s\n%s^\n' % (line, ' ' * column_no)


# Path: z80/_token.py
import re
from ._source import _SourcePos

    @property
    def pos(self):
        return _SourcePos(self.__offset, self.__source_file)

    def skip(self, pattern):
        match = pattern.match(self.__image, self.__offset)
        if match is not None:
            self.__offset = match.end()

    def skip_whitespace(self):
        self.skip(self.__WHITESPACE)

    def skip_to(self, pattern):
        match = pattern.search(self.__image, self.__offset)
        if match is not None:
            self.__offset = match.start()

    def skip_rest_of_line(self):
        self.skip_to(self.__END_OF_LINE)

    def skip_next(self, pattern):
        match = pattern.search(self.__image, self.__offset)
        if match is not None:
            self.__offset = match.end()
        return match

    def start_token(self):
        self.__token_offset = self.__offset

    def end_token(self):

        pos = _SourcePos(self.__token_offset, self.__source_file)