141 Commits

Author SHA1 Message Date
e2db9c95c5 wip 2026-04-09 22:49:21 -04:00
dd687d0299 Add p_context_delete() and p_tree_delete() for D targets 2026-02-28 21:12:35 -05:00
de3fb0d120 Combine free_token_user_fields and free_token_node statements 2026-02-21 21:37:23 -05:00
d4ad67c23d Allow user to specify custom token node fields 2026-02-21 21:06:40 -05:00
ff61dd05d9 Rename p_free_tree() to p_tree_delete() 2026-02-17 19:24:50 -05:00
6fd5186159 Replace p_context_init() with p_context_new()/p_context_delete() 2026-02-17 18:40:33 -05:00
9f2fe6f84b Add token_node and token_user_fields grammar statements 2026-02-14 21:00:53 -05:00
78adf86103 Allow user-defined context fields 2026-02-13 23:53:18 -05:00
77ec7c9de4 Rename AST generation mode to tree generation mode 2026-02-09 21:59:00 -05:00
6a87bb2d56 Add support for multiple starting rules - close #38 2026-02-09 21:21:49 -05:00
cb426b4be1 Add free_token_node grammar statement 2026-02-08 20:33:00 -05:00
9c03d20083 Add p_free_ast() to free AST node memory for C targets 2026-02-08 00:02:24 -05:00
072af73b1e Support C++ output language 2026-02-07 18:59:01 -05:00
9d686989ec Fix C issue not fully initializing pvalues
This issue manifested when multiple ptypes are present with different sizes.
2025-07-22 21:05:32 -04:00
87d892d0a3 Fix a couple clang warnings 2025-07-21 23:26:37 -04:00
92da10e483 Fix GC issue for D backend with AST enabled - close #36 2025-04-05 09:51:01 -04:00
839174a635 Generate comments to annotate reduce table entries 2025-04-05 09:50:18 -04:00
1d468b6d3c Use 1-based row and column values for position values - close #30 2024-09-25 15:58:03 -04:00
c5b8fc28bd Move INVALID_POSITION from header to C source - #27 2024-07-21 13:39:34 -04:00
e647248e34 Track start and end position of rules in AST nodes - #27 2024-07-19 15:37:37 -04:00
f4ae1b8601 Add position fields to AST nodes (not populated yet) - #27 2024-07-19 14:34:50 -04:00
87d6d29d60 Store token end position - #27 2024-07-18 12:03:44 -04:00
4ae5ab79b3 Warn on shift/reduce conflicts 2024-07-13 21:35:53 -04:00
911e9505b7 Track token position in AST Token node 2024-05-27 22:10:05 -04:00
aaeb0c4db1 Remove leftover TODO from earlier restructuring 2024-05-27 20:44:42 -04:00
f3e4941ad8 Allow rule terms to be marked as optional 2024-05-09 11:56:13 -04:00
494afb7307 Allow specifying the start rule name 2024-05-05 12:39:00 -04:00
153f9d28f8 Allow user to specify AST node prefix or suffix
Add ast_prefix and ast_suffix grammar statements.
2024-05-04 21:49:13 -04:00
c7a18ef821 Add AST node field name with no suffix when unique - #22 2024-04-22 21:50:26 -04:00
cb06a56f81 Add AST generation - #22 2024-04-22 20:51:27 -04:00
1d1590dfda Add API to access unexpected token found - close #18 2024-03-29 15:58:56 -04:00
1c91dcd298 Add token_names API - close #17 2024-03-29 15:02:01 -04:00
fad7f4fb36 Allow user termination from lexer code blocks - close #15 2024-03-29 13:45:08 -04:00
24af3590d1 Allow user to terminate the parser - close #13 2024-01-03 22:32:10 -05:00
a032ac027c Compilation warning for unreachable statement - close #12 2023-10-21 16:04:15 -04:00
3c8794058f Add C backend - close #4 2023-08-24 09:40:01 -04:00
fff9700f91 Report the unexpected token for P_UNEXPECTED_TOKEN returns - close #11 2023-07-28 15:42:18 -04:00
c4bcb465da Remove std.stdio import and printing of unexpected tokens 2023-07-17 21:57:31 -04:00
5ce562cbc3 Allow configuring API prefix - close #9 2023-07-13 18:06:24 -04:00
7d7929a358 Compact some of the table output 2023-07-12 19:51:35 -04:00
424ddfe55a Output position info for various error return codes - close #10 2023-07-12 19:22:44 -04:00
ce22e3465b Use consistent styling
Prefix public symbols with "p_".
User lowercase for all type aliases.
Clean up some comments.
2023-07-12 16:45:59 -04:00
c7bca74d3e Use symbol_id instead of token_id for shift table entries 2023-07-12 15:51:07 -04:00
7a1b4064c1 Switch to new API - close #8
The new API is more C-like and will allow consistency across all future
supported language targets.
2023-07-12 15:46:13 -04:00
e0e5e87338 Move public types to the top 2023-07-12 13:52:24 -04:00
779ba052c1 Use P_SUCCESS instead of P_TOKEN 2023-07-11 15:43:15 -04:00
eee6513384 Remove outer namespacing class 2023-07-10 22:54:33 -04:00
78ce7fb77a Replace 'ref' arguments with plain pointers 2023-07-10 22:40:03 -04:00
ad768711ff Use size_t to hold runtime object IDs and INVALID_ID 2023-07-10 22:32:33 -04:00
a2338a8fca Add ShiftID 2023-07-10 22:28:48 -04:00