# HG changeset patch # User Paul Boddie # Date 1361227904 -3600 # Node ID 9dc9231b287099662d0116d2afa8c76a1941c438 # Parent 74ad0468297b2cea4d3f7525a3ef9bdbeff998dd Added headings. diff -r 74ad0468297b -r 9dc9231b2870 docs/syspython.txt --- a/docs/syspython.txt Tue Jan 15 00:32:39 2013 +0100 +++ b/docs/syspython.txt Mon Feb 18 23:51:44 2013 +0100 @@ -8,6 +8,9 @@ temporary storage administration and other code generation tasks are to be left to the systems programming language compiler. +Program Data and Data Structure Definition +------------------------------------------ + Given that micropython has already deduced object and parameter details, such information must be communicated in the systems programming language so that the compiler does not have to deduce it again. @@ -36,6 +39,9 @@ defined in a __main__ function collecting together all "loose" (module-level) statements. +Imports +------- + Imports act as invocations of module code and name assignments within a particular scope and are defined as follows: @@ -61,6 +67,9 @@ processed separately, but this would then rule out logic controlling the use of modules. +Name and Attribute Declarations +------------------------------- + Assignments and name usage involve locals and globals but usage is declared explicitly: @@ -92,6 +101,9 @@ a = b # locals g = f # globals +Names and Attributes +-------------------- + No operator usage: all operators are converted to invocations, including all attribute access except static references to modules using the following notation: @@ -116,6 +128,9 @@ __storeattr__(obj, attrname, value) __storeattrindex__(obj, attrname, value) +Operators and Invocations +------------------------- + Conventional operators use the operator functions. Special operators could also use the operator functions (where available) @@ -135,6 +150,9 @@ a < b < c becomes lt(a, b) and lt(b, c) or __and__(lt(a, b), lt(b, c)) +Advanced Control-Flow +--------------------- + Any statements requiring control-flow definition in terms of blocks must be handled in the language as the notions of labels and blocks are not introduced earlier apart from the special case of jumping to another @@ -154,3 +172,5 @@ def fn_unchecked(self, ...): ... + +Exceptions must also be handled in the language.