def buildFrame(self, command, tokens, index):
        """Create frame and attach to over frame if indicated

           frame frameName
           frame frameName overName

           the frameName next is reserved

        """
        if not self.currentStore:
            msg = "Error building %s. No current store." % (command,)
            raise excepting.ParseError(msg, tokens, index)

        if not self.currentFramer:
            msg = "Error building %s. No current framer." % (command,)
            raise excepting.ParseError(msg, tokens, index)

        try:
            name = tokens[index]
            index +=1

            self.verifyName(name, command, tokens, index)

            over = None

            while index < len(tokens): #options
                connective = tokens[index]
                index += 1

                if connective == 'in':
                    over = tokens[index]
                    index +=1
                else:
                    msg = "Error building %s. Bad connective got %s." % (command, connective)
                    raise excepting.ParseError(msg, tokens, index)

        except __HOLE__:
            msg = "Error building %s. Not enough tokens." % (command,)
            raise excepting.ParseError(msg, tokens, index)

        if index != len(tokens):
            msg = "Error building %s. Unused tokens." % (command,)
            raise excepting.ParseError(msg, tokens, index)

        if name in ReservedFrameNames:
            msg = "Error building %s in Framer %s. Frame name %s reserved." %\
                    (command, self.currentFramer.name, name)
            raise excepting.ParseError(msg, tokens, index)
        elif name in framing.Frame.Names: #could use Registry Retrieve function
            msg = "Error building %s in Framer %s. Frame %s already exists." %\
                    (command, self.currentFramer.name, name)
            raise excepting.ParseError(msg, tokens, index)
        else:
            frame = framing.Frame(name = name, store = self.currentStore,
                                  framer = self.currentFramer.name)

            if over:
                frame.over = over #need to resolve later

            #if previous frame did not have explicit next frame then use this new frame
            # ad next lexically
            if self.currentFrame and not self.currentFrame.next_:
                self.currentFrame.next_ = frame.name

                #default first frame is first lexical frame if not assigned otherwise
                #so if startFrame is none then we must be first lexical frame
            if not self.currentFramer.first: #frame.framer.first:
                self.currentFramer.first = frame.name #frame.framer.first = frame

            self.currentFrame = frame
            self.currentContext = NATIVE

        console.profuse("     Created frame {0} with over {1}\n".format(frame.name, over))

        return True
dataset/ETHPy150Open ioflo/ioflo/ioflo/base/building.py/Builder.buildFrame