josh
e9c1be83cb
Make tree node handle names visible in context user fields
2026-08-21 15:57:51 -04:00
josh
5fc712c6ee
Rework tree generation mode and API
...
Store tree nodes in congruent, compact arena array.
Define handle types to refer to tree nodes rather than pointers to
structure instances.
Free tree with context.
2026-07-27 20:57:44 -04:00
josh
c3bccd2151
Fix tree struct type forward-declarations for C/C++
2026-07-14 22:11:39 -04:00
josh
1c74e747e1
Add p_set_input_index()
2026-07-14 20:43:59 -04:00
josh
2ebdeaa995
Add p_input_index()
2026-07-11 22:58:26 -04:00
josh
c0016f6d58
Add p_set_position()
2026-07-11 22:46:21 -04:00
josh
946eb4eef7
Add p_parse_inner_XXX() APIs
2026-07-11 20:08:56 -04:00
josh
c28aebddb4
Fix user guide and generated parser comments for position row and col to be 1-based
2026-07-01 23:02:47 -04:00
josh
5ac3ad1655
Add p_value_get() / p_value_get_XXX() accessors
...
Allow user code to access specific pvalue values, especially when
multiple ptypes are in use.
2026-06-22 22:12:29 -04:00
josh
51b09a5799
Support custom lex function
2026-04-10 16:36:16 -04:00
josh
ff61dd05d9
Rename p_free_tree() to p_tree_delete()
2026-02-17 19:24:50 -05:00
josh
6fd5186159
Replace p_context_init() with p_context_new()/p_context_delete()
2026-02-17 18:40:33 -05:00
josh
9f2fe6f84b
Add token_node and token_user_fields grammar statements
2026-02-14 21:00:53 -05:00
josh
78adf86103
Allow user-defined context fields
2026-02-13 23:53:18 -05:00
josh
77ec7c9de4
Rename AST generation mode to tree generation mode
2026-02-09 21:59:00 -05:00
josh
6a87bb2d56
Add support for multiple starting rules - close #38
2026-02-09 21:21:49 -05:00
josh
9c03d20083
Add p_free_ast() to free AST node memory for C targets
2026-02-08 00:02:24 -05:00
josh
1d468b6d3c
Use 1-based row and column values for position values - close #30
2024-09-25 15:58:03 -04:00
josh
c5b8fc28bd
Move INVALID_POSITION from header to C source - #27
2024-07-21 13:39:34 -04:00
josh
e647248e34
Track start and end position of rules in AST nodes - #27
2024-07-19 15:37:37 -04:00
josh
f4ae1b8601
Add position fields to AST nodes (not populated yet) - #27
2024-07-19 14:34:50 -04:00
josh
87d6d29d60
Store token end position - #27
2024-07-18 12:03:44 -04:00
josh
911e9505b7
Track token position in AST Token node
2024-05-27 22:10:05 -04:00
josh
f3e4941ad8
Allow rule terms to be marked as optional
2024-05-09 11:56:13 -04:00
josh
494afb7307
Allow specifying the start rule name
2024-05-05 12:39:00 -04:00
josh
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
josh
c7a18ef821
Add AST node field name with no suffix when unique - #22
2024-04-22 21:50:26 -04:00
josh
cb06a56f81
Add AST generation - #22
2024-04-22 20:51:27 -04:00
josh
1d1590dfda
Add API to access unexpected token found - close #18
2024-03-29 15:58:56 -04:00
josh
1c91dcd298
Add token_names API - close #17
2024-03-29 15:02:01 -04:00
josh
fad7f4fb36
Allow user termination from lexer code blocks - close #15
2024-03-29 13:45:08 -04:00
josh
24af3590d1
Allow user to terminate the parser - close #13
2024-01-03 22:32:10 -05:00
josh
3c8794058f
Add C backend - close #4
2023-08-24 09:40:01 -04:00