Commit Graph

95 Commits

Author SHA1 Message Date
Ed_
30eec99628 Changes to include usage, starting to attempt singleheader automated verification 2023-08-23 13:17:22 -04:00
Ed_
c97762ac16 Added support for inline comments
Also now doing comment serialization on def_comment directly as parse_comment doesn't need it.

Essentially comment ast types serialize the same way s untyped and execution ASTs
2023-08-23 00:25:14 -04:00
Ed_
5e79e8ba65 Started to setup for codebase validation tests.
Fleshed out initial version of AST::is_equal( AST* )

Setup the test directory with initial files for each major validation test.
2023-08-22 16:01:50 -04:00
Ed_
05fa62eced Test building & generation fixed with altest scripts 2023-08-20 15:45:06 -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_
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_
5aff89262b Fixes (Doc typos, pragma once worng type, non-debug fatal compile fail) 2023-08-09 09:50:12 -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_
67d02c1f62 Fix for wrong tokens for GNU/MSVC attribute captures (parse_attributes)
Also a fix for a typo in the readme...
2023-08-08 15:35:06 -04:00
Ed_
c7647ab00f Updated docs 2023-08-08 11:56:42 -04:00
Ed_
c4d5637a64 Fixes to single header generation (bad parsing adt/csv injection in wrong place) 2023-08-07 14:52:26 -04:00
Ed_
c2319b9651 Fixes for test.singleheader_ast.cpp, also added a bench for it.
On a Ryzen R9 5950 it takes 11 ms to generate AST and 21 ms to serialize to file.
2023-08-06 17:46:17 -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_
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_
a8a9b681f0 test completes singleheader ast construction and serailizes with corruption 2023-08-02 14:01:56 -04:00
Ed_
b96b0821c1 Fixes towards parsing (getting to line 12575 now of the singleheader. 2023-08-02 12:39:35 -04:00
Ed_
4c8a0f0005 Iterations on serialization improvements. 2023-08-01 20:56:00 -04:00
Ed_
684569750d first serialization of singlehearder without asserts. (Still failing after around 4k lines. 2023-08-01 16:07:47 -04:00
Ed_
0f16d1131e Got past parsing, fixing serialization 2023-08-01 14:02:54 -04:00
Ed_
2b63fc27cd Progress toward preprocessor parsing, lexing works, parsing does not. 2023-07-30 18:55:57 -04:00
Ed_
03df940085 Improved parser scope errors.
Added the caret for indicating where the error is.
2023-07-29 17:14:02 -04:00
Ed_
b9064fba9d renamed parsed and upfront dirs to lowercase 2023-07-29 16:27:36 -04:00
Ed_
0a5885495f got old tests working (test.parsing.cpp and test.upfront.cpp) 2023-07-29 16:00:06 -04:00
Ed_
f09bb99fdf Fixes for test generation (sanity, soa). 2023-07-29 13:15:53 -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_
b5cad6e8a1 some cleanup of unused macros in test files, preparing bootstrap and single header code + scripts 2023-07-24 18:51:49 -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_
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_
d1c061769c GlobalAllocator fixes
- Made a gen script (does full build and test) build just builds gencpp now.
2023-07-19 00:49:54 -04:00
Ed_
4d2f6a6315 Refactor Test gen_time to GEN_TIME 2023-07-19 00:13:12 -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_
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_
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_
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_
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_
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_
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_
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_
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