mirror of
https://github.com/Ed94/gencpp.git
synced 2024-12-22 07:44:45 -08:00
Proofing docs
This commit is contained in:
parent
71b7320e1c
commit
55427822a0
@ -13,11 +13,11 @@ Standard formats:
|
|||||||
* **base**: Files are in granular pieces separated into four directories:
|
* **base**: Files are in granular pieces separated into four directories:
|
||||||
* **dependencies**: Originally from the c-zpl library and modified thereafter.
|
* **dependencies**: Originally from the c-zpl library and modified thereafter.
|
||||||
* **components**: The essential definitions of the library.
|
* **components**: The essential definitions of the library.
|
||||||
* **helpers**: Contains helper functionality used by base and other libraries to regenerate or generate the other library formats.
|
* **helpers**: Contains helper functionality used by base and the variant library generators.
|
||||||
* `base_codegen.hpp`: Helps with self-hosted code generation of enums, and operator overload inlines of the code types.
|
* `base_codegen.hpp`: Helps with self-hosted code generation of enums, and operator overload inlines of the code types.
|
||||||
* `<push/pop>.<name>.inline.<hpp>`: macros that are meant to be injected at specific locations of the library.
|
* `<push/pop>.<name>.inline.<hpp>`: macros that are meant to be injected at specific locations of the library file/s.
|
||||||
* `misc.hpp`: Misc functionality used by the library generation metaprograms.
|
* `misc.hpp`: Misc functionality used by the library generation metaprograms.
|
||||||
* `undef.macros.h`: Undefines all macros from library that original were intended to leak into user code.
|
* `undef.macros.h`: Undefines all macros from library.
|
||||||
* **auxillary**: Non-essential tooling:
|
* **auxillary**: Non-essential tooling:
|
||||||
* `Builder`: Similar conceptually to Jai programming language's *builder*, just opens a file and prepares a string buffer to serialize code into (`builder_print`, `builder_print_fmt`). Then write & close the file when completed (`builder_write`).
|
* `Builder`: Similar conceptually to Jai programming language's *builder*, just opens a file and prepares a string buffer to serialize code into (`builder_print`, `builder_print_fmt`). Then write & close the file when completed (`builder_write`).
|
||||||
* **`Scanner`**: Interface to load up `Code` from files two basic funcctions are currently provided.
|
* **`Scanner`**: Interface to load up `Code` from files two basic funcctions are currently provided.
|
||||||
@ -127,6 +127,14 @@ There are ***five*** header files which are automatically generated using [base_
|
|||||||
|
|
||||||
[`misc.hpp`](./helpers/misc.hpp): Has shared functions used by the library generation meta-programs throughout this codebase.
|
[`misc.hpp`](./helpers/misc.hpp): Has shared functions used by the library generation meta-programs throughout this codebase.
|
||||||
|
|
||||||
|
If using the library's provided build scripts:
|
||||||
|
|
||||||
|
```ps1
|
||||||
|
.\build.ps1 <compiler> <debug or omit> base
|
||||||
|
```
|
||||||
|
|
||||||
|
Will refresh those files.
|
||||||
|
|
||||||
## On multi-threading
|
## On multi-threading
|
||||||
|
|
||||||
Currently unsupported. I want the library to be *stable* and *correct*, with the addition of exhausting all basic single-threaded optimizations before I consider multi-threading.
|
Currently unsupported. I want the library to be *stable* and *correct*, with the addition of exhausting all basic single-threaded optimizations before I consider multi-threading.
|
||||||
@ -146,7 +154,7 @@ Names or Content fields are interned strings and thus showed be cached using `ge
|
|||||||
|
|
||||||
`def_operator` is the most sophisticated upfront constructor as it has multiple permutations of definitions that could be created that are not trivial to determine if valid.
|
`def_operator` is the most sophisticated upfront constructor as it has multiple permutations of definitions that could be created that are not trivial to determine if valid.
|
||||||
|
|
||||||
The parser is documented under [`docs/Parsing.md`](../docs/Parsing.md) and [`docs/Parser_Algo.md`](../docs/Parser_Algo.md). Extending it is more serious.
|
The parser is documented under [`docs/Parsing.md`](../docs/Parsing.md) and [`docs/Parser_Algo.md`](../docs/Parser_Algo.md).
|
||||||
|
|
||||||
## A note on compilation and runtime generation speed
|
## A note on compilation and runtime generation speed
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ The full definitions of all asts are within:
|
|||||||
|
|
||||||
* [`ast.hpp`](../base/components/ast.hpp)
|
* [`ast.hpp`](../base/components/ast.hpp)
|
||||||
* [`ast_types.hpp`](../base/components/ast_types.hpp)
|
* [`ast_types.hpp`](../base/components/ast_types.hpp)
|
||||||
* [`code_types.hpp`](../base/components/ast_types.hpp)
|
* [`code_types.hpp`](../base/components/code_types.hpp)
|
||||||
|
|
||||||
The C/C++ interface procedures are located with `ast.hpp` (for the Code type), and `code_types.hpp` for all others.
|
The C/C++ interface procedures are located with `ast.hpp` (for the Code type), and `code_types.hpp` for all others.
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ gencpp uses a hand-written recursive descent parser. Both the lexer and parser c
|
|||||||
|
|
||||||
### Lexer
|
### Lexer
|
||||||
|
|
||||||
The lex procedure does the lexical pass of content provided as a `StrC` type.
|
The lex procedure does the lexical pass of content provided as a `StrC` type.
|
||||||
The tokens are stored (for now) in `gen::parser::Lexer_Tokens`.
|
The tokens are stored (for now) in `Lexer_Tokens`.
|
||||||
|
|
||||||
Fields:
|
Fields:
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Contains:
|
Contains:
|
||||||
|
|
||||||
* [AST_Design](./AST_Design.md): Overvie of ASTs
|
* [AST_Design](./AST_Design.md): Overview of ASTs
|
||||||
* [AST Types](./AST_Types.md): Listing of all AST types along with their Code type interface.
|
* [AST Types](./AST_Types.md): Listing of all AST types along with their Code type interface.
|
||||||
* [Parsing](./Parsing.md): Overview of the parsing interface.
|
* [Parsing](./Parsing.md): Overview of the parsing interface.
|
||||||
* [Parser Algo](./Parser_Algo.md): In-depth breakdown of the parser's implementation.
|
* [Parser Algo](./Parser_Algo.md): In-depth breakdown of the parser's implementation.
|
||||||
@ -49,9 +49,9 @@ However, the user may specifiy memory configuration.
|
|||||||
|
|
||||||
https://github.com/Ed94/gencpp/blob/eea4ebf5c40d5d87baa465abfb1be30845b2377e/base/components/ast.hpp#L396-L461
|
https://github.com/Ed94/gencpp/blob/eea4ebf5c40d5d87baa465abfb1be30845b2377e/base/components/ast.hpp#L396-L461
|
||||||
|
|
||||||
|
*`StringCahced` is a typedef for `StrC` (a string slice), to denote it is an interned string*
|
||||||
*`CodeType` is enum taggin the type of code. Has an underlying type of `u32`*
|
*`CodeType` is enum taggin the type of code. Has an underlying type of `u32`*
|
||||||
*`OperatorT` is a typedef for `EOperator::Type` which has an underlying type of `u32`*
|
*`OperatorT` is a typedef for `EOperator::Type` which has an underlying type of `u32`*
|
||||||
*`StringCahced` is a typedef for `String const`, to denote it is an interned string*
|
|
||||||
*`String` is the dynamically allocated string type for the library*
|
*`String` is the dynamically allocated string type for the library*
|
||||||
|
|
||||||
AST widths are setup to be AST_POD_Size.
|
AST widths are setup to be AST_POD_Size.
|
||||||
|
Loading…
Reference in New Issue
Block a user