# Path: pycell/lexer.py
# def lex(chars_iter):
#     chars = PeekableStream(chars_iter)
#     while chars.next is not None:
#         c = chars.move_next()
#         if c in " \n":              pass           # Ignore white space
#         elif c in "(){},;=:":       yield (c, "")  # Special characters
#         elif c in "+-*/":           yield ("operation", c)
#         elif c in ("'", '"'):       yield ("string", _scan_string(c, chars))
#         elif re.match("[.0-9]", c): yield ("number", _scan(c, chars, "[.0-9]"))
#         elif re.match("[_a-zA-Z]", c):
#             yield ("symbol", _scan(c, chars, "[_a-zA-Z0-9]"))
#         elif c == "\t":
#             raise Exception("Tab characters are not allowed in Cell.")
#         else:
#             raise Exception("Unrecognised character: '" + c + "'.")
# 
# Path: pycell/parser.py
# def parse(tokens_iterator):
#     parser = Parser(PeekableStream(tokens_iterator), ";")
#     while parser.tokens.next is not None:
#         p = parser.next_expression(None)
#         if p is not None:
#             yield p
#         parser.tokens.move_next()
# 
# Path: pycell/eval_.py
# def eval_list(exprs, env):
#     ret = ("none",)
#     for expr in eval_iter(exprs, env):
#         ret = expr
#     return ret


from pycell.lexer import lex
from pycell.parser import parse
from pycell.eval_ import eval_list
import pycell.prologue.native.char_at
import pycell.prologue.native.concat
import pycell.prologue.native.equals
import pycell.prologue.native.if_
import pycell.prologue.native.len_
import pycell.prologue.native.print_
import pycell.prologue.native.set_
import pycell.prologue.cell.a00_not
import pycell.prologue.cell.chars_in
import pycell.prologue.cell.pairs
import pycell.prologue.cell.lists





def import_(env):
    env.set("char_at", ("native", pycell.prologue.native.char_at.char_at))
    env.set("concat",  ("native", pycell.prologue.native.concat.concat))
    env.set("equals",  ("native", pycell.prologue.native.equals.equals))
    env.set("if",      ("native", pycell.prologue.native.if_.if_))
    env.set("len",     ("native", pycell.prologue.native.len_.len_))
    env.set("print",   ("native", pycell.prologue.native.print_.print_))
    env.set("set",     ("native", pycell.prologue.native.set_.set_))
    env.set("None",    ("none",))

    eval_list(parse(lex(as_text(env))), env)


def as_text(env):
    return (

# Path: pycell/lexer.py
# def lex(chars_iter):
#     chars = PeekableStream(chars_iter)
#     while chars.next is not None:
#         c = chars.move_next()
#         if c in " \n":              pass           # Ignore white space
#         elif c in "(){},;=:":       yield (c, "")  # Special characters
#         elif c in "+-*/":           yield ("operation", c)
#         elif c in ("'", '"'):       yield ("string", _scan_string(c, chars))
#         elif re.match("[.0-9]", c): yield ("number", _scan(c, chars, "[.0-9]"))
#         elif re.match("[_a-zA-Z]", c):
#             yield ("symbol", _scan(c, chars, "[_a-zA-Z0-9]"))
#         elif c == "\t":
#             raise Exception("Tab characters are not allowed in Cell.")
#         else:
#             raise Exception("Unrecognised character: '" + c + "'.")
# 
# Path: pycell/parser.py
# def parse(tokens_iterator):
#     parser = Parser(PeekableStream(tokens_iterator), ";")
#     while parser.tokens.next is not None:
#         p = parser.next_expression(None)
#         if p is not None:
#             yield p
#         parser.tokens.move_next()
# 
# Path: pycell/eval_.py
# def eval_list(exprs, env):
#     ret = ("none",)
#     for expr in eval_iter(exprs, env):
#         ret = expr
#     return ret


# Path: pycell/library.py
from pycell.lexer import lex
from pycell.parser import parse
from pycell.eval_ import eval_list
import pycell.prologue.native.char_at
import pycell.prologue.native.concat
import pycell.prologue.native.equals
import pycell.prologue.native.if_
import pycell.prologue.native.len_
import pycell.prologue.native.print_
import pycell.prologue.native.set_
import pycell.prologue.cell.a00_not
import pycell.prologue.cell.chars_in
import pycell.prologue.cell.pairs
import pycell.prologue.cell.lists






def import_(env):
    env.set("char_at", ("native", pycell.prologue.native.char_at.char_at))
    env.set("concat",  ("native", pycell.prologue.native.concat.concat))
    env.set("equals",  ("native", pycell.prologue.native.equals.equals))
    env.set("if",      ("native", pycell.prologue.native.if_.if_))
    env.set("len",     ("native", pycell.prologue.native.len_.len_))
    env.set("print",   ("native", pycell.prologue.native.print_.print_))
    env.set("set",     ("native", pycell.prologue.native.set_.set_))
    env.set("None",    ("none",))

    eval_list(parse(lex(as_text(env))), env)


def as_text(env):
    return (

        pycell.prologue.cell.a00_not.not_