Max Brunsfeld
6cfd009503
Compute parse state group signature based on the item set
2016-11-16 10:21:30 -08:00
Max Brunsfeld
42d37656ea
Optimize remove_duplicate_parse_states method
...
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-11-15 17:51:52 -08:00
Max Brunsfeld
e7217f1bac
Clean up some methods in parser.c
2016-11-14 17:25:55 -08:00
Max Brunsfeld
6fd0b5557d
Merge pull request #47 from tree-sitter/32-bit-numbers
...
Represent byte, char and tree counts as 32 bit numbers
2016-11-14 12:32:27 -08:00
Max Brunsfeld
535879a2bd
Represent byte, char and tree counts as 32 bit numbers
...
The parser spends the majority of its time allocating and freeing trees and stack nodes.
Also, the memory footprint of the AST is a significant concern when using tree-sitter
with large files. This library is already unlikely to work very well with source files
larger than 4GB, so representing rows, columns, byte lengths and child indices as
unsigned 32 bit integers seems like the right choice.
2016-11-14 12:19:13 -08:00
Max Brunsfeld
11e767bd81
Merge pull request #46 from tree-sitter/no-reductions-on-nonterminal-lookaheads
...
Don't include reduce actions for nonterminal lookaheads
2016-11-14 10:53:37 -08:00
Max Brunsfeld
8edb8df530
Remove extraneous Language methods
2016-11-14 10:35:33 -08:00
Max Brunsfeld
1118a9142a
Introduce Symbol::Index type alias
2016-11-14 10:25:26 -08:00
Max Brunsfeld
1fddb124b3
Remove stray LOG_STACK() call
2016-11-14 09:32:05 -08:00
Max Brunsfeld
a89f8c086b
Remove stray #include
2016-11-14 09:31:32 -08:00
Max Brunsfeld
fad7294ba4
Store shift states for non-terminals directly in the main parse table
2016-11-14 08:36:06 -08:00
Max Brunsfeld
8d9c261e3a
Don't include reduce actions for nonterminal lookaheads
2016-11-10 11:33:37 -08:00
Max Brunsfeld
c9dcb29c6f
Remove the TS prefix from some internal type/function names
2016-11-09 20:59:05 -08:00
Max Brunsfeld
255bc2427c
🎨 build_parse_table
2016-11-09 20:47:47 -08:00
Max Brunsfeld
7bcae8f6a8
🎨 flatten_grammar
2016-11-09 20:29:21 -08:00
Max Brunsfeld
89c01a7b22
🎨 tree_path.h
2016-11-09 20:25:03 -08:00
Max Brunsfeld
ad910ed4f5
Merge pull request #43 from tree-sitter/no-oom-recovery
...
Remove logic for recovering from OOM
2016-11-06 21:35:52 -08:00
Max Brunsfeld
3f0e63058b
Fix handling of failure to descend when getting changed ranges
2016-11-05 21:26:01 -07:00
Max Brunsfeld
ff14cda959
Abort if malloc fails
2016-11-05 21:23:23 -07:00
Max Brunsfeld
ca45acd6af
Suppress 'value computed is not used' warning on gcc
2016-11-05 21:23:03 -07:00
Max Brunsfeld
4106ecda43
Remove logic for recovering from OOM
2016-11-04 09:18:38 -07:00
Max Brunsfeld
3b3fddd64d
Relax overly conservative parse state mergeability check
...
Built-in symbols (e.g. EOF, ERROR) should not prevent parse states from being
merged. Neither should non-token productions.
2016-10-26 21:58:15 -07:00
Max Brunsfeld
e53beb66c9
Avoid anonymous nested struct to silence override-init warnings
2016-10-26 11:10:56 -07:00
Max Brunsfeld
f11b729dfb
Merge pull request #42 from tree-sitter/mergeable-symbols
...
Mergeable symbols
2016-10-25 14:59:22 -07:00
Timothy Clem
693c6d40dd
Move setup of mergeable_symbols to constructor, use set throughout
2016-10-18 15:18:33 -07:00
Timothy Clem
14bae584d4
WIP: New check for mergable symbols in merge_state
2016-10-18 13:03:41 -07:00
Max Brunsfeld
82c9385518
Merge pull request #38 from tree-sitter/changed-ranges
...
Report text ranges whose syntactic meaning have changed after re-parsing
2016-10-17 20:02:20 -07:00
Max Brunsfeld
5638fea120
Rename length_set_unknown -> length_set_unknown_chars
2016-10-16 21:21:53 -07:00
Max Brunsfeld
44b0c96579
Move point functions to their own file
2016-10-16 21:21:21 -07:00
Max Brunsfeld
eed54d95e1
Merge branch 'master' into changed-ranges
2016-10-16 21:10:25 -07:00
Max Brunsfeld
25d63d68f7
Move TreePath functions into their own file
2016-10-16 20:42:55 -07:00
Max Brunsfeld
1412419434
Verify changed ranges for random deletions as well as random insertions
2016-10-16 14:55:51 -07:00
Max Brunsfeld
4bad58b407
Remove outdated test
2016-10-16 14:54:59 -07:00
Max Brunsfeld
b3140b2689
Implement ts_document_parse_and_get_changed_ranges
2016-10-15 22:31:21 -07:00
Max Brunsfeld
6bde4c54d9
Merge pull request #40 from tree-sitter/remove-runtime-dep-from-parser-header
...
Remove generated parsers' dependency on runtime.h
2016-10-05 14:13:53 -07:00
Max Brunsfeld
e149d94ff5
Remove generated parsers' dependency on runtime.h
2016-10-05 14:02:49 -07:00
Max Brunsfeld
0018623c92
Merge pull request #39 from tree-sitter/fix-typo-from-api-cleanup
...
s/TSDebugger/TSLogger in spec name
2016-10-05 09:29:57 -07:00
Timothy Clem
0ffebc3d0c
s/TSDebugger/TSLogger in spec name
2016-10-05 08:48:12 -07:00
Max Brunsfeld
3014101104
Fix inconsistencies in nodes sizes after edits
2016-09-19 13:35:08 -07:00
Max Brunsfeld
ae3b912ddc
Escape unexpected characters when pretty-printing error nodes
2016-09-19 13:34:24 -07:00
Max Brunsfeld
744eb7b356
Assert consistency of trees' sizes in bytes
2016-09-19 12:40:45 -07:00
Max Brunsfeld
fcf9293d35
Use explicit stack for assigning trees' parent pointers
2016-09-19 12:40:45 -07:00
Max Brunsfeld
00528e50ce
Change edit API to be byte-based
2016-09-13 13:08:52 -07:00
Max Brunsfeld
400e689bdd
Update README to reflect API changes
2016-09-12 11:02:09 -07:00
Max Brunsfeld
cc62fe0375
Represent Lengths in terms of Points
2016-09-09 21:11:02 -07:00
Max Brunsfeld
eb5dda75c4
Start work on randomized changed-region testing
...
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-09-09 09:20:04 -07:00
Max Brunsfeld
591fcc980c
Update trees' offsets when editing them
2016-09-08 17:54:51 -07:00
Max Brunsfeld
131bbee160
Rename parse_and_diff -> parse_and_get_changed_ranges
...
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-09-08 17:51:34 -07:00
Max Brunsfeld
fce8d57152
Start work on document_parse_and_diff API
2016-09-08 17:51:20 -07:00
Max Brunsfeld
b94a7bfd71
Merge pull request #37 from tree-sitter/api-cleanup
...
API cleanup
2016-09-06 22:46:24 -07:00