Commit Graph

54 Commits

Author SHA1 Message Date
Ed_
62b0ed2112 Finished initial implmentation bootstrap generation and singleheader implementation. 2023-07-25 15:12:51 -04:00
Ed_
88d36f5d06 Update readme and scripts
Both bootstrap and singleheader now name the files the same as the library's default.
Output now directed toward gen directory for the corresponding dir (project, singleheader, or test)
2023-07-24 23:10:10 -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_
88a43cb11f namespace macro unused in gen.dep.cpp, updates to readme. 2023-07-24 14:30:35 -04:00
Ed_
39390535ce Support for interfaces in class/struct.
Interfaces are assumed to have the public access specifier for their content (if its a class definition)

Started to prepare to segement library code into more files (Less scrolling, need for bootstrapping a tailored version + single header support anyway).
2023-07-24 13:44:19 -04:00
Ed_
d4c2cdf30e Added varadic parameter support (upfront and parsing) 2023-07-24 11:20:13 -04:00
Ed_
1d3050f157 Update readme todo (remove trailing specifiers task) 2023-07-24 00:28:23 -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_
5df21998ef Should support parsing full definitions within typedef... (need to make tests) 2023-07-23 23:28:21 -04:00
Ed_
80b5c9768d Adding tuning macros for memory usage of the library, fixes.
Reduced the sanity test case to half its original iterations.
2023-07-23 23:11:53 -04:00
Ed_
e7374ec328 Support for module and attribute parsing ( untested ) 2023-07-23 22:14:48 -04:00
Ed_
a37c3f63c2 Update to readme, update CodePool_NumBlocks to 64k 2023-07-21 01:12:38 -04:00
Ed_
1488aeb188 update todo 2023-07-19 00:24:00 -04:00
Ed_
db584d8fe6 Removed GEN_FEATURE_PARSING macro, fixes to readme
Parsing constructors are too ergonomic to be a "optional" feature.
2023-07-19 00:14:15 -04:00
Ed_
e501941c5c Fix for sanity test... 2023-07-17 23:40:28 -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_
2a319ed6db Additions and fixes based off genc repo
Typedef parses enum namespaced types properly (C typedefs of enums to expose to global scope).
2023-07-16 23:18:00 -04:00
Ed_
7634aeb34c Fixes to memory mangment, library is much faster now. 2023-07-16 18:00:07 -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_
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_
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_
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_
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_
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_
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_
fc8239ad8d Non parsed buffer implemented. 2023-06-30 13:56:31 -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_
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_
38a60e4b91 Somehow overlooked unions... More stuff on parser constructors 2023-04-23 22:53:30 -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_
dfa01221d4 added execution code type, gutted functions with only char const* for name + more 2023-04-10 00:38:47 -04:00
Ed_
d5e6421b03 Updated readme. 2023-04-09 13:58:46 -04:00
Ed_
3647cdefd1 Readme : Updated usage. 2023-04-08 02:16:25 -04:00
Ed_
1ba187e3d5 Didn't push everything. 2023-04-08 01:43:37 -04:00
Ed_
5bdebee404 Updated readme again. 2023-04-08 01:43:09 -04:00
Ed_
81744a5709 Updated readme. 2023-04-08 00:56:59 -04:00
Ed_
a4cb0c12ef WIP: Design is almost done, impl this weekend. 2023-04-05 03:03:56 -04:00
Ed_
eb4f95b84e Update editrconfig and readme 2023-04-04 16:13:48 -04:00
Ed_
2e8d4a3d93 WIP: Still reworking based on design changes. 2023-04-04 15:53:29 -04:00