145 Commits

Author SHA1 Message Date
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
3aced70356 Show line numbers of rules upon conflict - close #23 2024-07-14 20:52:52 -04:00
2dd89445fc Add command line switch to output warnings to stderr - close #26 2024-07-14 15:36:07 -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
0d1ee74ca6 Give a better error message when a referenced ptype has not been declared 2024-05-09 17:35:27 -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
2b28ef622d Add specs to fully cover cli.rb 2024-04-06 14:37:15 -04:00
3eaf0d3d49 allow one line user code blocks - close #21 2024-04-02 17:44:15 -04:00
918dc7b2bb fix generator hang when state transition cycle is present - close #20 2024-04-02 14:27:08 -04:00
5b2cbe53e6 Add backslash escape codes - close #19 2024-03-29 16:45:54 -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
f152cd9da1 Turn on simplecov to measure code coverage 2023-09-25 19:38:55 -04:00
db6dc0e099 Add dspec task to test distributable script 2023-09-24 18:54:19 -04:00
562c24ce9e Remove grammar "class" statement 2023-09-24 13:23:44 -04:00
3c8794058f Add C backend - close #4 2023-08-24 09:40:01 -04:00