Module Import alias ImportFrom alias alias ImportFrom alias alias Expr Str FunctionDef arguments args NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assert CompareEq SubscriptLoad NameLoad Index NameLoad Str Assign NameStore NameLoad Assign NameStore Num While CompareGt NameLoad Num body AugAssignAdd NameStore Num If CompareEq Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str SubscriptLoad NameLoad Slice NameLoad If CompareEq SubscriptLoad NameLoad Index NameLoad Str body AugAssignAdd NameStore Num If CompareEq SubscriptLoad NameLoad Index NameLoad Str body AugAssignSub NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad While NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If CompareEq SubscriptLoad NameLoad Index Num Str body Assign TupleStore NameStore NameStore Call NameLoad SubscriptLoad NameLoad Slice Num Return TupleLoad BinOpAdd SubscriptLoad NameLoad Index Num NameLoad NameLoad orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call NameLoad NameLoad Return TupleLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num orelse Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Slice NameLoad Return TupleLoad NameLoad SubscriptLoad NameLoad Slice NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad body Return IfExp NameLoad Str Str orelse If Call NameLoad NameLoad body If BoolOpAnd CompareGt Call NameLoad NameLoad Num CompareEq SubscriptLoad NameLoad Index Num Str body Return BinOpMod Str Call NameLoad SubscriptLoad NameLoad Index Num orelse Return BinOpMod Str Call AttributeLoad Str attr ListComp Call NameLoad NameLoad comprehension NameStore NameLoad orelse Return Call NameLoad NameLoad decorator_list
N/A N/A re ast is_boolean is_list types LispError String N/A 
This is the parser module, with the `parse` function which you'll implement as part 1 of
the workshop. Its job is to convert strings into data structures that the evaluator can 
understand. 
 parse N/A N/A source N/A N/A N/A Parse string representation of one *single* expression
    into the corresponding Abstract Syntax Tree. N/A N/A NotImplementedError DIY N/A remove_comments N/A N/A source N/A N/A N/A Remove from a string anything in between a ; and a linebreak N/A N/A N/A re sub ;.*\n source N/A find_matching_paren N/A N/A source start N/A 0 N/A N/A Given a string and the index of an opening parenthesis, determines 
    the index of the matching closing paren. N/A N/A N/A source N/A start ( N/A pos start N/A open_brackets 1 N/A N/A open_brackets 0 N/A N/A pos 1 N/A N/A N/A len source pos N/A N/A N/A LispError N/A Incomplete expression: %s N/A source N/A start N/A N/A N/A source N/A pos ( N/A N/A open_brackets 1 N/A N/A N/A source N/A pos ) N/A N/A open_brackets 1 N/A pos N/A split_exps N/A N/A source N/A N/A N/A Splits a source string into subexpressions 
    that can be parsed individually.

    Example: 

        > split_exps("foo bar (baz 123)")
        ["foo", "bar", "(baz 123)"]
     N/A rest N/A N/A source strip N/A exps N/A N/A rest N/A N/A N/A exp rest N/A first_expression rest N/A N/A N/A exps append exp N/A exps N/A first_expression N/A N/A source N/A N/A N/A Split string into (exp, rest) where exp is the 
    first expression in the string and rest is the 
    rest of the string after this expression. N/A source N/A N/A source strip N/A N/A N/A source N/A 0 ' N/A N/A N/A exp rest N/A first_expression N/A source N/A 1 N/A N/A N/A N/A source N/A 0 exp rest N/A N/A N/A N/A source N/A 0 ( N/A N/A last N/A find_matching_paren source N/A N/A N/A source N/A N/A last 1 N/A source N/A N/A last 1 N/A N/A match N/A N/A re match ^[^\s)(']+ source N/A end N/A N/A match end N/A atom N/A source N/A end N/A N/A atom N/A source N/A end N/A parse_multiple N/A N/A source N/A N/A N/A Creates a list of ASTs from program source constituting multiple expressions.

    Example:

        >>> parse_multiple("(foo bar) (baz 1 2 3)")
        [['foo', 'bar'], ['baz', 1, 2, 3]]

     N/A source N/A remove_comments source N/A N/A N/A parse exp N/A exp N/A split_exps source N/A unparse N/A N/A ast N/A N/A N/A Turns an AST back into lisp program source N/A N/A is_boolean ast N/A N/A N/A ast #t #f N/A N/A N/A is_list ast N/A N/A N/A N/A N/A len ast 0 N/A N/A ast N/A 0 quote N/A N/A N/A '%s N/A unparse N/A ast N/A 1 N/A N/A N/A (%s) N/A N/A join N/A N/A unparse x N/A x ast N/A N/A N/A str ast N/A