Commit graph

53 commits

Author SHA1 Message Date
Max Brunsfeld
90862dd18f Add some edit sequences to corpus tests 2015-09-22 21:19:19 -07:00
Max Brunsfeld
010a606b76 Add undo method to SpyInput 2015-09-19 14:46:14 -07:00
Max Brunsfeld
511e52ab55 Clean up SpyInput test helper 2015-09-19 13:29:30 -07:00
Max Brunsfeld
f37f73f92f Add ability to edit multiple times between parses 2015-09-18 23:20:06 -07:00
Max Brunsfeld
ebd60213d9 Drop release functions from callback structs
The caller can just as easily take care of the cleanup explicitly
2015-09-08 23:24:33 -07:00
Max Brunsfeld
245daffbc4 Add {next,prev}_concrete_sibling Node methods 2015-09-08 21:43:37 -07:00
Max Brunsfeld
eb8ef59869 Move corpus files to fixtures/corpus directory 2015-09-02 17:04:04 -07:00
Max Brunsfeld
21258e6a9e Remove 'document' wrapper node 2015-08-22 10:48:34 -07:00
Max Brunsfeld
d910a2d0e7 Rename node position to offset 2015-08-16 10:51:34 -07:00
Max Brunsfeld
54e40b8146 Rework AST access API: reduce heap allocation 2015-07-31 15:47:48 -07:00
Max Brunsfeld
32e79700bf Rename SpyReader -> SpyInput 2015-07-16 17:32:19 -07:00
Max Brunsfeld
958ace429f Fix buffer overflow in SpyReader 2015-07-16 17:29:16 -07:00
Max Brunsfeld
aaaa1c8a5d Encapsulate ParseStackNodes 2015-06-18 17:03:17 -07:00
Max Brunsfeld
b9dc92c36b Add EqualsTree matcher 2015-06-18 17:03:16 -07:00
Max Brunsfeld
ae0a7fc97d Add logging debugger for debugging failing tests 2014-10-17 23:05:08 -07:00
Max Brunsfeld
8cf800ef5d Unify debugging API for parsing and lexing 2014-10-17 17:52:54 -07:00
Max Brunsfeld
d33b074c30 Don't call input::seek_fn unnecessarily 2014-10-14 22:56:42 -07:00
Max Brunsfeld
c594208ab8 Allow callbacks to be specified for debug output 2014-10-13 01:02:18 -07:00
Max Brunsfeld
4dcc712a8c Start work on re-using right side of parse tree 2014-10-09 19:58:15 -07:00
Max Brunsfeld
1fa3bf0f07 In SpyReader::read, always return complete unicode characters 2014-10-03 14:30:19 -07:00
Max Brunsfeld
17f43e5e0c Clean up SpyReader 2014-10-03 14:21:39 -07:00
Max Brunsfeld
0f524121f1 Add SpyReader methods for inserting/removing by char index 2014-10-02 11:43:22 -07:00
Max Brunsfeld
5f313896c3 Make ::input a method on SpyReader, not a field 2014-09-30 14:57:57 -07:00
Max Brunsfeld
7988829c08 Add spec for recognition of UTF8 characters 2014-09-27 16:00:48 -07:00
Max Brunsfeld
04dc721241 Add missing import for string.h 2014-09-26 16:21:09 -07:00
Max Brunsfeld
c576d7d4a0 In SpyReader, don't return pointers into main content string
This improves test coverage of the lexer. Before, a SpyReader's read function
would return pointers into a single string that contained the entire text. This
could have masked bugs where out-of-bounds characters were being read.
Now the chunks returned by the reader are copied into a separate buffer.
2014-09-26 16:12:52 -07:00
Max Brunsfeld
ad52bdc448 Fix inc parsing when appending to end of a token 2014-09-03 07:09:15 -07:00
Max Brunsfeld
7d81126df3 Remove unnecessary import of public header in specs 2014-09-02 22:17:04 -07:00
Max Brunsfeld
9302080aa6 Remove unit test on parser
It wasn't adding any value
2014-08-09 00:00:20 -07:00
Max Brunsfeld
b155994491 Fix indentation in specs 2014-08-07 08:11:21 -07:00
Max Brunsfeld
0d6d09cbd9 In generated parsers, export language as a function 2014-07-31 13:04:46 -07:00
Max Brunsfeld
eecbcccee0 Remove generated parsers' dependency on the runtime library
Generated parsers no longer export a parser constructor function.
They now export an opaque Language object which can be set on
Documents directly. This way, the logic for constructing parsers
lives entirely in the runtime. The Languages are just structs which
have no load-time dependency on the runtime
2014-07-30 23:40:02 -07:00
Max Brunsfeld
b3385f20c8 Hide TSTree, expose TSNode 2014-07-17 23:29:11 -07:00
Max Brunsfeld
9da7663e99 Combine TSParser and TSStateMachine objects
My original thought was to decouple the runtime from
the LR parser generator by making TSParser a generic
interface that LR parsers implement.

I think this was more trouble than it was worth.
2014-07-10 13:23:20 -07:00
Max Brunsfeld
0ec3faba3e Rename type ts_lr_parser -> TSStateMachine 2014-06-28 19:22:16 -07:00
Max Brunsfeld
27f6eb725d Rename type ts_parse_action -> TSParseAction 2014-06-28 19:06:37 -07:00
Max Brunsfeld
ff13122419 Rename type ts_input -> TSInput 2014-06-28 18:56:04 -07:00
Max Brunsfeld
7e0d46002c Rename type ts_state_id -> TSStateId 2014-06-28 18:51:06 -07:00
Max Brunsfeld
5f59de72a8 Rename type ts_tree -> TSTree 2014-06-28 18:48:07 -07:00
Max Brunsfeld
81880e000e Tweak header include paths in tests 2014-06-23 18:50:03 -07:00
Max Brunsfeld
21c259df9c Clean up lint errors 2014-06-09 21:14:38 -07:00
Max Brunsfeld
12331d66f5 Fix memory leaks 2014-06-09 13:12:44 -07:00
Max Brunsfeld
4602690c1a Fix lr parser spec for gcc 2014-06-08 23:34:08 +00:00
Max Brunsfeld
63cde3967c Add unit test for stack
- Also, fix bug where trees pushed onto the stack were not retained
2014-06-03 13:19:49 -07:00
Max Brunsfeld
cad6122295 Use boost regex on travis ci 2014-04-10 13:17:45 -07:00
Max Brunsfeld
6a0a28f4b3 WIP - try to fix travis build 2014-04-08 21:41:38 -07:00
Max Brunsfeld
57ed6da225 Make explicit char * -> string conversion in test helper
The version of clang on travis-ci seems to not allow this
conversion to be made implicitly
2014-03-22 19:27:07 -07:00
Max Brunsfeld
13009e52a5 Clean 2014-03-22 15:59:21 -07:00
Max Brunsfeld
0d3fe99ef9 Fix regex in language test table reader 2014-03-22 15:56:02 -07:00
Karen Wang and Max Brunsfeld
f248ece3aa Use table-driven tests for specific parsers 2014-03-22 15:19:13 -07:00