Skip to content
Snippets Groups Projects
Commit 576b2a2a authored by Esteban Prince, Liam (UG - Computer Science)'s avatar Esteban Prince, Liam (UG - Computer Science)
Browse files

Update parser.py

parent 73ea40dd
No related branches found
No related tags found
No related merge requests found
def preprocess():
# Return the next token from the input
def getToken():
int lastChar = ' '
for c in input:
lastChar = c if c != ' '
def lex(input):
tokens = []
while len(input.split()):
if input is not None:
continue
if input[0] in ingredients:
input = input[1:]
else:
raise Exception('Don\'t know what this is: {}'.format(input[0]))
def parse():
preprocess():
tokenise()
preprocess()
lex(input)
isValid()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment