- Feb 16, 2023
-
-
Meredith L. Patterson authored
avoid gcc warning about strncpy Closes #100 See merge request !55
-
Meredith L. Patterson authored
invert the scons --tests option into --no-tests Closes #4 See merge request hammer/hammer!54
-
- Feb 15, 2023
-
-
Sven M. Hallberg authored
Fixes #100.
-
Sven M. Hallberg authored
This actually allows with_tests to be set to false. Fixes #4. Also adds a note about this flag to the README.
-
Meredith L. Patterson authored
add h_bytes combinator See merge request hammer/hammer!52
-
Meredith L. Patterson authored
actually add params.h and params.c See merge request hammer/hammer!53
-
- Feb 13, 2023
-
-
picomeg authored
-
Sven M. Hallberg authored
-
- Feb 12, 2023
-
-
Meredith L. Patterson authored
WIP: Better backend handling See merge request hammer/hammer!46
-
- Nov 15, 2022
-
-
picomeg authored
precisely what they need, and actually control the format of the resulting name or description
-
- Nov 11, 2022
-
-
picomeg authored
-
- Nov 03, 2022
-
-
Meredith L. Patterson authored
resolve conflict I created by merging incremental parsing before better-backend-handling. nothing interesting to see here # Conflicts: # src/backends/packrat.c
-
Meredith L. Patterson authored
Naive support for iterative parsing in packrat See merge request hammer/hammer!51
-
- Sep 28, 2022
-
-
Sven M. Hallberg authored
Includes a test that exercises both. Also fixes tracking of input position when suspending on the first chunk and adapts h_input_stream_pos and h_input_stream_length to multi-chunk operation.
-
- Sep 23, 2022
-
-
Sven M. Hallberg authored
The naive implementation concatenates all input and blindly re-runs the full parse on every chunk. Keeping state between chunks is for later. Note: The iterative API expects us to always consume an entire input chunk when we suspend, even if packrat later backtracks into it. We will produce the correct parse result and accurately consume from a final chunk, but all earlier chunks will be reported as fully consumed and as being part of the HParseResult in terms of its bit_length field.
-
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 18, 2022
-
-
picomeg authored
-
- Aug 11, 2022
-
-
picomeg authored
-
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
-
- Jan 27, 2022
-
-
Meg Gordon authored
Improvements to requesting backend by name pulled out of the dlopen spike branch See merge request PicoMeg/hammer!1
-