def prepare(self, start=-1):
        """Setup the parser for parsing.

        Takes the starting symbol as an argument.
        """
        if start == -1:
            start = self.grammar.start
        self.root = None
        current_node = Node(start, None, [], 0, 0)
        self.stack = []
        self.stack.append((self.grammar.dfas[start - 256], 0, current_node))
def prepare ( self , start = - 1 ) : if start == - 1 : start = self . grammar . start self . root = None current_node = Node ( start , None , [ ] , 0 , 0 ) self . stack = [ ] self . stack . append ( ( self . grammar . dfas [ start - 256 ] , 0 , current_node ) )
Setup the parser for parsing.

        Takes the starting symbol as an argument.