1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00
Commit Graph

8296 Commits

Author SHA1 Message Date
Rob Rix
075b77f931 🔥 unnecessary quantification. 2017-08-04 09:33:54 -04:00
Rob Rix
0f08846156 Always use the error handler when applicable. 2017-08-04 09:20:44 -04:00
Rob Rix
a778382e85 📝 disamb. 2017-08-04 09:16:24 -04:00
Rob Rix
17102a87b8 📝 Amb. 2017-08-04 09:15:15 -04:00
Rob Rix
0a8411e534 Disambiguate assignment results. 2017-08-04 09:11:22 -04:00
Rob Rix
7bd2d6b94b Merge branch 'master' into delimited-control 2017-08-04 09:00:07 -04:00
Rob Rix
c117abe1fd Disallow catches of committed choices from recovering at the end of input. 2017-08-04 08:49:54 -04:00
Rob Rix
9d1ade2654 Factor out the list & state. 2017-08-03 22:46:46 -04:00
Rob Rix
cabab1f9ed Check advancement using the state offset instead of the counter. 2017-08-03 21:29:22 -04:00
Rob Rix
9bfe67afd9 🔥 stateError. 2017-08-03 21:26:43 -04:00
Rob Rix
a57aa0bf2b Share the continuation. 2017-08-03 21:23:47 -04:00
Rob Rix
bece561240 Unfreeze the callstacks in <|>. 2017-08-03 21:13:35 -04:00
Rob Rix
4dded01e73 Preserve callstacks through exhaustiveness checks. 2017-08-03 21:11:29 -04:00
Rob Rix
ffb01ff388 Freeze the callstacks in <|>. 2017-08-03 21:10:08 -04:00
Rob Rix
abaad4fc76 Assignment is non-strict. 2017-08-03 21:05:11 -04:00
Rob Rix
cbff2fee2d Take the first zero-error term, if any, before forcing the rest. 2017-08-03 21:04:38 -04:00
Rob Rix
42a22aad72 Amb is non-strict. 2017-08-03 21:03:42 -04:00
Rob Rix
0617502efe Order repetitions greedily. 2017-08-03 20:52:27 -04:00
Rob Rix
d5749545ce Children, projection, & source rules are unambiguous. 2017-08-03 20:51:46 -04:00
Rob Rix
e9c61048ec Committed choices are really committed. 2017-08-03 20:30:55 -04:00
Rob Rix
cb58739e48 Select terms by the minimum error counter. 2017-08-03 20:26:51 -04:00
Rob Rix
788f435b1e Define a disambiguation convenience. 2017-08-03 20:23:29 -04:00
Rob Rix
030b2967c3 Add a monotonic counter of the number of error handlers invoked. 2017-08-03 20:21:42 -04:00
Rob Rix
d1e3518732 Avoid recomputating the bodies of catch rules. 2017-08-03 20:17:59 -04:00
Rob Rix
92f2745bc3 Alternate entire children rules, not just successful ones. 2017-08-03 20:13:06 -04:00
Rob Rix
24b93e0ad6 Allow ambiguous parses with and without the error handler. 2017-08-03 20:00:45 -04:00
Rob Rix
232bf01302 Allow ambiguous matches past source, children, & projection rules. 2017-08-03 19:57:42 -04:00
Rob Rix
c4f1296a3b Simplify committed choices with backtracking. 2017-08-03 19:54:51 -04:00
Rob Rix
dc282cdcb8 Return all matches from repetitions. 2017-08-03 19:51:41 -04:00
Rob Rix
8c4fdbc390 Halt non-advancing recursion. 2017-08-03 19:50:26 -04:00
Rob Rix
ea29092469 Define a Bifunctor instance for Amb. 2017-08-03 19:40:07 -04:00
Rob Rix
143e6ec26d Select the result with the fewest errors. 2017-08-03 19:36:51 -04:00
Rob Rix
f79e118d2e Committed choices with alternatives attempt the alternative. 2017-08-03 19:31:16 -04:00
Rob Rix
51185311af Flatten Alt rules into a non-empty list. 2017-08-03 19:25:54 -04:00
Rob Rix
c0bdb15d61 Assignment ambiguously. 2017-08-03 19:17:17 -04:00
Timothy Clem
6b01580dbb Merge remote-tracking branch 'origin/master' into the-great-tree-sitter-update 2017-08-03 15:09:35 -07:00
Rick Winfrey
f7efacca73 🔥 comment 2017-08-03 14:34:24 -07:00
Rick Winfrey
b1f843679f Add import for swap 2017-08-03 14:22:49 -07:00
Rick Winfrey
1c72b23cea Merge branch 'master' into bump-tree-sitter-python 2017-08-03 14:15:44 -07:00
Rob Rix
9572b96fa4 Define a MonadError instance for Amb. 2017-08-03 17:04:47 -04:00
Rob Rix
5ca85ec4ed Define a Monad instance for Amb. 2017-08-03 17:02:47 -04:00
Rob Rix
aeb4a65c61 Define an Applicative instance for Amb. 2017-08-03 17:02:28 -04:00
Rob Rix
7dd880dd18 Define a Semigroup instance over Amb. 2017-08-03 17:02:15 -04:00
Rob Rix
fb9f27a00e Define an Amb datatype. 2017-08-03 17:02:05 -04:00
Rob Rix
69892a8dc9 Stub in a module for ambiguous data. 2017-08-03 16:58:23 -04:00
Rob Rix
10f39e2fdf requireExhaustive returns a NonEmpty list of results. 2017-08-03 15:57:48 -04:00
Rob Rix
6c9d23d827 Assignment produces a NonEmpty list of results. 2017-08-03 15:54:43 -04:00
Rob Rix
dd8e283632 Revert "Run assignments using iterLookahead."
This reverts commit 2a280ffb7dea2707e13bc518d93af9d6e0648bd0.
2017-08-03 15:38:17 -04:00
Rob Rix
d3895a504e Revert "Define a function computing the first sets for assignments."
This reverts commit 55e4c4f33ed52bf49f018dfd7251117e86c3e774.
2017-08-03 15:38:16 -04:00
Rob Rix
c656ddede7 Revert "Compute the first sets of alternations."
This reverts commit 43644d1d591ed23c434fac120df27c985148523f.
2017-08-03 15:38:15 -04:00
Rob Rix
02f847674c Revert "Compute the first sets of repetitions."
This reverts commit d2f133799ae567cb345d7c33cd1f4d08956382c4.
2017-08-03 15:38:14 -04:00
Rob Rix
45754489e2 Revert "Compute the first sets of catchError rules."
This reverts commit c5ec4e97f81acf299381c56556c92f629a57dac4.
2017-08-03 15:38:12 -04:00
Rob Rix
f43c2a889c Revert "Add the next set of productions to the state."
This reverts commit 450d9d6c2ef9570388162cb5814e7c1fa5cbf51f.
2017-08-03 15:38:06 -04:00
Rob Rix
1d67f1a3a3 Revert "Set the next set of productions in repetitions."
This reverts commit 30812ca0d171fcd01f821bf317d4ae01511a120b.
2017-08-03 15:38:03 -04:00
Rob Rix
48139bf998 Revert "Set the next set of productions in alternations."
This reverts commit 8925971c100f5523b9c95f862e6e8ac7e22d47b7.
2017-08-03 15:38:01 -04:00
Rob Rix
20271f918f Revert "Represent the next set of productions with an IntSet."
This reverts commit 90ab7924b2514e5f7116b38cdf67614a9c9ca96b.
2017-08-03 15:38:00 -04:00
Rob Rix
a5c918adf7 Revert "📝 stateNextSet."
This reverts commit eac40e6b7c38bac50b2fb1e06535f7060bb4f707.
2017-08-03 15:37:58 -04:00
Rob Rix
0629b136d6 Revert "Define a setter for the next set field."
This reverts commit 1fe1dbc4669fb2460a58925ac00c226172a614f2.
2017-08-03 15:37:56 -04:00
Rob Rix
291e6719db Revert "Swap the order of the setter’s params."
This reverts commit 6d7534d01c260a6427c5ea405eb7086ebd263c7c.
2017-08-03 15:37:55 -04:00
Rob Rix
baffab585b Revert "Use the setter to set & reset the next set."
This reverts commit ee844956ecaa6ab6beb597b44cdeaa1c07031866.
2017-08-03 15:37:53 -04:00
Rob Rix
084985d2a1 Revert "Only run error handlers when the next set of productions doesn’t contain the current node."
This reverts commit 1d5fa138f0febf1940bd9c1ebd421ccf3932c27b.
2017-08-03 15:37:51 -04:00
Rob Rix
b4a2ba099a Revert "Simplify how we limit error handling."
This reverts commit 86ed796bc54b073a0c9a267be267b519ba0a47ef.
2017-08-03 15:37:50 -04:00
Rob Rix
f060e11654 Revert "Consider catchError rules’ own next set."
This reverts commit 04a02be4c4da5409360c98dc723104d53b004875.
2017-08-03 15:37:48 -04:00
Rob Rix
7c1c4f33d4 Consider catchError rules’ own next set. 2017-08-03 13:37:46 -04:00
Rob Rix
7075115769 Simplify how we limit error handling. 2017-08-03 13:36:17 -04:00
Rob Rix
3088e42a84 Only run error handlers when the next set of productions doesn’t contain the current node. 2017-08-03 13:34:53 -04:00
Rob Rix
32252b1caa Use the setter to set & reset the next set. 2017-08-03 13:22:50 -04:00
Rob Rix
d8ead33306 Swap the order of the setter’s params. 2017-08-03 13:22:40 -04:00
Rob Rix
2915d46a85 Define a setter for the next set field. 2017-08-03 13:21:37 -04:00
Rob Rix
aec09b060d 📝 stateNextSet. 2017-08-03 13:20:03 -04:00
Rob Rix
382d0476fa Represent the next set of productions with an IntSet. 2017-08-03 13:19:24 -04:00
Rob Rix
228b525912 Set the next set of productions in alternations. 2017-08-03 13:17:02 -04:00
Rob Rix
390a60c5e7 Set the next set of productions in repetitions. 2017-08-03 13:16:08 -04:00
Rob Rix
7f1ff76e4b Add the next set of productions to the state. 2017-08-03 13:13:49 -04:00
Rob Rix
7ebd2765ea Compute the first sets of catchError rules. 2017-08-03 13:08:32 -04:00
Rob Rix
c74d313194 Compute the first sets of repetitions. 2017-08-03 13:07:54 -04:00
Rob Rix
f03fd85add Compute the first sets of alternations. 2017-08-03 13:07:14 -04:00
Timothy Clem
6bc00b46d7 Merge remote-tracking branch 'origin/master' into the-great-tree-sitter-update 2017-08-03 09:50:27 -07:00
Rob Rix
92a2f999ff Define a function computing the first sets for assignments. 2017-08-03 12:33:27 -04:00
Rob Rix
ccd7812e8d Run assignments using iterLookahead. 2017-08-03 12:26:07 -04:00
Rob Rix
e8074d2955 Merge branch 'master' into delimited-control 2017-08-03 12:16:45 -04:00
Rob Rix
2529288f87 Merge branch 'master' into requiem-for-a-protolude 2017-08-03 11:51:09 -04:00
Timothy Clem
9f41276e3b Update for TypeScript grammar changes 2017-08-03 08:49:20 -07:00
Timothy Clem
f38dc3f578 Update for Ruby grammar changes 2017-08-03 08:19:23 -07:00
Timothy Clem
6563a69ebc Update for Golang grammar changes 2017-08-03 08:00:20 -07:00
Timothy Clem
1ebe08c81d Update tree-sitter and all languages 2017-08-03 07:59:00 -07:00
Yuki Izumi
134aebe418 Fix my bad Haskell style 2017-08-03 17:26:53 +10:00
Yuki Izumi
bcf6b5b45e Use cmark-gfm package 2017-08-03 17:22:40 +10:00
Rick Winfrey
0dd16d83c1 Fix comment 2017-08-02 17:46:48 -07:00
Rick Winfrey
947102e996 📝 many comment problem for conditional expressions 2017-08-02 17:45:05 -07:00
Rick Winfrey
5858d210b6 This allows for catching a comment, but not greedily matching expressions
Using `many comment` will consume anonymous nodes (including the `+` in a binary operator expression).
2017-08-02 17:27:43 -07:00
Rick Winfrey
12e5d30723 Merge branch 'master' into bump-tree-sitter-python 2017-08-02 16:24:22 -07:00
Rick Winfrey
4204df6003 Merge branch 'master' into parse-jsx 2017-08-02 15:51:45 -07:00
Rob Rix
918aeb5301 Recur via the worker function. 2017-08-02 17:37:34 -04:00
Rob Rix
79467e3be7 Wrap the body of runParser up in a worker function. 2017-08-02 17:36:48 -04:00
Rob Rix
8454e187d4 Swap the order of the parser & blob params. 2017-08-02 17:36:04 -04:00
Rob Rix
35a431f794 blobFields closes over the blob. 2017-08-02 17:35:08 -04:00
Rob Rix
02ddc4eb65 Show missing languages as the empty string. 2017-08-02 17:34:34 -04:00
Rob Rix
0c1d08d89d Produce a term when assignment fails at the root. 2017-08-02 17:32:12 -04:00
Rob Rix
b619389ec6 Don’t showBlob. 2017-08-02 17:28:53 -04:00