<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/grammar.h, branch v1.8.5</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.8.5</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.8.5'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-04-14T12:49:23+00:00</updated>
<entry>
<title>py: Simplify "and" action within parser by making ident-rules explicit.</title>
<updated>2016-04-14T12:49:23+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-04-14T12:23:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0c1de1cdeea98e55710d27f7926da717086ac0fc'/>
<id>urn:sha1:0c1de1cdeea98e55710d27f7926da717086ac0fc</id>
<content type='text'>
Most grammar rules can optimise to the identity if they only have a single
argument, saving a lot of RAM building the parse tree.  Previous to this
patch, whether a given grammar rule could be optimised was defined (mostly
implicitly) by a complicated set of logic rules.  With this patch the
definition is always specified explicitly by using "and_ident" in the rule
definition in the grammar.  This simplifies the logic of the parser,
making it a bit smaller and faster.  RAM usage in unaffected.
</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>py: Don't allocate an extra parse node for power exponent.</title>
<updated>2016-03-16T13:04:51+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-03-16T13:04:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3acaa28b52587bace3a4e8382fbf06ed6f6e4aaf'/>
<id>urn:sha1:3acaa28b52587bace3a4e8382fbf06ed6f6e4aaf</id>
<content type='text'>
Previous to this patch, the "**b" in "a**b" had its own parse node with
just one item (the "b").  Now, the "b" is just the last element of the
power parse-node.  This saves (a tiny bit of) RAM when compiling.
</content>
</entry>
<entry>
<title>py/compile: Do proper checking of * and ** in function definition.</title>
<updated>2015-11-23T16:50:42+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-23T16:50:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9a56912ad16065c8fc3670c8d493f922bc54e5b1'/>
<id>urn:sha1:9a56912ad16065c8fc3670c8d493f922bc54e5b1</id>
<content type='text'>
This patch checks that there is only one *, and that ** is last in the
arg list.
</content>
</entry>
<entry>
<title>py: Implement default and star args for lambdas.</title>
<updated>2015-11-17T14:00:14+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-17T14:00:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2c838942574a4970c922d1550f04e4b7b4d865a6'/>
<id>urn:sha1:2c838942574a4970c922d1550f04e4b7b4d865a6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Don't generate unnecessary parse nodes for assignment or kwargs.</title>
<updated>2015-10-08T13:26:01+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-10-08T13:26:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b948de36fb852aa1f9991cb3cc1ffc3b31813acd'/>
<id>urn:sha1:b948de36fb852aa1f9991cb3cc1ffc3b31813acd</id>
<content type='text'>
This patch eliminates the need for a nested parse node for assignments
and keyword arguments.  It saves a little bit of RAM when parsing.
</content>
</entry>
<entry>
<title>py/parse: Fix handling of empty input so it raises an exception.</title>
<updated>2015-07-24T15:05:56+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-07-24T15:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=96f0dd3cbc404b7f96bd7a35247faea8da266638'/>
<id>urn:sha1:96f0dd3cbc404b7f96bd7a35247faea8da266638</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Clean up some bits and pieces in parser, grammar.</title>
<updated>2015-04-21T16:43:18+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-21T16:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4735c45c511bf29ecb422456ca2ab0437e3c4ef0'/>
<id>urn:sha1:4735c45c511bf29ecb422456ca2ab0437e3c4ef0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Simplify grammar for stmt rule (this is also how CPython has it).</title>
<updated>2015-04-21T16:35:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-21T16:35:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=fa90ab1407c0de2ca1e51f7104f46cde7495d303'/>
<id>urn:sha1:fa90ab1407c0de2ca1e51f7104f46cde7495d303</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>
</feed>
