89f1f84857
Add Rust target
2026-08-11 22:46:04 -04:00
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
2e02ed7391
Fix test_macros.c on MacOS
2026-07-14 20:51:00 -04:00
1c74e747e1
Add p_set_input_index()
2026-07-14 20:43:59 -04:00
7ce1f8fc7f
Test reentering parser for nested inner parses
2026-07-14 11:41:52 -04:00
0aaa44faf4
Add a test for a macro implementation using custom lex function
2026-07-13 22:21:02 -04:00
2ebdeaa995
Add p_input_index()
2026-07-11 22:58:26 -04:00
c0016f6d58
Add p_set_position()
2026-07-11 22:46:21 -04:00
fb4288d5b9
Test p_parse_inner with tree generation mode active
2026-07-11 22:46:21 -04:00
2f9a29f7c5
p_parse_inner: do not consume the follow token
2026-07-11 22:46:21 -04:00
946eb4eef7
Add p_parse_inner_XXX() APIs
2026-07-11 20:08:56 -04:00
2c8ce0a359
Skip valgrind tests on MacOS github runners
2026-07-08 20:01:29 -04:00
98390429a8
Allow parser user code blocks in tree mode
2026-07-07 17:54:01 -04:00
ca9c23f96b
Add lexer user code expansions to access lexer match text positions
2026-07-02 21:27:55 -04:00
1729546d69
Track rule component positions - close #41
2026-07-02 16:42:50 -04:00
7b698d7b31
Add noline grammar statement to skip emitting #line directives
2026-06-29 22:41:07 -04:00
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
7a140623ff
Use #line for user code blocks to report input grammar position for errors
2026-05-21 16:24:25 -07:00
51b09a5799
Support custom lex function
2026-04-10 16:36:16 -04:00
e9ecf33f58
Run valgrind on D targets in addition to C and C++
2026-02-28 21:50:13 -05:00
dd687d0299
Add p_context_delete() and p_tree_delete() for D targets
2026-02-28 21:12:35 -05:00
d440d0442d
Expand token_user_fields unit test
2026-02-22 09:38:42 -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
f4bc719aed
Allow drop patterns to execute lexer user code blocks
2026-02-13 20:45:08 -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
addf27d837
Turn on valgrind for C, C++ target specs
2026-02-08 19:24:11 -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
54a0629e60
Add spec for \s matching newline
2025-07-26 21:36:05 -04:00
5486e5f138
Add \D, \S, \w, \W special character classes
2025-07-26 21:21:29 -04:00
5b243507cf
Show grammar line numbers for regex errors
2025-07-25 21:27:20 -04:00
035bb2fc60
Fix matching lexer patterns containing a negated character class which includes a backslash-escaped sequence that matches more than one character
2025-07-25 16:14:35 -04:00
92da10e483
Fix GC issue for D backend with AST enabled - close #36
2025-04-05 09:51:01 -04:00
eb9d9026fc
Allow multiple lexer modes to be specified for a lexer pattern - close #35
2025-03-11 20:40:10 -04:00
1b4ca59158
Field aliases for AST node fields could alias incorrect field when multiple rule alternatives present for one rule set - close #33
2024-12-28 23:08:53 -05:00
1d468b6d3c
Use 1-based row and column values for position values - close #30
2024-09-25 15:58:03 -04:00
98e10d3d14
Fix named optional rules - close #29
2024-09-24 20:28:19 -04:00
36c74e439e
Log conflicting rules on reduce/reduce conflict - close #31
2024-09-24 20:05:39 -04:00
a7348be95d
Add rule field aliases - #24
2024-07-22 20:16:52 -04:00
092fce61eb
Test position validity for empty matching rules - #27
2024-07-21 13:39:30 -04:00
e647248e34
Track start and end position of rules in AST nodes - #27
2024-07-19 15:37:37 -04:00
eae2e17f41
Test tracking token end positions when the token spans a newline - #27
2024-07-18 12:09:26 -04:00
87d6d29d60
Store token end position - #27
2024-07-18 12:03:44 -04:00