Skip to content

Instantly share code, notes, and snippets.

@kelvingakuo
Last active November 19, 2021 12:27
Show Gist options
  • Save kelvingakuo/28cf764ce034efbc71d7bafdc70de1fa to your computer and use it in GitHub Desktop.
Save kelvingakuo/28cf764ce034efbc71d7bafdc70de1fa to your computer and use it in GitHub Desktop.
def columns():
if(accept("all_cols", False)):
return True
else:
if(accept("name")):
if(accept("punctuation", False)):
columns() # Recursively call self till next token is no longer a punctuation or name
else:
return True
else:
return False
return True
def condition_list():
if(condition()):
if(comparator()):
condition_list() # Recursively call self till next token is not a comparator
return True
def condition():
if(name()):
if(operator()):
if(term()):
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment