<reponame>DavidWylie/RollWitch<filename>roll_witch/rolling/input/parser/base.py
from ..spec import InputPartSpec


class InputParser:
    def __init__(self) -> None:
        super().__init__()
        self.part_specs = {}

    def add_spec(self, spec: InputPartSpec):
        self.part_specs[spec.name] = spec

    def parse(self, roll_string: str):
        raise Exception("Unknown Parser")

from ..spec import InputPartSpec


class InputParser:
    def __init__(self) -> None:
        super().__init__()
        self.part_specs = {}

    def add_spec(self, spec: InputPartSpec):
        self.part_specs[spec.name] = spec

    def parse(self, roll_string: str):
        raise Exception("Unknown Parser")