Max Brunsfeld
10ab7032a6
Fix incorrect node reuse for edits right at EOF
2018-11-11 21:36:31 -08:00
Max Brunsfeld
24d1e7ec7e
Included embedded-template parser in randomized tests
2018-11-03 23:18:24 -07:00
Max Brunsfeld
2169c45da9
Store subtree's lookahead byte count relative to its end offset
...
This improves test coverage for incremental parsing by generalizing
the randomized tests in `real_grammars.cc` to make *multiple* edits
before incrementally re-parsing.
2018-11-02 15:23:38 -07:00
Max Brunsfeld
3dab0066bc
Add missing padding bytes check before storing tree inline
2018-09-19 10:52:21 -07:00
Max Brunsfeld
acc937b7d7
Handle input chunks that end within multi-byte characters
2018-08-02 15:43:30 -07:00
Max Brunsfeld
23e4596ec1
Add test for handling of precedence within tokens
2018-07-26 17:06:09 -07:00
Max Brunsfeld
b14951de9d
Included HTML parser in randomized test suite
2018-06-15 16:17:56 -07:00
Max Brunsfeld
6fca8f2f4d
Make ts_compile_grammar take an optional log file, start logging to it
2018-05-24 16:01:14 -07:00
Max Brunsfeld
a3e08e7c31
Add randomized multi-threaded tests on parse trees
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-11 16:10:36 -07:00
Max Brunsfeld
199a94cc26
Allow the parser to print dot graphs to any file
2018-05-11 12:48:51 -07:00
Max Brunsfeld
e75ecd1bb1
Rework API completely
2018-05-11 10:46:13 -07:00
Max Brunsfeld
92255bbfdd
Remove document parameter from ts_node_type, ts_node_string
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-09 15:28:28 -07:00
Max Brunsfeld
8300f24fec
Avoid slow test setup if seed flag is set to -1
2018-05-08 16:34:20 -07:00
Max Brunsfeld
3c737d8295
Respect -D flag in fuzzing examples
2018-04-06 16:09:17 -07:00
Max Brunsfeld
a6cf2e87e7
Fix halt_on_error tests
2018-04-06 13:26:18 -07:00
Max Brunsfeld
80f856cef5
Maintain a total node count on every tree
...
This simplifies (and fixes bugs in) the parse stack's tracking of its
total node count since the last error, which is needed for error
recovery.
2018-04-06 13:26:18 -07:00
Max Brunsfeld
299a146b66
Balance repetition trees after parsing
2018-02-12 11:41:56 -08:00
Max Brunsfeld
6304a3bcd1
Make it easier to run tests with debug graphs
2017-12-28 12:41:23 -08:00
Max Brunsfeld
90629bd45a
Add some assertions to the fixture grammar tests
2017-12-07 11:50:27 -08:00
Max Brunsfeld
d342b61ede
Re-enable JS fuzzing example test
2017-09-14 11:39:08 -07:00
Phil Turnbull
d9a0fbc210
Add testcase for parser__advance assertion failure
...
The python testcase decodes to:
```
00000000 35 63 6f 6e 88 2c 29 33 2c 2c 2c 2c 63 6f 6e 88 |5con.,)3,,,,con.|
00000010 2c 2a 2c 3a 35 63 6f 6e 2c |,*,:5con,|
```
which triggers:
```
Assertion failed: ((uint32_t)0 < (&reduction.slices)->size), function parser__advance, file src/runtime/parser.c, line 1202.
```
2017-09-13 13:25:31 -04:00
Max Brunsfeld
0919f5588b
Disable fuzzing example test for now
2017-08-08 17:35:16 -07:00
Max Brunsfeld
0ba6188bab
Construct paths portably in test_grammars.cc
2017-08-08 17:25:43 -07:00
Max Brunsfeld
cc7277fd7d
Avoid using IsNull bandit assertion
2017-08-08 12:52:35 -07:00
Max Brunsfeld
b43ae2826b
Use C++ stdlib for random number generation
2017-08-08 12:42:49 -07:00
Max Brunsfeld
94dc703bfc
Require that grammars' start rules be visible
2017-08-04 17:07:37 -07:00
Max Brunsfeld
9a04231ab1
Remove length restriction in external scanner serialization API
2017-07-17 17:12:36 -07:00
Max Brunsfeld
4b40a1ed6c
Support anonymous tokens inside of RENAME rules
2017-07-14 10:19:58 -07:00
Max Brunsfeld
d8e9d04fe7
Add PREC_DYNAMIC rule for resolving runtime ambiguities
2017-07-06 15:24:45 -07:00
Max Brunsfeld
298228d8de
Clean up test_grammars file
2017-07-05 11:39:33 -07:00
Max Brunsfeld
fcffd4b732
Add test for an example found during fuzzing
2017-06-30 21:55:50 -07:00
Max Brunsfeld
e19393eff5
🎨
2017-06-15 17:25:21 -07:00
Max Brunsfeld
db4b9ebc7c
Implement Rule as a union rather than an abstract base class
2017-03-17 13:29:31 -07:00
Max Brunsfeld
6dc0ff359d
Rename spec -> test
...
'Test' is a lot more straightforward of a name.
2017-03-09 20:40:01 -08:00