Repository navigation
Parser Design
Corrina Del Greco edited this page Dec 1, 2020
·
5 revisions
- If we want a fully functional parser we'll need a parser/lexer system.
- For each graph:
- Needed attributes:
- Graph name
- Graph module prefix (graph prefix e.g. in MODULE_funcitionname() MODULE is the module prefix)
- List of nodes
- Needed attributes:
- Create object for each node:
- Needed attributes:
- Node name (label in the attribute list)
- Node ID (will take the form Node
NwhereNis a number)
- Needed attributes:
- Create object for each edge:
- Needed attributes:
- Source node ID
- Destination node ID
- Reference to the source node object that was created before
- Reference to the destination node object that was created before
- Needed attributes:
- Create node/edge objects fill out attributes where possible and fix missing attributes at the end of the function once the entire graph has been processed by the parser
- Because of the way Doxygen processes the graphs and/or source code, it is possible for there to be duplicate nodes and edges. These need to be cleaned up at the end of the function once the entire graph has been processed and all attributes in the newly created objects have been filled out