---
Summary: Models used by Pyxie
Updated: November 2016
git-hash: 
---
Pyxie uses a number of models for different purposes

## iiNodes - Abstract Syntax Tree -- NEEDS IMPLEMENTING PROPERLY

Designed to be an abstract representation of the program - which is created from pynodes, and designed
to make it simpler to create Cnodes.

base nodes:

    class iiNode(object):

Structural

    class iiProgram(iiNode):

Operators

    def iiOperator(operator):
    class iiOpNode(iiNode):
    class iiOpPlus(iiOpNode):
    class iiOpMinus(iiOpNode):
    class iiOpMultiply(iiOpNode):
    class iiOpDivide(iiOpNode):
    class iiOpBooleanOr(iiOpNode):
    class iiOpBooleanAnd(iiOpNode):
    class iiOpBooleanNot(iiOpNode):

Statements

    class iiAssignment(iiNode):

    class iiForStatement(iiNode):
    class iiWhileStatement(iiNode):
    class iiBreakStatement(iiNode):
    class iiContinueStatement(iiNode):

    class iiIfStatement(iiNode):
    class iiElifClause(iiNode):
    class iiElseClause(iiNode):

    class iiFunctionCall(iiNode):
    class iiExpressionStatement(iiNode):
    class iiPassStatement(iiNode):

    class iiDefStatement(iiNode):

    class iiComparison(iiNode):
    class iiIterator(iiNode):
    class iiIdentifierDeclaration(iiNode):


Values:

    class iiAttributeAccess(iiNode):
    class iiIdentifier(iiNode):
    class iiString(iiNode):
    class iiInteger(iiNode):
    class iiFloat(iiNode):
    class iiBoolean(iiNode):


## cppnodes - Concrete Syntax Tree -- NEEDS MASSIVE IMPROVEMENT...

These are designed to represent a C program which can be generated directly from these.


## Pynodes - Concrete Syntax Tree

These are created by the parser front end, and directly represent python programs.
They're divided into the following *organisational* categories:

pynodes/base_nodes.py:
    class PyNode(object):
    class PyOperation(PyNode):
    class PyStatement(PyNode):

pynodes/structural.py:
    class PyBlock(PyNode):
    class PyExprList(PyNode):
    class PyProgram(PyNode):
    class PyStatements(PyNode):

pynodes/operators.py:
    class PyAndOperator(PyBoolOperator):
    class PyBoolOperator(PyOperation):
    class PyComparisonOperator(PyOperation):
    class PyDivideOperator(PyOperator):
    class PyMinusOperator(PyOperator):
    class PyNotOperator(PyBoolOperator):
    class PyOperator(PyOperation):
    class PyOrOperator(PyAndOperator):
    class PyPlusOperator(PyOperator):
    class PyPowerOperator(PyOperator):
    class PyTimesOperator(PyOperator):

pynodes/statements.py:
    class PyAssignment(PyStatement):

    class PyForLoop(PyStatement):
    class PyWhileStatement(PyStatement):
    class PyBreakStatement(PyStatement):
    class PyContinueStatement(PyStatement):

    class PyIfStatement(PyStatement):
    class PyElIfClause(PyStatement):
    class PyElseClause(PyStatement):

    class PyFunctionCall(PyStatement):
    class PyExpressionStatement(PyStatement):
    class PyPassStatement(PyStatement):

    class PyEmptyStatement(PyStatement):
    class PyDefStatement(PyStatement):

pynodes/values.py:
    class ProfilePyNode(PyIdentifier):
    class PyAttributeAccess(PyNode):
    class PyAttribute(PyNode):
    class PyBinary(PyNumber):
    class PyBoolean(PyValueLiteral):
    class PyCharacter(PyValueLiteral):
    class PyFloat(PyNumber):
    class PyHex(PyNumber):
    class PyIdentifier(PyValueLiteral):
    class PyInteger(PyNumber):
    class PyNumber(PyValueLiteral):
    class PyOctal(PyNumber):
    class PySignedLong(PyNumber):
    class PyString(PyValueLiteral):
    class PyUnSignedLong(PyNumber):
    class PyValueLiteral(PyNode):

