Commit Graph

82 Commits

Author SHA1 Message Date
Ed_
2e5e31ed3b gencpp : General refactors to dependencies
Mostly just cleanup and renaming of certain stuff (mostly in dependencies).

* Changed uw and sw to usize and ssize.
* Removed zpl_cast usage throughout dependencies
* No longer using GEN_DEF_INLINE & GEN_IMPL_INLINE
* header_start.hpp renamed to platform.hpp for depdendencies header.
2024-10-27 18:58:37 -04:00
Ed_
d89c9a6072 de-hardcode target_arch.psm1 import 2024-10-25 13:11:21 -04:00
Ed_
6aa99ac1d5 change how path_root is resolved so it works when cloned into another repository 2024-10-25 13:07:39 -04:00
Ed_
f90c0a59b6 inital implemention of UE library variant generator completed 2024-10-25 05:01:37 -04:00
Ed_
0542204b35 progress on unreal variant generator 2024-10-25 03:00:07 -04:00
Ed_
e1592ba410 Bug fixes and updates to package_release.ps1
- Incrased size of the defines_map_arena to 256KB
- Various fixes for the parser
- Various fixes for code serialization
- Fix for is_equal member func in Code types
- Fixes for hasthable container
- Added are_equal static func to String type for use against StrC
- Added starts_with functions to String type
- package_release.ps1 now packages all docs (forgot to update it with last release)
2024-05-05 21:53:22 -04:00
Ed_
4a2a93d41b Updated docs 2024-04-17 18:29:30 -04:00
Ed_
36260f6edb Updated gencpp with latest fixes used in other projects.
This variant can support parsing some Unreal Engine files!!
2024-04-17 17:40:32 -04:00
Ed_
3319bfcaa9 Updates to test and workspace
Added a more granular test using the original library files. Already helped me identify a bug.
2023-11-21 20:03:51 -05:00
Ed_
36ebbfe29b Got refactored raylib working in the vis_ast binary
Now to make that debugger...
2023-11-19 00:01:35 -05:00
Ed_
919166efa1 fix for build script 2023-10-25 23:55:29 -04:00
Ed_
d0f3b6187e Added initial support for comma-separated variable declaration lists. 2023-10-25 00:25:35 -04:00
Ed_
a900e86b65 Got raylib bootstrapped to compile
Still need to setup a refactor script among other things before using.
2023-10-24 06:00:28 -04:00
Ed_
d5a4b77033 Some initial boostrapping of new visual ast aux project 2023-10-24 03:14:20 -04:00
Ed_
eaba60f80b Updated build scripts to latest setup used with HandmadeHero repo 2023-10-24 01:40:21 -04:00
Ed_
3dd5482a46 set ContinuationIndentWidth to 4 for clang format. 2023-10-01 20:19:16 -04:00
Ed_
a8708abf8b WIP : Various changes to project before small hiatus. (Broken)
I need to manually review these as the changes have various errors that are difficult to diagnose why.

I took a break to do handmade hero and now a bit rusty.
2023-09-25 12:12:11 -04:00
Ed_
2200bcde9a Improved singleheader test
Need to make the debug_str provided by the AST type aware to provide as much contextual information as possible (finally got to this point with validation).

Singleheader test now directly calls clang-format to cleanup the reconstructed copy of the singleheader. Its needed to remove any sort of formatting discrepancies found by the parser since its sensistive to that for new-lines, etc.
2023-09-05 13:36:59 -04:00
Ed_
49a2cd7b2c Uncomment formatting comments in build script (forgot to after completing fixes) 2023-08-22 02:17:28 -04:00
Ed_
c4846dad26 Formatting fixes 2023-08-22 01:51:59 -04:00
Ed_
a42e241afb Got rid of the temp compoonent files, they are now generated via bootstrapping.
This isn't the last step though everything in the main project directory that isn't md files needs to be generated only.
Can't do that till testing is robust enough...
2023-08-21 23:28:39 -04:00
Ed_
9f64760b7a Commenting out includes to diagnose... 2023-08-21 21:20:29 -04:00
Ed_
050b00f28a WIP - Broken Compile : Added pragma once and includes to all files + Parser fixes, and String improvements
Adding the pragma once and includes the files broke compilation, still diagnosing why.

- Some string functions were moved to the cpp, still need to do some more evaluation of it and the containers...
- Added support for forceinline and neverinline to parsing (untested)
- Added support for specifiers in operator cast such as explicit, inline/forceinline/neverinline, etc.
    - Before it only support const.
    - Still need to support volatile.
