![]() |
Dataflow Software Stack
032db78
Master Thesis of Mathijs Saey at the VUB
|
DIS parser. More...
Functions | |
| def | parseValue |
| Parse a value string. More... | |
| def | extractValue |
| Extract the value of a statement. More... | |
| def | getInstructionList |
| Get a list of instruction addresses from the array, starting at idx start. More... | |
| def | createSink |
| Create a sink. More... | |
| def | createConstant |
| Create a constant. More... | |
| def | createStop |
| Create a stop instruction. More... | |
| def | createStart |
| Create a start instruction. More... | |
| def | createContextChange |
| Create a context change instruction. More... | |
| def | createSplit |
| Create a context map function. More... | |
| def | createContextRestore |
| Create a context restore. More... | |
| def | createOperation |
| Create an operation. More... | |
| def | createSwitch |
| Create a switch instruction. More... | |
| def | parseInst |
| Parse an instruction declaration. More... | |
| def | parseChunk |
| Parse a chunk declaration. More... | |
| def | parseLit |
| Parse a literal declarations. More... | |
| def | parseLink |
| Parse a link statement. More... | |
| def | parseTriv |
| Parse a trivial statement. More... | |
| def | parseLine |
| Parse a single DIS line. More... | |
| def | parse |
| Parse a dis string. More... | |
Variables | |
| tuple | log = logging.getLogger(__name__) |
| chunk = None | |
| dictionary | instructions |
| Defines the operation codes and the functions to create them. More... | |
| dictionary | functions |
| Functions to parse the various statements. More... | |
DIS parser.
This module defines the function necessary to read DIS files.
| def read.parseValue | ( | str | ) |
Parse a value string.
| def read.extractValue | ( | stmt | ) |
Extract the value of a statement.
The value of a statement is found after the statement, and seperated from the statement by a <= and a space.
| def read.getInstructionList | ( | arr, | |
| start | |||
| ) |
Get a list of instruction addresses from the array, starting at idx start.
| def read.createSink | ( | arr, | |
| stmt | |||
| ) |
Create a sink.
| def read.createConstant | ( | arr, | |
| stmt | |||
| ) |
Create a constant.
| def read.createStop | ( | arr, | |
| stmt | |||
| ) |
Create a stop instruction.
| def read.createStart | ( | arr, | |
| stmt | |||
| ) |
Create a start instruction.
Creates a sink and adds the amount of incoming elements to the runtime.
| def read.createContextChange | ( | arr, | |
| stmt | |||
| ) |
Create a context change instruction.
| def read.createSplit | ( | arr, | |
| stmt | |||
| ) |
Create a context map function.
| def read.createContextRestore | ( | arr, | |
| stmt | |||
| ) |
Create a context restore.
| def read.createOperation | ( | arr, | |
| stmt | |||
| ) |
Create an operation.
| def read.createSwitch | ( | arr, | |
| stmt | |||
| ) |
Create a switch instruction.
| def read.parseInst | ( | arr, | |
| stmt | |||
| ) |
Parse an instruction declaration.
Verify that it ended up in the correct chunk.
| def read.parseChunk | ( | arr, | |
| stmt | |||
| ) |
Parse a chunk declaration.
A chunk declaration has the form: CHUNK <idx>
| def read.parseLit | ( | arr, | |
| stmt | |||
| ) |
Parse a literal declarations.
A literal declaration has the form: LITR <instruction> <port> <= <value>
| def read.parseLink | ( | arr, | |
| stmt | |||
| ) |
Parse a link statement.
A link statement has the form: LINK <from> -> <to> where from and to have the form: <chunk> <instruction> <port>
| def read.parseTriv | ( | arr, | |
| stmt | |||
| ) |
Parse a trivial statement.
A trivial statement has the form: TRIV <= <value>
| def read.parseLine | ( | line | ) |
Parse a single DIS line.
| def read.parse | ( | str | ) |
Parse a dis string.
| tuple read.log = logging.getLogger(__name__) |
| read.chunk = None |
| dictionary read.instructions |
Defines the operation codes and the functions to create them.
| dictionary read.functions |
Functions to parse the various statements.
1.8.8