- Sep 23, 2022
-
-
Sven M. Hallberg authored
-
Sven M. Hallberg authored
NB: The 'z' size modifier is in C99.
-
- Sep 22, 2022
-
-
Sven M. Hallberg authored
This commit changes the contract for the combinator parse functions: (1) The input state on failure must retain valid overrun and last_chunk fields. The latter is never changed, but overrun would be cleared by various combinators that backtrack in case of failure. All other fields of the input stream are still considered indeterminate after a failed parse. (2) If an overrun condition is encountered before the final chunk (last_chunk is false), the parse *must* fail. A helper want_suspend() is introduced as a shorthand for this check. Fixes the packrat/iterative/dummy test.
-
Sven M. Hallberg authored
There's no need.
-
Sven M. Hallberg authored
This is the case where parsing stops, which may be a parse error or not, depending on how many elements were read.
-
Sven M. Hallberg authored
Replace it with an assert. This case could never occur because it tests precisely the loop condition and there are no break statements in the loop. This was the only use of the 'err' label, so that can go. The code under it remains the fall-through case for 'err0', i.e. the actual error (parse failure) case.
-
Sven M. Hallberg authored
The test fails because currently parsers that fail may leave the input stream in any indeterminate state. Parsers that backtrack (h_many, h_choice, h_optional, etc.) do not propagate an overrun of their subordinate parsers to h_packrat_parse_chunk where we would detect it and fail.
-
Sven M. Hallberg authored
-
Sven M. Hallberg authored
-
Sven M. Hallberg authored
Also includes a very important cosmetic whitespace change.
-
Sven M. Hallberg authored
Drive-by elimination of an age-old TODO. :) Code should be functionally equivalent. Changes: - Remove broken code under CONSISTENCY_CHECK. - Transform to chip-away style. - Remove braces around single statements. - Declare variables at top of function. - Shorten some variable names (tmp_res and bit_length). - Limit line length to 80 columns.
-
Sven M. Hallberg authored
A very first step. This implementation still expects all input in a single chunk but allows the use of the iterative API. If the parser attempts to read past the first chunk, the parse fails. Contains some comments for next steps towards full support. Adds tests for the single-chunk case.
-
- Sep 21, 2022
-
-
Andrea Shepard authored
add clang to tools if necessary See merge request hammer/hammer!50
-
- Aug 11, 2022
-
-
Sven M. Hallberg authored
-
Meredith L. Patterson authored
Ticket 95: Fix backends with params that currently ignore requested params to use them. Closes #95 See merge request hammer/hammer!49
-
- Aug 09, 2022
- Aug 08, 2022
-
-
Sven M. Hallberg authored
Lets one, e.g., add -fPIC if compiling with GCC but linking with LLD.
-
Sven M. Hallberg authored
-
Sven M. Hallberg authored
-
Sven M. Hallberg authored
clang appears to require -fPIC for shared objects on most platforms. the 'clang' tool adds the flag when appropriate. however, scons never selects the clang tool automatically! so we add the tool ourselves if CC=clang is set or generally on Darwin. ideally, scons would know and handle all this, but at the time of writing (scons v4.3.0), it does not.
-
- Apr 15, 2022
-
-
Andrea Shepard authored
WIP: arena allocator improvements See merge request hammer/hammer!30
-
- Oct 06, 2021
-
-
picomeg authored
default of k=1 is used.
-
- Sep 09, 2021
-
-
picomeg authored
-
- Oct 27, 2020
- Sep 29, 2020
-
-
Andrea Shepard authored
Add ABNF-parser-derived bug60 test case, and improve some of the test macros See merge request hammer/hammer!45
-
Andrea Shepard authored
-
- Sep 28, 2020
-
-
Andrea Shepard authored
Ticket 60 bugfix See merge request hammer/hammer!43
-
- Aug 11, 2020
-
-
picomeg authored
-
- Jul 31, 2020
-
-
picomeg authored
-
- Jul 22, 2020
-
-
picomeg authored
that we also check to confirm both engines have consume the same number of tokens (and thus have actually both arrived at the same state for the same partial input stream)
-
- Apr 23, 2020
-
-
Andrea Shepard authored
Fix uninitialized symbol warning in cfgrammar.c See merge request hammer/hammer!42
-
Andrea Shepard authored
-
- Mar 12, 2020
-
-
Meredith L. Patterson authored
Fix feature macros See merge request hammer/hammer!41
-
- Mar 10, 2020
-
-
Andrea Shepard authored
Restore -D_POSIX_C_SOURCE=200809L in build flags on Linux; we'll figure out report of Mac OS breakage later
-
Andrea Shepard authored
Using _POSIX_C_SOURCE in the middle of a header is incorrect and may work unreliably because of multiple-include guards
-
- Mar 09, 2020
-
-
Meredith L. Patterson authored
add regression test for issue 87 - same as issue 91 Closes #87 See merge request hammer/hammer!37
-
Meredith L. Patterson authored
-
Meredith L. Patterson authored
Resolve "empty follow set assertion triggered with LALR" Closes #92 See merge request hammer/hammer!35
-
Meredith L. Patterson authored
-