Commits on Source (96)
-
c5d9bae0
-
9241ffdc
-
a3cf5038
-
f40d2e72
-
51b64d0a
-
b2d9339c
-
1241880d
-
71ec1dd0
-
8de5fa59
-
809b99f5
-
e6815331
-
Andrea Shepard authored264b770d
-
Sven M. Hallberg authored2d75df22
-
Sven M. Hallberg authored
hammer/hammer#87
d722a211 -
Meredith L. Patterson authored
Resolve "empty follow set assertion triggered with LALR" Closes #92 See merge request hammer/hammer!35
14176a1c -
Meredith L. Patterson authored7cf23b76
-
Meredith L. Patterson authored
add regression test for issue 87 - same as issue 91 Closes #87 See merge request hammer/hammer!37
7aac6b39 -
Andrea Shepard authored
Using _POSIX_C_SOURCE in the middle of a header is incorrect and may work unreliably because of multiple-include guards
8b1f8af4 -
Andrea Shepard authored
Restore -D_POSIX_C_SOURCE=200809L in build flags on Linux; we'll figure out report of Mac OS breakage later
636e85c9 -
Meredith L. Patterson authored
Fix feature macros See merge request hammer/hammer!41
4003cd1c -
Andrea Shepard authoredff8612d0
-
Andrea Shepard authored
Fix uninitialized symbol warning in cfgrammar.c See merge request hammer/hammer!42
ccdc35c8 -
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)
46c49fb5 -
picomeg authored8f9aeacb
-
picomeg authored14a8b9f1
-
picomeg authored
better_backend_handling Conflicts resolved: src/SConscript src/test_suite.h
690cf132 -
picomeg authoreda0619aa3
-
picomeg authored
"glr(1)" and call compile for the appropriate backend. Needs clean up and refactor, and tests, but it compiles and my hard-drive is periodically making threatening noises...
d77a8305 -
Andrea Shepard authored
Ticket 60 bugfix See merge request hammer/hammer!43
d3b74b14 -
Andrea Shepard authoredc8eeb898
-
Andrea Shepard authored
Add ABNF-parser-derived bug60 test case, and improve some of the test macros See merge request hammer/hammer!45
38055fdb -
picomeg authored
hard drive sounded bad. TODO includes free and copy updated and a bunch of refactoring / redesign of the solution
78b3656d -
picomeg authored32ef42cf
-
picomeg authored5f44171c
-
picomeg authored
cleanup
8cb68814 -
picomeg authored437f4dd0
-
4a2f5887
-
picomeg authored
committing now because of harddrive making a bad sound again.
1c6430c5 -
picomeg authoredf35330bd
-
picomeg authored
but ready for review
57065032 -
picomeg authored
better_backend_handling
cb4cd064 -
picomeg authoredee5ebada
-
picomeg authoreddf05901d
-
picomeg authored
compared to with strnig functions. WIP, feedback requested
070d928c -
picomeg authoredab58ddc3
-
picomeg authored9948e880
-
picomeg authored
HParserBackendWithParams
5f31d0f4 -
picomeg authored
vtable pointer, clean up some of the redundant information in backend with params struct
56fdeedb -
picomeg authored85bbd315
-
picomeg authored
right now there is duplication as the enum backend value is still present- need to find out if it's OK to make a breaking change for anyone who is for reasons known only to themselves chekcing which backend enum value is one a parser they may have created and compiled...
5c30b9c7 -
picomeg authored
backends[backend]
366e672a -
picomeg authored39a21b2e
-
picomeg authoredf3846563
-
picomeg authored3a3408c8
-
picomeg authored
default of k=1 is used.
db2e4e41 -
picomeg authored
spike branch: parsing of more complex backend requested parameters string, with optional paramaters, etc. formatting of code fixed, unused string based parsing of request parameters removed, etc.
47621764 -
Meg Gordon authored
Improvements to requesting backend by name pulled out of the dlopen spike branch See merge request PicoMeg/hammer!1
4a8ce80f -
Andrea Shepard authored
WIP: arena allocator improvements See merge request hammer/hammer!30
75aa06ec -
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.
d79d63d7 -
Sven M. Hallberg authored064fb88e
-
Sven M. Hallberg authoredf8628cee
-
Sven M. Hallberg authored
Lets one, e.g., add -fPIC if compiling with GCC but linking with LLD.
e366283a -
picomeg authored5c09fb9b
-
picomeg authored941e4767
-
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
f93c7d61 -
Sven M. Hallberg authoredcaa21a7d
-
picomeg authored5f7cf970
-
picomeg authored0af15c1f
-
Andrea Shepard authored
add clang to tools if necessary See merge request hammer/hammer!50
981cd16a -
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.
92805cb1 -
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.
f600634a -
Sven M. Hallberg authored
Also includes a very important cosmetic whitespace change.
1c83beb7 -
Sven M. Hallberg authored3b22f3e7
-
Sven M. Hallberg authoredb28f5427
-
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.
46164756 -
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.
a30adad4 -
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.
f8e0dffb -
Sven M. Hallberg authored
There's no need.
0d7f1091 -
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.
866fd4d6 -
Sven M. Hallberg authored
NB: The 'z' size modifier is in C99.
8213eb45 -
Sven M. Hallberg authoredb3f509ee
-
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.
dec43afe -
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.
5b5f131c -
Meredith L. Patterson authored
Naive support for iterative parsing in packrat See merge request hammer/hammer!51
d4a6a22f -
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
15c04795 -
picomeg authored6522530d
-
picomeg authored
precisely what they need, and actually control the format of the resulting name or description
cd5e7619 -
Meredith L. Patterson authored
WIP: Better backend handling See merge request !46
0ad302a5 -
Sven M. Hallberg authored68990e6b
-
picomeg authored31250d45
-
Meredith L. Patterson authored
actually add params.h and params.c See merge request hammer/hammer!53
7fea61d9 -
Meredith L. Patterson authored
add h_bytes combinator See merge request !52
26d6e974 -
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.
e85076c4 -
Sven M. Hallberg authored
Fixes #100.
03b407e1 -
Meredith L. Patterson authored
invert the scons --tests option into --no-tests Closes #4 See merge request !54
eec92e54 -
Meredith L. Patterson authored
avoid gcc warning about strncpy Closes #100 See merge request !55
5b4ea546
Showing
- README.md 4 additions, 1 deletionREADME.md
- SConstruct 25 additions, 9 deletionsSConstruct
- src/SConscript 11 additions, 3 deletionssrc/SConscript
- src/allocator.c 37 additions, 1 deletionsrc/allocator.c
- src/allocator.h 2 additions, 0 deletionssrc/allocator.h
- src/backends/glr.c 47 additions, 4 deletionssrc/backends/glr.c
- src/backends/lalr.c 47 additions, 6 deletionssrc/backends/lalr.c
- src/backends/llk.c 48 additions, 4 deletionssrc/backends/llk.c
- src/backends/missing.c 25 additions, 0 deletionssrc/backends/missing.c
- src/backends/missing.h 7 additions, 0 deletionssrc/backends/missing.h
- src/backends/packrat.c 154 additions, 34 deletionssrc/backends/packrat.c
- src/backends/params.c 100 additions, 0 deletionssrc/backends/params.c
- src/backends/params.h 19 additions, 0 deletionssrc/backends/params.h
- src/backends/regex.c 8 additions, 2 deletionssrc/backends/regex.c
- src/cfgrammar.c 1 addition, 1 deletionsrc/cfgrammar.c
- src/hammer.c 564 additions, 18 deletionssrc/hammer.c
- src/hammer.h 167 additions, 1 deletionsrc/hammer.h
- src/internal.h 72 additions, 4 deletionssrc/internal.h
- src/parsers/and.c 6 additions, 6 deletionssrc/parsers/and.c
- src/parsers/bind.c 1 addition, 2 deletionssrc/parsers/bind.c
src/backends/missing.c
0 → 100644
src/backends/missing.h
0 → 100644
src/backends/params.c
0 → 100644
src/backends/params.h
0 → 100644
This diff is collapsed.