- Forceinline was not supported at all for tokenization, fixed that.
2023-08-21 20:30:13 -04:00
Ed_
7d1c499e7b Build script improvements
Made sure devshell only loads up the msvc env once.
2023-08-20 22:39:46 -04:00
Ed_
52ae431ad6 Made clean script remove the gen dir now from test dir. 2023-08-20 15:51:51 -04:00
Ed_
05fa62eced Test building & generation fixed with altest scripts 2023-08-20 15:45:06 -04:00
Ed_
2f7836b191 Fixes to buildscript 2023-08-20 13:18:09 -04:00
Ed_
f574a9ba9a Further improvements to build script
test is failing to complete properly, need to debug...
2023-08-20 13:02:50 -04:00
Ed_
a6bf60a51e Simpilication of build script, added initial support for tests 2023-08-20 12:31:28 -04:00
Ed_
37d9782cf2 Singleheader now compiles with new build script on both clang & msvc 2023-08-20 10:17:55 -04:00
Ed_
11679ba8b4 New build script works for clang and msvc!
Need to update singleheader and test to use it.
2023-08-19 21:33:01 -04:00
Ed_
8985f0a4d9 MSVC in latest script works
Clang is having issues.
2023-08-19 17:08:13 -04:00
Ed_
32a910515e More refactoring, getting rid of meson in favor of just powershell scripts 2023-08-19 12:18:48 -04:00
Ed_
aa928ff446 Scripting updates, some refactors..
Made a package release script.

Did refactors based on some design considerations
Still need to make some major decisions...
2023-08-09 18:47:59 -04:00
Ed_
b5fa864318 Fixes and improvements to serialization.
There were multiple issues with comment and newline lexing.

Extended printing functions to support Strings with %S flag (captial 'S').
Allows for length detection. Also made it so that precision for strings is the string length.
2023-08-08 22:14:58 -04:00
Ed_
a4f9596d3b Fixes to serialization, reduced Define_CodeType macro
Now the execution code is generated in bootstrap/singleheader gen.
2023-08-06 17:19:57 -04:00
Ed_
97750388ad No longer using components/temp/ast_inlines (switched to helper function to avoid macro usage)
Increased the arg count support of num_args to 100.
2023-08-06 14:58:43 -04:00
Ed_
34f286d218 Library can now construct into AST and serialization itself (singleheader).
Still need to validate if they match.
2023-08-04 16:12:13 -04:00
Ed_
d36c3fa847 Single header generates again, some more cleanup.
Looking into properly dealing with empty lines...

I want to preserve the text's empty lines in the AST for serialization purposes (perserve formatting for gapes between definitions).
Don't want to introduce the possibility of it breaking though, so will have to ignore empty_lines in a general way (if they are in a bad spot).
Attempted to cover that by having TokArray::current() auto-skip empty lines and eat as well if the type doesn't match.
2023-08-03 23:18:33 -04:00
Ed_
5d7dfaf666 Heavy refactor..
Isolating large macros to their own directory (components/temp).
- Plan is to remove them soon with proper generation.

Added additional component files, separating the old data_structures header for a set of ast headers.
Header_end also had its inlines extracted out.
Necessary to complete the macro isolation.

ZPL parser dependencies were removed from the core library along with builder, its now generated in bootstrap as pare of making a gen_builder set of files.

Singleheader will be changed in next few commits to reflect this as well (By making builder deps and components a conditional option).

Tests are most likely all broken for now.
2023-08-03 11:01:43 -04:00
Ed_
b96b0821c1 Fixes towards parsing (getting to line 12575 now of the singleheader. 2023-08-02 12:39:35 -04:00
Ed_
2b63fc27cd Progress toward preprocessor parsing, lexing works, parsing does not. 2023-07-30 18:55:57 -04:00
Ed_
f09bb99fdf Fixes for test generation (sanity, soa). 2023-07-29 13:15:53 -04:00
Ed_
108b16739f bootstrap and singleheader compile and generate. 2023-07-29 12:25:38 -04:00
Ed_
c5afede7b5 Reorganization of files, refactors, doc updates (WIP)
Removing the gen. namespace from the files for components, dependencies, and file_processors.
They are only necessary if the include directory is transparent, and in my case those are not.

Made a docs directory. I'm offloading information from the main readme to there along with additional informationn I end up elaborating on down the line.
Enum tables were moved to their own directory (project/enums).

Library will not compile for now. Major refactor occuring with parsing related components.
2023-07-29 05:52:06 -04:00
Ed_
3f0b7e7fc6 Update to scripts, readme
Offloaded todo to the issues on github.
2023-07-28 03:15:50 -04:00
Ed_
d977c82f37 Fixes from latest refactor of toktype enum. 2023-07-27 17:12:58 -04:00
Ed_
b00c1ae522 ECode, ESpecifier, and ETokType are now all generated.
There is a redundant pattern for generating all three (as expected).

I'll use it to define a general way of doing this sort of behavior.
2023-07-27 02:51:36 -04:00
Ed_
cf65638979 Started to generate the enums from csv (ECode, EOperator, ESpecifier).
- Changed the zpl csv parser to only accept hex values with 0x perfix. it was messing with the add term.
- Small changes to the clang format config.
2023-07-26 14:21:20 -04:00
Ed_
62b0ed2112 Finished initial implmentation bootstrap generation and singleheader implementation. 2023-07-25 15:12:51 -04:00