# Path: lems/base/base.py
# class LEMSBase(object):
#     """
#     Base object for PyLEMS.
#     """
# 
#     def copy(self):
#         return copy.deepcopy(self)
# 
#     def toxml(self):
#         return ""
# 
# Path: lems/base/stack.py
# class Stack(LEMSBase):
#     """
#     Basic stack implementation.
#     """
# 
#     def __init__(self):
#         """
#         Constructor.
#         """
# 
#         self.stack = []
#         """ List used to store the stack contents.
#         :type: list """
# 
#     def push(self, val):
#         """
#         Pushed a value onto the stack.
# 
#         :param val: Value to be pushed.
#         :type val: *
#         """
# 
#         self.stack = [val] + self.stack
# 
#     def pop(self):
#         """
#         Pops a value off the top of the stack.
# 
#         :return: Value popped off the stack.
#         :rtype: *
# 
#         :raises StackError: Raised when there is a stack underflow.
#         """
# 
#         if self.stack:
#             val = self.stack[0]
#             self.stack = self.stack[1:]
#             return val
#         else:
#             raise StackError("Stack empty")
# 
#     def top(self):
#         """
#         Returns the value off the top of the stack without popping.
# 
#         :return: Value on the top of the stack.
#         :rtype: *
# 
#         :raises StackError: Raised when there is a stack underflow.
#         """
# 
#         if self.stack:
#             return self.stack[0]
#         else:
#             raise StackError("Stack empty")
# 
#     def is_empty(self):
#         """
#         Checks if the stack is empty.
# 
#         :return: True if the stack is empty, otherwise False.
#         :rtype: Boolean
#         """
# 
#         return self.stack == []
# 
#     def __str__(self):
#         """
#         Returns a string representation of the stack.
# 
#         @note: This assumes that the stack contents are capable of generating
#         string representations.
#         """
# 
#         if len(self.stack) == 0:
#             s = "[]"
#         else:
#             s = "[" + str(self.stack[0])
#             for i in range(1, len(self.stack)):
#                 s += ", " + str(self.stack[i])
#             s += "]"
#         return s
# 
#     def __repr__(self):
#         return self.__str__()


from lems.base.base import LEMSBase
from lems.base.stack import Stack
        "exp": 8,
        ".and.": 1,
        ".or.": 1,
        ".gt.": 2,
        ".ge.": 2,
        ".geq.": 2,
        ".lt.": 2,
        ".le.": 2,
        ".eq.": 2,
        ".neq.": 2,
        ".ne.": 2,
    }  # .neq. is preferred!

    depth = 0

    """ Dictionary mapping operators to their priorities.
    :type: dict(string -> Integer) """

    def __init__(self, parse_string):
        """
        Constructor.

        :param parse_string: Expression to be parsed.
        :type parse_string: string
        """

        self.parse_string = parse_string
        """ Expression to be parsed.
        :type: string """


# Path: lems/base/base.py
# class LEMSBase(object):
#     """
#     Base object for PyLEMS.
#     """
# 
#     def copy(self):
#         return copy.deepcopy(self)
# 
#     def toxml(self):
#         return ""
# 
# Path: lems/base/stack.py
# class Stack(LEMSBase):
#     """
#     Basic stack implementation.
#     """
# 
#     def __init__(self):
#         """
#         Constructor.
#         """
# 
#         self.stack = []
#         """ List used to store the stack contents.
#         :type: list """
# 
#     def push(self, val):
#         """
#         Pushed a value onto the stack.
# 
#         :param val: Value to be pushed.
#         :type val: *
#         """
# 
#         self.stack = [val] + self.stack
# 
#     def pop(self):
#         """
#         Pops a value off the top of the stack.
# 
#         :return: Value popped off the stack.
#         :rtype: *
# 
#         :raises StackError: Raised when there is a stack underflow.
#         """
# 
#         if self.stack:
#             val = self.stack[0]
#             self.stack = self.stack[1:]
#             return val
#         else:
#             raise StackError("Stack empty")
# 
#     def top(self):
#         """
#         Returns the value off the top of the stack without popping.
# 
#         :return: Value on the top of the stack.
#         :rtype: *
# 
#         :raises StackError: Raised when there is a stack underflow.
#         """
# 
#         if self.stack:
#             return self.stack[0]
#         else:
#             raise StackError("Stack empty")
# 
#     def is_empty(self):
#         """
#         Checks if the stack is empty.
# 
#         :return: True if the stack is empty, otherwise False.
#         :rtype: Boolean
#         """
# 
#         return self.stack == []
# 
#     def __str__(self):
#         """
#         Returns a string representation of the stack.
# 
#         @note: This assumes that the stack contents are capable of generating
#         string representations.
#         """
# 
#         if len(self.stack) == 0:
#             s = "[]"
#         else:
#             s = "[" + str(self.stack[0])
#             for i in range(1, len(self.stack)):
#                 s += ", " + str(self.stack[i])
#             s += "]"
#         return s
# 
#     def __repr__(self):
#         return self.__str__()


# Path: lems/parser/expr.py
from lems.base.base import LEMSBase
from lems.base.stack import Stack

        "exp": 8,
        ".and.": 1,
        ".or.": 1,
        ".gt.": 2,
        ".ge.": 2,
        ".geq.": 2,
        ".lt.": 2,
        ".le.": 2,
        ".eq.": 2,
        ".neq.": 2,
        ".ne.": 2,
    }  # .neq. is preferred!

    depth = 0

    """ Dictionary mapping operators to their priorities.
    :type: dict(string -> Integer) """

    def __init__(self, parse_string):
        """
        Constructor.

        :param parse_string: Expression to be parsed.
        :type parse_string: string
        """

        self.parse_string = parse_string
        """ Expression to be parsed.
        :type: string """


        self.token_list = None