monasca-analytics/monasca_analytics/banana
Daisuke Fujita 5809e66874 Fix unit tests for py27 and pep8 jobs
Some unit tests fail after "fix pep8 job" patch[1] was merged.
Fix unit tests for passing the py27/pep8 jobs.

This patch will be part of the update for python3.

[1] https://review.openstack.org/#/c/601606/

Change-Id: I418c5596f96f3994fbfc1651917c4e930b52a425
2018-11-07 02:27:22 +00:00
..
bytecode Fix unit tests for py27 and pep8 jobs 2018-11-07 02:27:22 +00:00
cli Fix a typo in documentation 2016-10-04 10:54:08 +07:00
deadpathck Fix crash when there's no connection in the banana file. 2016-09-21 15:22:26 +01:00
eval This commit introduces the first version of Banana configuration language. 2016-08-22 14:29:26 +01:00
grammar Fix unit tests for py27 and pep8 jobs 2018-11-07 02:27:22 +00:00
typeck Add __ne__ built-in function 2016-11-24 10:00:01 +08:00
README.md This commit introduces the first version of Banana configuration language. 2016-08-22 14:29:26 +01:00
__init__.py Add the test back and include BytecodeAssembler in tree. 2016-07-05 11:11:34 +01:00
emitter.py Improve error message and span calculation. 2016-09-21 15:55:24 +01:00
pass_manager.py Add Banana specific APIs to typecheck and get list of components. 2016-11-04 11:26:17 +00:00

README.md

Banana configuration language

This module contains everything related to Banana. In each sub-module (sub-folder) you will find a README.md file that describes:

  • Purpose of the module.
  • The current status of the implementation.
  • How testing is done.

The compiler is split in passes. Each pass performs some transformations and / or generates more data. Only the last step has side-effects on the Monanas instance.

Each sub-module roughly maps to one pass run by the compiler.

Passes

The Banana compiler runs the following passes:

  • parse, parse the input and build an AST.
  • typeck, type check the input.
  • deadpathck, remove dead path in the connections.
  • eval, evaluate the AST generated.

Each pass makes some assumptions about the state of the data, and in particular that the previous passes have run successfully. While this is made obvious by the arguments required to run some passes, it is less so for others.

Generally, things to remember:

  • Changing the ordering of passes is more likely to break things.
  • New passes are free to modify the AST / TypeTable.
  • New passes should not break invariants.

For more information on passes, have a look in their specific README.md file.