summaryrefslogtreecommitdiff
path: root/py/lexerunix.c
AgeCommit message (Collapse)Author
2016-11-16py/lexer: Rewrite mp_lexer_new_from_fd in terms of mp_reader.Damien George
2016-11-16py/lexer: Provide generic mp_lexer_new_from_file based on mp_reader.Damien George
If a port defines MICROPY_READER_POSIX or MICROPY_READER_FATFS then lexer.c now provides an implementation of mp_lexer_new_from_file using the mp_reader_new_file function.
2015-06-04unix: Allow to cat a script into stdin from the command line.Damien George
See issue #1306.
2015-01-01py: Move to guarded includes, everywhere in py/ core.Damien George
Addresses issue #1022.
2014-12-05py: Optimise lexer by exposing lexer type.Damien George
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.
2014-10-09py: Add further checks for failed malloc in lexer init functions.Damien George
2014-07-30py: Change lexer stream API to return bytes not chars.Damien George
Lexer is now 8-bit clean inside strings.
2014-06-21py: Include mpconfig.h before all other includes.Paul Sokolovsky
It defines types used by all other headers. Fixes #691.
2014-05-21Tidy up some configuration options.Damien George
MP_ALLOC_* -> MICROPY_ALLOC_* MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX MICROPY_EXTRA_* -> MICROPY_PORT_* See issue #35.
2014-05-03Add license header to (almost) all files.Damien George
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/.
2014-04-28py: Fix lexerunix, where not all data may be read from a file.Damien George
Addresses issue #526.
2014-04-13py: Adjust #includes in lexerunix.c.Damien George
2014-04-12py: don't look for any additional headers when lexerunix is disabledIlya Dmitrichenko
2014-04-10Make lexerunix not allocate RAM for the entire script.Damien George
Now reads in small chunks at a time.
2014-03-17py: Clean up includes.xbe
Remove unnecessary includes. Add includes that improve portability.
2014-02-05Remove older import helpers, no longer used.Paul Sokolovsky
2014-02-05Implement support for sys.path when loading modules.Paul Sokolovsky
sys.path is not initialized by rt_init(), that's left for platform-specific startup code. (For example, bare metal port may have some hardcoded defaults, and let user change sys.path directly; while port for OS with environment feature can take path from environment). If it's not explicitly initialized, modules will be imported only from a current directory.
2014-01-25Implement mp_parse_node_free; print properly repr(string).Damien George
2014-01-21Revamp qstrs: they now include length and hash.Damien George
Can now have null bytes in strings. Can define ROM qstrs per port using qstrdefsport.h
2014-01-08Move lexerstr to main py directory (everyone uses it).Damien George
2014-01-07Factor and simplify Makefile's and mpconfig, part 2.Damien George
2014-01-03Basic implementation of import.Damien George
import works for simple cases. Still work to do on finding the right script, and setting globals/locals correctly when running an imported function.
2013-12-29Change memory allocation API to require size for free and realloc.Damien
2013-12-29Handle return value of read() call.Paul Sokolovsky
2013-12-29Add unix-cpy, used to test Micro Python byte code against CPython.Damien