Commit Graph

159 Commits

Author SHA1 Message Date
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_
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_
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
Ed_
19e58fea30 Readmes: Partial fix for trailing spaces removed by editor... 2023-06-29 01:45:56 -04:00
Ed_
2da78e67d8 Update readmes. Some minor changes to the API. 2023-06-29 01:37:42 -04:00
Ed_
7f645c7357 Finished sanity suite except for operators.
Adjusted upfront api a bit, def_using no longer handles the namespace case, a sepearate function: def_using_namespace now does.

Mostly fixes to the seralization as I generate more cases to find the bugs.
2023-06-29 00:20:23 -04:00
Ed_
44ab1c2fc3 More fixes while completing sanity check for enums
Typepunning failed, didn't know about the difference between C/C++ with strict aliasing in this specific case...
2023-06-28 21:20:29 -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_
e74b498686 Removed the DSL macros, More fixes related to memory.
I commented out stuff related to type caching, I may not be using it. Depends on whether I want to keep the parent member in the ast.

DSL macros were removed, I want to keep the macros minimum for the api.
The varadic macros for the body may be problomatic if there is some bs vendor's are doing with memory layouts of structs that are not necessarily POD but only have the assignment operator overloaded.
Worst case I'll have to remove them.

Memory should be fine now to start doing iterations on the array test.

Parser constructors have been on hold for a while. They'll problably not be done until sometime in June.
2023-05-09 21:54:54 -04:00
Ed_
d00de42969 Started to fix some runtime bugs. 2023-05-08 20:54:24 -04:00
Ed_
59042a162c Setup workaround with type casting for POD with assignment overload restriction on varadic args. 2023-05-07 15:46:28 -04:00
Ed_
0de0e1632b Fixed compiler errors with the incremetnal constructors 2023-05-07 15:14:07 -04:00
Ed_
00b4220333 Got it to compile (without Incremental, parsing, editor, scanner) 2023-05-07 15:03:24 -04:00
Ed_
75588f5227 Finished porting zpl_string impl to gen's String def 2023-05-06 17:23:17 -04:00
Ed_
312bcafa23 Converting api to use custom string types. 2023-05-06 16:15:49 -04:00
Ed_
e34b3694da WIP: Converting api to use custom String types 2023-05-06 15:49:43 -04:00
Ed_
e8264c560f Updated AST::to_string to latest api changes with modules and attributes. 2023-05-06 00:18:44 -04:00
Ed_
0edc3c57b6 Finished updating implementation for new attribute/module usage for everything but the parsing constructors and AST::to_string 2023-05-05 18:10:03 -04:00
Ed_
9a6deb12cc More design/major changes
Found flaws with design while the parser

If I want to support modules I needed to add separaration from the usual specifiers. Same with attributes, decided to minimize my parsing complexity of attributes.

Added a banned header (will not have that be there for the release version
2023-05-01 14:12:07 -04:00
Ed_
38a60e4b91 Somehow overlooked unions... More stuff on parser constructors 2023-04-23 22:53:30 -04:00
Ed_
d541b33b22 Added extern linkage bodies to upfront constructors, more work on parsing constructors
- Made some more parsing helper functions
- Got initial prototype of parse_friend done
- getting ready to complete prototype of parse_function
2023-04-23 19:04:43 -04:00
Ed_
e50e9e094e Made the parse definitions for variable, typedef, using more complete.
Fixed issues seen with expression token parsing
Moved array expression parsing outside of type parsing. Its only done with variable, typdef, and using declarations.
Added parsing of attributes, I'm going to make them separate from the regular specifiers as they are complicated.
2023-04-23 14:33:37 -04:00
Ed_
09491be375 Finished to_string initial impl 2023-04-23 00:43:31 -04:00
Ed_
7ba474069c Docs update, parser impl design changes, AST::add fleshed out. 2023-04-22 22:24:55 -04:00
Ed_
4c4fe98e7e More fixes for zpl update... 2023-04-19 16:57:59 -04:00
Ed_
69e26bbdf8 Updated zpl to latest refactor convention 2023-04-19 15:40:23 -04:00
Ed_
4adb4654e9 Updated parsing constructors with impl to use the lexer. 2023-04-19 00:56:43 -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_
eec93cee78 Finished fleshing out incrementals, started to flesh out parsing 2023-04-12 01:24:43 -04:00
Ed_
d167f74243 Finished implementing the Upfront construcotrs, started to flesh out the incremental constructors. 2023-04-11 22:18:02 -04:00
Ed_
6ca30828c0 Upfront constructors almost completely fleshed out. 2023-04-10 21:33:06 -04:00
Ed_
dfa01221d4 added execution code type, gutted functions with only char const* for name + more 2023-04-10 00:38:47 -04:00
Ed_
56d7aa1d72 Changed zpl implemenation based on latest refactor script I use, refactored code to changes. 2023-04-09 13:59:39 -04:00
Ed_
642fb16d4f Removing c99 header gen code, going to use the scanner implementation when its done. 2023-04-09 13:59:07 -04:00
Ed_
81744a5709 Updated readme. 2023-04-08 00:56:59 -04:00
Ed_
5e03643d52 FInalized the design, I really hope this time. 2023-04-08 00:29:09 -04:00
Ed_
f5fe30e7cb Design: Added additional keywords to specifiers, added def_friend. Fleshed out scanner. 2023-04-07 12:31:50 -04:00
Ed_
fcf037d50f Design finished all thats left is implementation.
If any changes need to occur design wise at this point, its feature removal for mvp.
2023-04-06 19:19:11 -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_
d93fd462e1 Update gen.hpp and editor config 2023-04-04 16:18:30 -04:00
Ed_
2e8d4a3d93 WIP: Still reworking based on design changes. 2023-04-04 15:53:29 -04:00
Ed_
9957ef0e7d Major changes to library design, change test to reflect it. 2023-04-03 03:55:28 -04:00
Ed_
b4b518f005 WIP: Array generation test. Still need gen.cpp impl. 2023-04-02 17:39:21 -04:00
Ed_
340f466f24 Test now runs generated code, swtiched math test to use polyorphism from cpp.
Now need to make that array test...
2023-04-02 12:25:08 -04:00
Ed_
5e26d53a12 First test works. 2023-04-02 11:53:15 -04:00
Ed_
d66c1e4eb4 test.cpp gen_time compiles (has memory issues though) 2023-04-02 01:07:44 -04:00
Ed_
f09fe6aa15 Iniital commit 2023-04-01 22:21:46 -04:00