Bases: exceptions.Exception
Another exception object, for when we run out of tokens
Patterns is [(terminal,regex)...] Ignore is [terminal,...]; Input is a string
Should scan another token and add it to the list, self.tokens, and add the restriction to self.restrictions
Get the i'th token, and if i is one past the end, then scan for another token; restrict is a list of tokens that are allowed, or 0 for any token.
Bases: exceptions.Exception
When we run into an unexpected token, this is the exception to use
This is a really dumb long function to print error messages nicely.