summaryrefslogtreecommitdiffstatshomepage
path: root/py/lexer.h
Commit message (Collapse)AuthorAge
* py: Parse big-int/float/imag constants directly in parser.Damien George2015-02-08
| | | | | | | | | Previous to this patch, a big-int, float or imag constant was interned (made into a qstr) and then parsed at runtime to create an object each time it was needed. This is wasteful in RAM and not efficient. Now, these constants are parsed straight away in the parser and turned into objects. This allows constants with large numbers of digits (so addresses issue #1103) and takes us a step closer to #722.
* py: Put all global state together in state structures.Damien George2015-01-07
| | | | | | This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
* py: Move to guarded includes, everywhere in py/ core.Damien George2015-01-01
| | | | Addresses issue #1022.
* py: Move to guarded includes for compile.h and related headers.Paul Sokolovsky2014-12-27
|
* py: Optimise lexer by exposing lexer type.Damien George2014-12-05
| | | | | | | | | mp_lexer_t type is exposed, mp_token_t type is removed, and simple lexer functions (like checking current token kind) are now inlined. This saves 784 bytes ROM on 32-bit unix, 348 bytes on stmhal, and 460 bytes on bare-arm. It also saves a tiny bit of RAM since mp_lexer_t is a bit smaller. Also will run a bit more efficiently.
* py: Change lexer stream API to return bytes not chars.Damien George2014-07-30
| | | | Lexer is now 8-bit clean inside strings.
* lexer: Convert type (u)int to mp_(u)int_t.Damien George2014-07-03
|
* py: Instead of having "debug on" var, have "optimization level" var.Paul Sokolovsky2014-06-03
| | | | | This allows to have multiple "optimization" levels (CPython has two (-OO removes docstrings), we can have more).
* Add license header to (almost) all files.Damien George2014-05-03
| | | | | | | Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
* Search paths properly on import and execute __init__.py if it exists.Damien George2014-02-05
|
* Implement mp_parse_node_free; print properly repr(string).Damien George2014-01-25
|
* Add source file name and line number to error messages.Damien George2014-01-18
| | | | | Byte code has a map from byte-code offset to source-code line number, used to give better error messages.
* Convert parse errors to exceptions.Damien George2014-01-15
| | | | | Parser no longer prints an error, but instead returns an exception ID and message.
* py: Improve memory management for parser; add lexer error for bad line cont.Damien George2014-01-12
|
* Move lexerstr to main py directory (everyone uses it).Damien George2014-01-08
|
* Add ellipsis object.Damien George2014-01-04
|
* Basic implementation of import.Damien George2014-01-03
| | | | | | import works for simple cases. Still work to do on finding the right script, and setting globals/locals correctly when running an imported function.
* Change object representation from 1 big union to individual structs.Damien2013-12-21
| | | | | | | | | | 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).
* Integrate new lexer stream with stm framework.Damien2013-10-20
|
* Abstract out back-end stream functionality from lexer.Damien2013-10-20
|
* Improve indent/dedent error checking and reporting.Damien2013-10-09
|
* Initial commit.Damien2013-10-04