def buildRear(self, command, tokens, index):
        """
        Parse 'rear' verb

        Two Forms: only first form is currently supported

        rear original [as mine] [be aux] in frame framename

                framename cannot be me or in outline of me

        rear original as clonename be schedule

               schedule cannot be aux
               clonename cannot be mine



        """
        self.verifyCurrentContext(tokens, index) #currentStore, currentFramer, currentFrame exist

        try:
            original = None
            connective = None
            clone = 'mine'  # default is insular clone
            schedule = 'aux' # default schedule is aux
            frame = 'me' # default frame is current

            original = tokens[index]
            index +=1  # eat token
            self.verifyName(original, command, tokens, index)

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

                if connective == 'as':
                    clone = tokens[index]
                    index += 1

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

                elif connective == 'be':
                    schedule = tokens[index]
                    index += 1

                elif connective == 'in': #optional in frame or in framer clause
                    place = tokens[index] #need to resolve
                    index += 1  # eat token

                    if place != 'frame':
                        msg = ("ParseError: Building verb '{0}'. Invalid "
                            " '{1}' clause. Expected 'frame' got "
                            "'{2}'".format(command, connective, place))
                        raise excepting.ParseError(msg, tokens, index)

                    if index < len(tokens):
                        frame = tokens[index]
                        index += 1

                else:
                    msg = ("Error building {0}. Invalid connective"
                          " '{1}'.".format(command, connective))
                    raise excepting.ParseError(msg, tokens, index)

        except __HOLE__:
            msg = "Error building {0}. Not enough tokens.".format(command,)
            raise excepting.ParseError(msg, tokens, index)

        if index != len(tokens):
            msg = "Error building {0}. Unused tokens.".format(command,)
            raise excepting.ParseError(msg, tokens, index)

        # only allow schedule of aux for now
        if schedule not in ScheduleValues or schedule not  in ['aux']:
            msg = "Error building {0}. Bad scheduled option got '{1}'.".format(command, schedule)
            raise excepting.ParseError(msg, tokens, index)

        schedule = ScheduleValues[schedule] #replace text with value

        # when clone is insular and schedule is aux then frame cannot be
        # current frames outline. This is validated in the actor resolve

        if schedule == AUX:
            if clone != 'mine':
                msg = ("Error building {0}. Only insular clonename of"
                       " 'mine' allowed. Got '{1}'.".format(command, clone))
                raise excepting.ParseError(msg, tokens, index)

            if frame == 'me':
                msg = ("Error building {0}. Frame clause required.".format(command, clone))
                raise excepting.ParseError(msg, tokens, index)

        parms = dict(original=original,
                     clone=clone,
                     schedule=schedule,
                     frame=frame)

        actorName = 'Rearer'
        if actorName not in acting.Actor.Registry:
            msg = "Error building '{0}'. No actor named '{1}'.".format(command, actorName)
            raise excepting.ParseError(msg, tokens, index)

        act = acting.Act(actor=actorName,
                         registrar=acting.Actor,
                         parms=parms,
                         human=self.currentHuman,
                         count=self.currentCount)

        context = self.currentContext
        if context == NATIVE:
            context = ENTER  # what is native for this command

        if not self.currentFrame.addByContext(act, context):
            msg = "Error building %s. Bad context '%s'." % (command, context)
            raise excepting.ParseError(msg, tokens, index)

        console.profuse("     Added {0} '{1}' with parms '{2}'\n".format(
            ActionContextNames[context], act.actor, act.parms))

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