Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # loads the CHEF file and parses it into tokens
- # [<title>,<ingredient_string>,<instructions_string>]
- def readRecipe(filepath):
- pass
- # takes the instruction string from earlier and splits it into statements
- def preheat(instructions):
- pass
- # returns a dictionary of ingredients from a string
- # ['apple':96, etc.]
- def gather(ingredients):
- pass
- # Because we all know her handwriting is horrid.
- # takes a string and returns a list of command-tuples
- # command: ('ingredient', <mixing_bowl_number>)
- # looping: (' loop ', 'verb')
- # extern: (' run ', 'recipe')
- def callMom(instructions):
- pass
- # executes a list of commands
- def cook(commands):
- # returns a list of verbs loaded from a file (path)
- def loadVerbs(path):
- pass
- # returns a list of foods loaded from a file (path)
- def loadFoods(path):
- pass
- ###################################################
- # iterate through the commands with complete control over position
- # (python's for-each loop does not give you any control)
- cmd_index = 0
- while cmd_index < len(command):
- cmd_index += 1
- pass
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement