Skip to content

software/micropython.md #251

Description

@whaleygeek

There is a technical error on this web page in the description of how MicroPython works.


The parse tree is compiled into a terse set of instructions called Python bytecode. Bytecode instructions are like CPU assembly language instructions, but they are targeted for a virtual machine, not for a real piece of computer hardware.

It is incorrect to say that a parse tree is the in-memory tokens. This is an Abstract Syntax Tree (AST). The parse tree is often implicit and represents all tokens including parenthesis and natural groupings like 'expression' and 'relational_expression'. The Abstract Syntax Tree is a real thing however, and is represented as a pruned version of the parse tree. The parse tree is the concrete syntax, and thus includes brackets and other syntactic markers and production groups, unlike the Abstract Syntax Tree, which does not.

https://en.wikipedia.org/wiki/Abstract_syntax_tree

So, just change 'parse tree' to 'abstract syntax tree' and it will correct this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions