def parseNeedGoal(self, statePath, stateField, tokens, index):
        goalPath = None #default
        goalField = None #default
        direct = False

        goal = tokens[index]
        #parse required goal
        try:
            goal = Convert2StrBoolCoordNum(tokens[index]) #goal is quoted string, boolean, or number
            index += 1 #eat token
            direct = True

        except ValueError: #means text is not (quoted string, bool, or number) so indirect
            goalField, index = self.parseField(tokens, index)
            goalPath, index =  self.parseIndirect(tokens, index)

        return (direct, goal, goalPath, goalField, index)
Parse required goal
dataset/ETHPy150Open ioflo/ioflo/ioflo/base/building.py/Builder.parseNeedGoal