Skip to content

Instantly share code, notes, and snippets.

View hwperkins's full-sized avatar

Howard Perkins hwperkins

  • Central New York
View GitHub Profile
@hwperkins
hwperkins / parsing.py
Created September 27, 2015 22:50
Rich Wareham's "Toy Language Parser"
from enochi.lexing import TokenType
from enochi import astnodes
class ParseError(Exception):
def __init__(self, message, *tokens):
self.message = message
self.tokens = tokens