Damien George
e09ffa1400
Search paths properly on import and execute __init__.py if it exists.
11 years ago
Damien George
b829b5caec
Implement mp_parse_node_free; print properly repr(string).
11 years ago
Damien George
08335004cf
Add source file name and line number to error messages.
Byte code has a map from byte-code offset to source-code line number,
used to give better error messages.
11 years ago
Damien George
9528cd66d7
Convert parse errors to exceptions.
Parser no longer prints an error, but instead returns an exception ID
and message.
11 years ago
Damien George
69a818d418
py: Improve memory management for parser; add lexer error for bad line cont.
11 years ago
Damien George
9193f89296
Move lexerstr to main py directory (everyone uses it).
11 years ago
ian-v
5fd8fd2c16
Revert MP_BOOL, etc. and use <stdbool.h> instead
11 years ago
ian-v
7a16fadbf8
Co-exist with C++ (issue #85 )
11 years ago
Damien George
e9906ac3d7
Add ellipsis object.
11 years ago
Damien George
66028ab6dc
Basic implementation of import.
import works for simple cases. Still work to do on finding the right
script, and setting globals/locals correctly when running an imported
function.
11 years ago
Damien
d99b05282d
Change object representation from 1 big union to individual structs.
A big change. Micro Python objects are allocated as individual structs
with the first element being a pointer to the type information (which
is itself an object). This scheme follows CPython. Much more flexible,
not necessarily slower, uses same heap memory, and can allocate objects
statically.
Also change name prefix, from py_ to mp_ (mp for Micro Python).
11 years ago
Damien
fa2162bc77
Integrate new lexer stream with stm framework.
11 years ago
Damien
a5185f4bc8
Abstract out back-end stream functionality from lexer.
11 years ago
Damien
91d387de7d
Improve indent/dedent error checking and reporting.
11 years ago
Damien
429d71943d
Initial commit.
11 years ago