This file contains hidden or 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
#!/usr/bin/python | |
import os, sys | |
import subprocess | |
import readline | |
from collections import defaultdict | |
TABSIZE = 2 | |
class TaskDefDict(defaultdict): | |
def __missing__(self, key): |
This file contains hidden or 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
object BalancedParens { | |
// some convenient shorthand | |
def sym(c: Char) = new Symbol[Char](c) | |
val alnum = new AlphaNumeric() | |
def many[T: Manifest](p: Parser[Char, T]) = new Many(p) | |
def option[T, U](l: Parser[Char, T], r: Parser[Char, U]) = new Option(l, r) | |
val nothing: Parser[Char, Unit] = new Wrapper(()) | |
// our parser; matches expressions of the form (*x)* where the # of parens |
NewerOlder