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
Max Brunsfeld
a3a7546450
In SpyReader, store entire strings read, not individual chunks
...
Makes assertions easier to write. We don't need to assert
that the strings were read chunk by chunk.
2014-03-18 13:23:00 -07:00
Max Brunsfeld
ff0c8a98b8
Consolidate reading of input chunks in parser
2014-03-11 12:43:13 -07:00
Max Brunsfeld
42e9a264f3
In parser, read chunked input correctly
2014-03-10 13:25:31 -07:00