import pyparsing as pp

from .almanac_error import AlmanacError
from .generic_errors import PositionalValueError


class BaseParseError(AlmanacError):
    """The base class exception type for parser-related errors."""


class PartialParseError(BaseParseError, PositionalValueError):
    """An exception type for when command parsing partially fails."""

    def __init__(
        self,
        msg: str,
        remaining: str,
        partial_result: pp.ParseResults,
        col: int,
    ) -> None:
        super().__init__(msg, col-1)

        self.remaining = remaining
        self.partial_result = partial_result
        self.col = col


class TotalParseError(BaseParseError):
    """Exception type for when command parsing totally fails."""

9d4bc922a4b45aca993503d3074bcb6dfe209a10
<mask token>


class PartialParseError(BaseParseError, PositionalValueError):
    """An exception type for when command parsing partially fails."""

    def __init__(self, msg: str, remaining: str, partial_result: pp.
        ParseResults, col: int) ->None:
        super().__init__(msg, col - 1)
        self.remaining = remaining
        self.partial_result = partial_result
        self.col = col


class TotalParseError(BaseParseError):
    """Exception type for when command parsing totally fails."""

<mask token>


class BaseParseError(AlmanacError):
    <mask token>


class PartialParseError(BaseParseError, PositionalValueError):
    """An exception type for when command parsing partially fails."""

    def __init__(self, msg: str, remaining: str, partial_result: pp.
        ParseResults, col: int) ->None:
        super().__init__(msg, col - 1)
        self.remaining = remaining
        self.partial_result = partial_result
        self.col = col


class TotalParseError(BaseParseError):
    """Exception type for when command parsing totally fails."""

<mask token>


class BaseParseError(AlmanacError):
    """The base class exception type for parser-related errors."""


class PartialParseError(BaseParseError, PositionalValueError):
    """An exception type for when command parsing partially fails."""

    def __init__(self, msg: str, remaining: str, partial_result: pp.
        ParseResults, col: int) ->None:
        super().__init__(msg, col - 1)
        self.remaining = remaining
        self.partial_result = partial_result
        self.col = col


class TotalParseError(BaseParseError):
    """Exception type for when command parsing totally fails."""

import pyparsing as pp
from .almanac_error import AlmanacError
from .generic_errors import PositionalValueError


class BaseParseError(AlmanacError):
    """The base class exception type for parser-related errors."""


class PartialParseError(BaseParseError, PositionalValueError):
    """An exception type for when command parsing partially fails."""

    def __init__(self, msg: str, remaining: str, partial_result: pp.
        ParseResults, col: int) ->None:
        super().__init__(msg, col - 1)
        self.remaining = remaining
        self.partial_result = partial_result
        self.col = col


class TotalParseError(BaseParseError):
    """Exception type for when command parsing totally fails."""

import pyparsing as pp

from .almanac_error import AlmanacError
from .generic_errors import PositionalValueError


class BaseParseError(AlmanacError):
    """The base class exception type for parser-related errors."""


class PartialParseError(BaseParseError, PositionalValueError):
    """An exception type for when command parsing partially fails."""

    def __init__(
        self,
        msg: str,
        remaining: str,
        partial_result: pp.ParseResults,
        col: int,
    ) -> None:
        super().__init__(msg, col-1)

        self.remaining = remaining
        self.partial_result = partial_result
        self.col = col


class TotalParseError(BaseParseError):
    """Exception type for when command parsing totally fails."""
