Commit Graph

154 Commits

Author SHA1 Message Date
Ed_
41dc0e3fbb Bad ifdef for benchmark in gen_dep. 2023-07-16 18:06:43 -04:00
Ed_
98b776d66e Small correction to test comment. 2023-07-16 18:01:22 -04:00
Ed_
7634aeb34c Fixes to memory mangment, library is much faster now. 2023-07-16 18:00:07 -04:00
Ed_
b544f24015 Moved dependencies back to their own files (gen_dep.hpp/cpp)
Its easier to manage, I'm sticking with generating the single header so it wont matter, its easy to refactor back if desired.
2023-07-16 12:08:57 -04:00
Ed_
8879b757ed Readme update 2023-07-16 03:26:07 -04:00
Ed_
1f77e39694 Minor refactor, added optional recursive dups for ast, ...
- Added support for anonymous structs.
- Gave Token_Fmt::token_map its own static memory.
- Minor natvis fix for CodeBody
- Renamed ESpecifier::Static_Member to just Static (acts as a general use case) specifier option
- Setup the lex token array with a configurable arena allocator.

Two major things left before V0.3-4:
- Attribute and Module parisng support with base case test
- AST serializtaion strings get a dedicated slag allocator.
2023-07-16 03:19:59 -04:00
Ed_
79c3459f08 Updated readmes 2023-07-15 23:38:53 -04:00
Ed_
805e69bb40 Parsing constructors work, finally reached parity. 2023-07-15 23:07:30 -04:00
Ed_
1e79c9190e Upfront constructors work again (test case wise)
Doing parsing set next
2023-07-15 22:27:38 -04:00
Ed_
ade4c3345d removed vs build log 2023-07-15 20:58:55 -04:00
Ed_
0241979085 WIP, updates to vs solution, got natvis working again. serializations still bugged 2023-07-15 20:56:27 -04:00
Ed_
947b4e3615 Finished refactoring tests, compiles, but does not generate 2023-07-15 16:13:44 -04:00
Ed_
8f4a94545c Finished refactoring library, still working on cleaning up tests. 2023-07-15 15:20:55 -04:00
Ed_
9ce859ec64 WIP Ended up using new layout, made major changes to how asts are interacted with an iterated.
- Got rid of dynamic arrays for body entries, were using links only.
- Halfed the size of the ast from 256 to 128 bytes.
- Fields for different ast types are not accessed directly. Each type has a unique filtered AST for ease of use.
2023-07-15 00:03:14 -04:00
Ed_
7133dc0a95 WIP doing the massive refactor... also started setup an experimental new layout for the AST.. 2023-07-14 01:37:22 -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_
30381648b2 Updates to readme, small fixes to code and organizational refactors 2023-07-13 15:00:05 -04:00
Ed_
4e61fefc55 Updated readme, added def_body and AST::validate_body
Fixed meson first setup error with missing thirdparty dir (removed it since its no longer used)

Improved SOA test to use newly added funtions.
2023-07-12 15:59:47 -04:00
Ed_
128b0e17fe Readme updates, Updated tests to use args macro more. 2023-07-12 03:41:23 -04:00
Ed_
b17c094cd2 Removed thirdparty dir, updated docs, removed banned.define/undef files 2023-07-12 03:15:52 -04:00
Ed_
6ae23e4da0 Got rid of the bloat.hpp/cpp, code was moved into gen.hpp/cpp 2023-07-12 02:37:51 -04:00
Ed_
8eea2d1f05 First complete pass of removing zpl include (still alot todo) 2023-07-12 02:18:08 -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_
661630a88f Merge branch 'main' of https://github.com/Ed94/gencpp 2023-07-11 03:10:29 -04:00
Ed_
f9085d4b6f Parser constructor passes all current tests...
Pretty much have a working library now... Albiet with problably quite a few hidden bugs in parsing.

Next steps are to start converting library to use its own Arena, Pool, Array, HashTable types. And either work on zpl dependency gutting or making a more robust set of tests.
2023-07-11 03:10:20 -04:00
Ed_
6ceb1e413e
Create LICENSE 2023-07-11 01:18:58 -04:00
Ed_
ddb3244467 array.Parsed.hpp passed test! 2023-07-11 01:09:50 -04:00
Ed_
1fb3db379c Fixed regression with non-parsed code due to new global allocator setup 2023-07-10 22:56:59 -04:00
Ed_
1c5881c5a3 Update readmes 2023-07-10 22:22:32 -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_
9df177edf4 WIP: getting function parameter parse to work
Will continue prob next week or two
2023-07-09 13:07:30 -04:00
Ed_
6da615e6da Alot (see description)
- Made a better global allocator for the process.
- Some small fixes to gen.hpp, removed clear_code_memory as I'm designing this library to for now never free any memory.
- Fixes to memory usage for cached strings
- Added missing verification for attributes in some upfront constructors. Added attribute param for def_type procedure.
- Started to use internal and global keywords in gen.cpp for associated definitions
- Progress toward getting the parsing constructors to support operator definitions.
- There was an *attempt* to get parse_type to support parsing function types. Its not tested yet....
  - Its not an nice setup, there is no validation of parameters, problably will add that in the future.
2023-07-09 12:35:48 -04:00
Ed_
855ba5a965 Base case for friend parse working. 2023-07-08 23:56:37 -04:00
Ed_
472189a322 Base case for extern link parse working. 2023-07-08 23:29:18 -04:00
Ed_
41f0e49cb0 enum base case parsing api passed 2023-07-08 19:13:52 -04:00
Ed_
a8e03aa7ba Parsing base case for class works! 2023-07-08 18:49:49 -04:00
Ed_
498a51c899 parse_typedef works (sanity test case) 2023-07-08 17:14:05 -04:00
Ed_
b360cf3024 Setup testing and library for getting the parse api done. 2023-07-08 14:11:41 -04:00
Ed_
a0250d1109 Removed readonly ast option. Removed indentation from serialization. Updates to readme.
- Readonly overcompilcates things for the scope of this project. I'm avoding const correctness to avoid mental overhead.
- Indentation was removed as it still required a formatting pass after, and the only significant thing needed was the newlines.
- Removed some opinionated takes from readme, trying to keep it straight to the point.
- Used def_execution more in array and ring defs (was using untyped_str when could have been using execution...)
2023-07-08 12:21:26 -04:00
Ed_
4db9aadea7 HashTable non-parsed implemented.
Improved the text to string macros!
2023-07-01 00:23:40 -04:00
Ed_
ef790fdda5 Began to work on the non-parsed ring implementation 2023-06-30 15:11:49 -04:00
Ed_
fc8239ad8d Non parsed buffer implemented. 2023-06-30 13:56:31 -04:00
Ed_
5006449665 Added spec_auto to constants, finished Array.NonParsed.hpp
Adjusted the generated array to the desired design for now.

Moving on to making the next container
2023-06-30 11:54:27 -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_
bb9b5b04c6 Added ignore for generated files. 2023-06-29 22:54:50 -04:00
Ed_
14f3f84cd4 remvoing generated file (shouldn't be tracked) 2023-06-29 22:50:08 -04:00
Ed_
257e9ebf11 Removed incremental API, fixes for operator__validation, added formatting pass on generated files
Decided not to support the incremental API, its not necessary as the ergonomics are not that big a deal.

Got operators to pass the sanity base cases, which means now all upfront constructors pass the base cases!

Next up is getting it to pass the array container generation.
2023-06-29 22:48:47 -04:00