Last active
November 19, 2021 12:27
-
-
Save kelvingakuo/28cf764ce034efbc71d7bafdc70de1fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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