forked from ben-marshall/verilog-parser
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Massive documentation update and re-structure.
- Finally grouped documentation into sensible module sections. - Added sub-modules for all AST generation functions. - Need to add a separate module for describing the AST grammar. On branch master Your branch is up-to-date with 'github/master'. Changes to be committed: modified: ../docs/Doxyfile new file: ../docs/ast-construction.dox new file: ../docs/ast-nodes.dox new file: ../docs/ast-structure.dox modified: ../docs/ast.dox modified: ../src/verilog_ast.h
- Loading branch information
1 parent
753f73c
commit 5bfeb98
Showing
6 changed files
with
394 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/*! | ||
@defgroup ast-construction AST Construction Functions | ||
@ingroup ast | ||
|
||
@brief This page describes all of the functions used to construct the AST | ||
representation of the input code, along with the corresponding data | ||
structures. | ||
|
||
@details | ||
All functions and data structures are grouped depending on which syntactic | ||
feature of the language you are trying to represent. | ||
|
||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/*! | ||
@defgroup ast-nodes AST Nodes | ||
@ingroup ast | ||
|
||
@brief This section contains a list of all grammar constructs and data | ||
structures that have yet to be written and integrated. | ||
|
||
- Attribute Instances [DONE] | ||
- Expression L-Values [DONE] | ||
- Expression R-Values [DONE] | ||
- Expression Primaries [DONE] | ||
- Constant Expressions [DONE] | ||
- Variable Expressions [DONE] | ||
- Proper Number Representation | ||
- Function Calls [DONE] | ||
- Concatenations [DONE] | ||
- Path Delays | ||
- Specify Blocks | ||
- Statements | ||
- Loops | ||
- Case | ||
- If Else | ||
- Timing Control | ||
- Fork Join | ||
- Procedural Blocks | ||
- Continous assignments | ||
- UDP | ||
- UDP Instance | ||
- UDP Port | ||
- UDP Body | ||
- Generate Loops | ||
- Module Instantiation | ||
- Primitives | ||
- Terminals | ||
- Strengths | ||
- Switch Types | ||
- Task Declaration | ||
- Function Declaration | ||
- Declaration Assignments | ||
- Delays | ||
- Drive Strenghts | ||
- Nets | ||
- Modules | ||
- Ports | ||
- Module Paramaters | ||
- Module Items | ||
- Configuration Source Text | ||
- Library Source Text | ||
- Compiler Directives | ||
- Top Level | ||
|
||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/*! | ||
|
||
@defgroup ast-structure AST Structure | ||
@ingroup ast | ||
|
||
@brief Describes the main structure of the tree, and how node parentage is | ||
represented. | ||
|
||
@todo Document all of this. | ||
|
||
The AST constructed by the parser has the following structure: | ||
|
||
TBD!! | ||
|
||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,9 @@ | ||
/*! | ||
@page doc-ast Abstract Syntax Tree | ||
|
||
@defgroup ast Abstract Syntax Tree | ||
|
||
This page describes the structure of the abstract syntax tree that the | ||
parser constructs. It includes the various root nodes, and how their | ||
child nodes are structured. | ||
|
||
@tableofcontents | ||
|
||
--- | ||
|
||
@section doc-top-node Tree Structure | ||
|
||
The AST constructed by the parser has the following structure: | ||
|
||
- The tree is constructed with identical nodes of type @ref ast_node_t | ||
- Each node has a single parent and zero or more children. These pointers | ||
form the basis of the tree. | ||
- Only the root node can have no parent, in which case, this member is set | ||
to NULL. | ||
- Each node has corresponding `data` and `type` members. The type member | ||
tells us what sort of data the node holds, while the data member is a | ||
union, which can store any of the required objects. Child nodes should | ||
never be stored in the data member. | ||
|
||
Each node also has lineno and file members. These tell us the line number | ||
and file path where the source code which gave us the node came from. | ||
|
||
Traversal of the tree can therefore be done using a single expected data type, | ||
rather than having lots of different types of node which we might otherwise | ||
need to typecast to traverse easily. | ||
|
||
@section ast-todo Nodes To Do | ||
|
||
@todo AST Nodes. | ||
This section contains a list of all grammar constructs and data structures | ||
that have yet to be written and integrated. | ||
|
||
- Attribute Instances [DONE] | ||
- Expression L-Values [DONE] | ||
- Expression R-Values [DONE] | ||
- Expression Primaries [DONE] | ||
- Constant Expressions [DONE] | ||
- Variable Expressions [DONE] | ||
- Proper Number Representation | ||
- Function Calls [DONE] | ||
- Concatenations | ||
- Path Delays | ||
- Specify Blocks | ||
- Statements | ||
- Loops | ||
- Case | ||
- If Else | ||
- Timing Control | ||
- Fork Join | ||
- Procedural Blocks | ||
- Continous assignments | ||
- UDP | ||
- UDP Instance | ||
- UDP Port | ||
- UDP Body | ||
- Generate Loops | ||
- Module Instantiation | ||
- Primitives | ||
- Terminals | ||
- Strengths | ||
- Switch Types | ||
- Task Declaration | ||
- Function Declaration | ||
- Declaration Assignments | ||
- Delays | ||
- Drive Strenghts | ||
- Nets | ||
- Modules | ||
- Ports | ||
- Module Paramaters | ||
- Module Items | ||
- Configuration Source Text | ||
- Library Source Text | ||
- Compiler Directives | ||
- Top Level | ||
|
||
*/ |
Oops, something went wrong.