Commit Graph

25 Commits

Author SHA1 Message Date
Ed_
62b0ed2112 Finished initial implmentation bootstrap generation and singleheader implementation. 2023-07-25 15:12:51 -04:00
Ed_
9c81504178 Progress towards bootstrap/singleheader generation
I will most likely need to refactor some of the components & dependencies files to get the desired gneration implementation the way I want.

Specficially I want to be able to eliminate macros I'm using for enums and common patterns for implmeentation of the data structures.

When it comes to the cpp files, I may leave those alone as the macros largely help ith readability.
Replacing those macros is expensive and most likely not worth it.

The macros under consideration with replacing using the library bootstrap are:

* Define_Types
* Define_Operators
* Define_Specifiers
* GEN_Define_Attribute_Tokens
* Define_CodeType
* Using_Code
* Define_TokType
* def_constant_spec ?
* Helper Macros for def_**_body functions ?
  * AST unallowed types case macros?
(The last three I'm unsure about as they work fine, and neeeding the debugger steps there is a rare scenario...)

The enums could be manually generated and have its fields derived from a CSV (which is what genc is currently doing).
This would allow the user to specify custom attribute macros as well with greater ease.

I may maually inline ProcessModuleFlags, as its not even necessary as any specific symbol with a module flag will only use the export value. Import is only used on modules themselves (from what I can tell).

The Parser::lex function could be offloaded to its own file in case the user wants to swap the entire thing out.
(Most likely may want to for various purposes)

The problem with extracting any definitions out of a component file currently is that will lead to splintering that componnet to multiple other components.
This is necessary as the proper scanner is not implemented yet (only a reduimentary scan_file proc is made so far).
2023-07-24 22:19:21 -04:00
Ed_
74ea502de5 "compentiazation" of gen.hpp and gen.cpp 2023-07-24 17:45:27 -04:00
Ed_
cee55ad080 Suppeort for trailing specifiers for member functions, operators, and operator type casts (Untested) 2023-07-24 00:27:13 -04:00
Ed_
231ae5f5d6 Some refactors (see description)
- Renamed macro gen_time to GEN_TIME
- Moved scanner and editor to their own headers, I'm going to consider them extensions.
- I'm preparing to setup the library to build on multiple compiler platforms: clang, gcc, msvc.
2023-07-18 23:33:00 -04:00
Ed_
9a784fe92f Preparing to implement ADT for csv functions.
I'm rewritting it the way I'd like to learn it.
- I want to use csv parsing heavily with the library so I'm just going to add it to the scanner.

- Globaly memory allocator moved to regular gen header/source as its something really just made for the library.
- Some small refactors to macros
- The parser was updated to support tokenizing preprocessor directives.
  - The purpose is based off intuition that it will be required for the scanner.
2023-07-17 20:17:19 -04:00
Ed_
8f4a94545c Finished refactoring library, still working on cleaning up tests. 2023-07-15 15:20:55 -04:00
Ed_
7a2e20bcdb WIP Change to code types [ Broken ] 2023-07-13 23:01:20 -04:00
Ed_
a86d6fa0ee Some general refactors to dependency side of the library
Also upated the gencpp.refactor script with almost all relevant symbols.
gen.undef.macros.hpp also filled out

Ready to complete gencpp related todos left in implementation...
2023-07-13 19:28:52 -04:00
Ed_
7828e6d2ea More dependency movement from zpl, incremental design improvements.
Made token_fmt more ergonomic, going to have to use a similar behavior with the upfront body constructors.
2023-07-12 01:33:11 -04:00
Ed_
20d307759b Started to move over zpl depndencies and use templated containers.
Still have a ways to go.
2023-07-11 18:29:45 -04:00
Ed_
ddb3244467 array.Parsed.hpp passed test! 2023-07-11 01:09:50 -04:00
Ed_
14568d512e Parsing constructors passed the sanity test! 2023-07-10 22:14:51 -04:00
Ed_
ed6a1d0f95 Templates, test changes (prob not working), progress on parsing bodies and operators.
This time, really not touching for a couple of weeks.
2023-07-10 01:15:25 -04:00
Ed_
498a51c899 parse_typedef works (sanity test case) 2023-07-08 17:14:05 -04:00
Ed_
352da126ca Nativs support for gen::AST, fixes & update to library, getting gen_array working...
token_fmt returns StrC now. Did some fixes so it can properly function now!

Lots of changes to the Array non-parsed implementation.
It shows no errors in the edtitor static analysis, however I haven't tried it yet.
Unfortunately have some friction with how I would like to set it up like with everything in C++...
Can't inherit from ArrayBase to provide the common members to all Array defs, without introducing constructor complexity.

I may be open to using constructors in the future, depends on how I feel when trying out the context pattern used in jai and odin...
2023-06-30 03:13:41 -04:00
Ed_
0192cd49ef Started sanity test suite (Non-parsed api)
Made some fixes based on errors found while iterating on first generation
2023-06-28 14:43:21 -04:00
Ed_
d00de42969 Started to fix some runtime bugs. 2023-05-08 20:54:24 -04:00
Ed_
86cd0e1fb7 WIP: Fleshing out parsing constructor
This code commit will compile just backing up stuff before I switch the functions to use the lexer instead of manually sifting through the string.
2023-04-18 22:47:59 -04:00
Ed_
6ca30828c0 Upfront constructors almost completely fleshed out. 2023-04-10 21:33:06 -04:00
Ed_
03d37d614b Updated Project configuration with various editors 2023-04-10 17:55:09 -04:00
Ed_
47c15e7af2 WIP : Design for V1 finalization
There shouldn't be much more changes design wise.

Anything else is based on what needs to be done for it to work.
2023-04-06 02:21:23 -04:00
Ed_
a4cb0c12ef WIP: Design is almost done, impl this weekend. 2023-04-05 03:03:56 -04:00
Ed_
2e8d4a3d93 WIP: Still reworking based on design changes. 2023-04-04 15:53:29 -04:00
Ed_
f09fe6aa15 Iniital commit 2023-04-01 22:21:46 -04:00