<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/lexer.h, branch v1.9.1</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.1</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.1'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-02-17T01:44:24+00:00</updated>
<entry>
<title>py/lexer: Convert mp_uint_t to size_t where appropriate.</title>
<updated>2017-02-17T01:44:24+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-17T01:44:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5124a940670dbb5c07f6681070b3d1580c71d697'/>
<id>urn:sha1:5124a940670dbb5c07f6681070b3d1580c71d697</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/lexer: Simplify handling of line-continuation error.</title>
<updated>2017-02-17T00:30:14+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-17T00:30:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=773278ec3030ea9ed809c5a248fde2278ce4b557'/>
<id>urn:sha1:773278ec3030ea9ed809c5a248fde2278ce4b557</id>
<content type='text'>
Previous to this patch there was an explicit check for errors with line
continuation (where backslash was not immediately followed by a newline).

But this check is not necessary: if there is an error then the remaining
logic of the tokeniser will reject the backslash and correctly produce a
syntax error.
</content>
</entry>
<entry>
<title>py/lexer: Use strcmp to make keyword searching more efficient.</title>
<updated>2017-02-17T00:10:35+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-17T00:10:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ae436797927c3c9f7ccdc25dd78af3dd279ca7ff'/>
<id>urn:sha1:ae436797927c3c9f7ccdc25dd78af3dd279ca7ff</id>
<content type='text'>
Since the table of keywords is sorted, we can use strcmp to do the search
and stop part way through the search if the comparison is less-than.

Because all tokens that are names are subject to this search, this
optimisation will improve the overall speed of the lexer when processing
a script.

The change also decreases code size by a little bit because we now use
strcmp instead of the custom str_strn_equal function.
</content>
</entry>
<entry>
<title>py/lexer: Permanently disable the mp_lexer_show_token function.</title>
<updated>2016-12-21T23:49:54+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-12-21T23:49:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c305ae32436e37327d33df979d57d9ac1fb822c1'/>
<id>urn:sha1:c305ae32436e37327d33df979d57d9ac1fb822c1</id>
<content type='text'>
The lexer is very mature and this debug function is no longer used.  If
it's really needed one can uncomment it and recompile.
</content>
</entry>
<entry>
<title>py/lexer: Make lexer use an mp_reader as its source.</title>
<updated>2016-11-16T07:35:01+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-11-16T07:27:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5bdf1650de782d766a648f992270306269cc985a'/>
<id>urn:sha1:5bdf1650de782d766a648f992270306269cc985a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: add async/await/async for/async with syntax</title>
<updated>2016-04-13T14:26:38+00:00</updated>
<author>
<name>pohmelie</name>
<email>multisosnooley@gmail.com</email>
</author>
<published>2016-01-27T20:23:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=81ebba7e0236163b7594938201bf3a6b802ebfaa'/>
<id>urn:sha1:81ebba7e0236163b7594938201bf3a6b802ebfaa</id>
<content type='text'>
They are sugar for marking function as generator, "yield from"
and pep492 python "semantically equivalents" respectively.

@dpgeorge was the original author of this patch, but @pohmelie made
changes to implement `async for` and `async with`.
</content>
</entry>
<entry>
<title>unix: Allow to cat a script into stdin from the command line.</title>
<updated>2015-06-04T22:42:45+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-06-04T22:42:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=031278f661e5d285c56359e355a96161bf6e1a9f'/>
<id>urn:sha1:031278f661e5d285c56359e355a96161bf6e1a9f</id>
<content type='text'>
See issue #1306.
</content>
</entry>
<entry>
<title>py: Allow to compile with extra warnings (sign-compare, unused-param).</title>
<updated>2015-03-19T00:25:33+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-19T00:21:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2e2e404ff77e95dbe4fee0f19c91913a5888fb6f'/>
<id>urn:sha1:2e2e404ff77e95dbe4fee0f19c91913a5888fb6f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Parse big-int/float/imag constants directly in parser.</title>
<updated>2015-02-08T01:57:40+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-02-08T01:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7d414a1b52d193bab2c94cf56932e1eba23ba542'/>
<id>urn:sha1:7d414a1b52d193bab2c94cf56932e1eba23ba542</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>py: Put all global state together in state structures.</title>
<updated>2015-01-07T20:33:00+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-01T23:30:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b4b10fd350852e321624d74983cca286091b55a1'/>
<id>urn:sha1:b4b10fd350852e321624d74983cca286091b55a1</id>
<content type='text'>
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.
</content>
</entry>
</feed>
