Commit graph

462 commits

Author SHA1 Message Date
Max Brunsfeld
466daeaf99 Add function for retrieving a leaf node by position 2014-07-18 18:52:08 -07:00
Max Brunsfeld
1ecafb874e Add functions to retrieve nodes' siblings and parents 2014-07-18 13:24:03 -07:00
Max Brunsfeld
0e11bf7271 Precompute trees' visible children 2014-07-18 13:08:14 -07:00
Max Brunsfeld
b3385f20c8 Hide TSTree, expose TSNode 2014-07-17 23:29:11 -07:00
Max Brunsfeld
02904085c2 Make separate helper scripts for testing compiler and runtime 2014-07-17 22:20:14 -07:00
Max Brunsfeld
779bf0d745 Don't store tree's hidden children in a separate array
Just mark hidden trees as such, and skip them when
pretty-printing a tree
2014-07-17 13:36:53 -07:00
Max Brunsfeld
95fbdb6fdb Suppress gcc unknown pragma warnings in specs
bandit uses some pragma that travis ci's gcc doesn't know about
2014-07-14 21:14:20 -07:00
Max Brunsfeld
25f927e321 Remove unnecessary accessor functions for tree 2014-07-14 21:11:15 -07:00
Max Brunsfeld
6e551d6d9f Simplify handling of multiple top-level nodes after parsing 2014-07-14 20:46:20 -07:00
Max Brunsfeld
4d17da159f repo name tree_sitter -> tree-sitter 2014-07-13 22:14:03 -07:00
Max Brunsfeld
d87b17c2a2 Update todo 2014-07-13 21:54:35 -07:00
Max Brunsfeld
6951acb13b Fix error when grammar contains to error productions 2014-07-13 21:26:21 -07:00
Max Brunsfeld
9b09c1c615 Explicitly enable RTTI
When this project is compiled by node-gyp, its settings
are merged with node's defaults, which include `no-rtti`.
2014-07-13 20:15:58 -07:00
Max Brunsfeld
7dfaba2954 Fix conflict manager spec 2014-07-13 18:10:32 -07:00
Max Brunsfeld
4d14a65e22 In build_parse_table, switch recursion to explicit iteration 2014-07-13 18:06:37 -07:00
Max Brunsfeld
b217cd38fb Handle built-in symbols correctly in conflict manager 2014-07-13 17:59:57 -07:00
Max Brunsfeld
44c4bf5f5e Refactor add_ubiquitous_token_actions method 2014-07-11 13:21:44 -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
1c7d2d2d03 Add for-in loops and math assignment operators to js grammar 2014-07-07 13:35:55 -07:00
Max Brunsfeld
f4287c07d0 Fix ParseStateId / size_t confusion in parse table 2014-07-07 13:21:30 -07:00
Max Brunsfeld
c5c25d30bb Fix golang grammar after latest lexer change 2014-07-03 13:28:08 -07:00
Max Brunsfeld
77df7fe511 In lexer, always prefer the longest match
Only use rules' precedence to decide between two tokens
that match the same string
2014-07-03 08:57:35 -07:00
Max Brunsfeld
c85841364e Add throw statements to js grammar 2014-07-03 08:20:43 -07:00
Max Brunsfeld
67590eddc7 Fix stream operator for new parse action types 2014-07-03 08:15:36 -07:00
Max Brunsfeld
18ae326459 Fix lint errors 2014-07-02 09:01:38 -07:00
Max Brunsfeld
6424eea62a Refactor handling of ubiquitous tokens when building parse table 2014-07-01 21:43:26 -07:00
Max Brunsfeld
83a1b9439e Fix handling of ubiquitous tokens used in grammar rules 2014-07-01 20:47:35 -07:00
Max Brunsfeld
59cc65c2e3 Rename parse action types 2014-06-29 00:20:16 -07:00
Max Brunsfeld
da7b50a2d1 Rename type ts_string_input_data -> TSStringInput 2014-06-28 19:29:44 -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
26f612a20d Rename type ts_stack -> TSStack 2014-06-28 19:04:14 -07:00
Max Brunsfeld
9d4fcf75de Rename type ts_lexer, ts_parser -> TSLexer, TSParser 2014-06-28 19:01:46 -07:00
Max Brunsfeld
c8797bfa27 Rename type ts_input_edit -> TSInputEdit 2014-06-28 18:56:47 -07:00
Max Brunsfeld
ff13122419 Rename type ts_input -> TSInput 2014-06-28 18:56:04 -07:00
Max Brunsfeld
d7449bf5ea Rename type ts_symbol -> TSSymbol 2014-06-28 18:53:32 -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
2795078633 Rename type ts_document -> TSDocument 2014-06-28 18:37:29 -07:00
Max Brunsfeld
7a6d3365c5 Remove helper function in rule_transitions.cc 2014-06-28 18:09:32 -07:00
Max Brunsfeld
3be648593e merge_{sym,char}_transitions -> merge_{sym,char}_transition 2014-06-28 17:02:48 -07:00
Max Brunsfeld
9bad5dff3e Avoid unnecessary std::map construction when merging transition sets 2014-06-26 13:42:42 -07:00
Max Brunsfeld
9686c57e90 Allow ubiquitous tokens to also be used in grammar rules 2014-06-26 08:52:42 -07:00
Max Brunsfeld
a9dff20658 Make grammars' separator characters configurable 2014-06-26 07:31:08 -07:00
Max Brunsfeld
8aea89750d Add project vimrc 2014-06-26 07:29:23 -07:00
Max Brunsfeld
7df35f9b8d Make separate types for syntax and lexical grammars
This way, the separator characters can be added as a field to
lexical grammars only
2014-06-25 13:27:16 -07:00
Max Brunsfeld
d5674d33c4 Add test helper stream method for pairs 2014-06-24 21:54:38 -07:00
Max Brunsfeld
81880e000e Tweak header include paths in tests 2014-06-23 18:50:03 -07:00
Max Brunsfeld
6769659f59 Add vim YCM config file 2014-06-23 12:47:12 -07:00
Max Brunsfeld
240de1ca61 Reorder methods in c code generator 2014-06-18 08:21:43 -07:00