# Path: vii/Command.py
# class Command:
# 
#     def __init__(self):
#         self.parts = []
# 
#     def extend(self):
#         self.parts.append(Part())
# 
#     def part(self, nr):
#         return self.parts[nr]
# 
#     def previous(self):
#         return self.parts[-2]
# 
#     def last(self):
#         return self.parts[-1]
# 
#     def multiplyAll(self):
#         result = 1
#         for i in range(len(self.parts)):
#             count = self.parts[i].count
#             count = count if count else 1
#             result *= count
#         return result
# 
#     def hasNoCounts(self):
#         result = True
#         for i in range(len(self.parts)):
#             count = self.parts[i].count
#             if count: result = False
#         return result
# 
#     """ Shortcuts to the last part """
# 
#     def lpReady(self):
#         return self.last().ready
# 
#     def lpRegister(self):
#         return self.last().register
# 
#     def lpOperator(self):
#         return self.last().operator
# 
#     def lpCount(self):
#         return self.last().count
# 
#     def lpInserts(self):
#         return self.last().inserts
# 
#     def lpInsert(self):
#         return self.last().insert()


from .Logger import *
from .Command import Command

class TokenExecption(Exception): pass

class Dispatcher:
    def __init__(self):
        self.actionManager = None
        self.currentMode = None
        self.currentAction = None
        self.currentCommand = None
        self.forceTokenToString = False

    def step(self, token):
        self.stepInit(token)

# Path: vii/Command.py
# class Command:
# 
#     def __init__(self):
#         self.parts = []
# 
#     def extend(self):
#         self.parts.append(Part())
# 
#     def part(self, nr):
#         return self.parts[nr]
# 
#     def previous(self):
#         return self.parts[-2]
# 
#     def last(self):
#         return self.parts[-1]
# 
#     def multiplyAll(self):
#         result = 1
#         for i in range(len(self.parts)):
#             count = self.parts[i].count
#             count = count if count else 1
#             result *= count
#         return result
# 
#     def hasNoCounts(self):
#         result = True
#         for i in range(len(self.parts)):
#             count = self.parts[i].count
#             if count: result = False
#         return result
# 
#     """ Shortcuts to the last part """
# 
#     def lpReady(self):
#         return self.last().ready
# 
#     def lpRegister(self):
#         return self.last().register
# 
#     def lpOperator(self):
#         return self.last().operator
# 
#     def lpCount(self):
#         return self.last().count
# 
#     def lpInserts(self):
#         return self.last().inserts
# 
#     def lpInsert(self):
#         return self.last().insert()


# Path: vii/Dispatcher.py
from .Logger import *
from .Command import Command


class TokenExecption(Exception): pass

class Dispatcher:
    def __init__(self):
        self.actionManager = None
        self.currentMode = None
        self.currentAction = None
        self.currentCommand = None
        self.forceTokenToString = False

    def step(self, token):
        self.stepInit(token)

        self.stepCommand(token)