116 Commits

Author SHA1 Message Date
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
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
d39fa61af0 Remove D language reference from test names 2023-07-15 14:19:30 -04:00
6333762414 Add user guide math expression example 2023-07-14 20:32:50 -04:00
653b4e00f6 Add testutils module with assert_eq() 2023-07-14 15:48:44 -04:00
5ce562cbc3 Allow configuring API prefix - close #9 2023-07-13 18:06:24 -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
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
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
1c50d37a3e Add Position struct to track text positions 2023-07-10 11:18:57 -04:00
83a4037740 Return a lexer error on unexpected input - close #3 2023-07-08 10:36:58 -04:00
ecef933255 Consolidate return codes 2023-07-08 09:23:31 -04:00
0232b204c6 Return integer result code from Parser.parse() 2023-07-08 08:52:21 -04:00
8a377b4950 Just return integer result code from Lexer.lex_token() 2023-07-08 08:08:36 -04:00
d56cc2deeb Just return integer result code from Decoder.decode_code_point() 2023-07-05 16:54:52 -04:00
9895733a05 Switch unit tests from gdc to ldc2 2023-06-29 19:16:36 -04:00
f402315201 Name internally generated tokens with double-underscore 2023-03-13 14:13:13 -04:00
b92679e0c2 Replace LexedToken with Result struct 2023-03-11 21:16:55 -05:00
b00f53050b Clean up Decoder result handling 2023-03-06 20:32:01 -05:00
e2100f6ccd Move JSON parser source to standalone file 2023-01-16 14:59:43 -05:00
dbc5560aec Add JSON parser test case 2022-11-14 23:07:10 -05:00
62451f3a92 Allow multiple test files to be compiled 2022-11-14 21:00:49 -05:00
c6ea4f83c2 Store parser values according to the rule/pattern type 2022-11-13 22:20:30 -05:00
e4a160f918 Allow defining multiple parser types and assigning parser types to tokens and rules 2022-11-13 13:35:19 -05:00
8dc27686aa Rename result_type to ptype, parser result to pvalue 2022-11-12 13:29:10 -05:00
bca0a14371 Allow storing a result value for a token from a lexer code block 2022-10-16 21:40:25 -04:00