792 Commits

Author SHA1 Message Date
Ahmed Charles
1a487a0ae6 Migrate from lalrpop-intern to string-cache.
Fixes #158.
2018-01-31 12:14:17 +00:00
Niko Matsakis
50fb8a5d74
Merge pull request #293 from ahmedcharles/pubrestricted
Add support for pub(restricted).
2018-01-31 05:47:33 -05:00
Ahmed Charles
c1e75406c4 Add support for pub(restricted).
Fixes #256.
2018-01-31 04:02:35 +00:00
Niko Matsakis
e037b57dd3
Merge pull request #297 from ahmedcharles/build
Fix cargo build for lalrpop-test.
2018-01-30 09:07:43 -05:00
Niko Matsakis
308d908718
Merge pull request #296 from ahmedcharles/rustfmt
Add rustfmt_skip attribute.
2018-01-30 09:06:32 -05:00
Niko Matsakis
6a48b9f070
Merge pull request #294 from ahmedcharles/pubmacro
Add error when macros are marked public.
2018-01-30 09:05:47 -05:00
Ahmed Charles
d7b244f309 Fix cargo build for lalrpop-test. 2018-01-27 00:35:25 +00:00
Ahmed Charles
f79fe093cc Add rustfmt_skip attribute.
Fixes #233.
2018-01-27 00:35:03 +00:00
Ahmed Charles
3341d915ed Add error when macros are marked public.
Fixes #262.
2018-01-27 00:33:59 +00:00
Niko Matsakis
a527fa2ea2
Merge pull request #295 from ahmedcharles/unused
Remove unused file.
2018-01-26 08:50:11 -05:00
Niko Matsakis
9bd36041ad
Merge pull request #291 from ahmedcharles/test
Update tests.
2018-01-26 08:45:07 -05:00
Niko Matsakis
768293d252
move the travis link to the lalrpop org 2018-01-26 08:44:16 -05:00
Ahmed Charles
7160fe46cb Remove unused file. 2018-01-26 12:48:17 +00:00
Ahmed Charles
e5875274f4 Update tests. 2018-01-26 12:07:52 +00:00
Niko Matsakis
5246910e7e add a code of conduct 2018-01-25 05:33:15 -05:00
Niko Matsakis
b119a2e541
Merge pull request #289 from jnbr/master
update version strings in README.md and doc/tutorial.md to 0.14.0
2018-01-24 19:56:13 -05:00
johannes
71df807949 update version strings in README.md and doc/tutorial.md to 0.14.0 2018-01-24 17:25:28 +01:00
Niko Matsakis
84a49aec05
Merge pull request #288 from nikomatsakis/v0.14
release v0.14
2018-01-24 06:09:07 -05:00
Niko Matsakis
df38c3e2ae update all version numbers to 0.14.0 0.14.0 2018-01-24 05:53:03 -05:00
Niko Matsakis
0f24f77b70 update relase notes 2018-01-24 05:52:31 -05:00
Niko Matsakis
d4bc4e1b8c
Merge pull request #287 from nikomatsakis/issue-240
update `parse_table` comment to describe error recovery
2018-01-24 05:19:58 -05:00
Niko Matsakis
a83d4f9cce
Merge pull request #274 from pyfisch/patch-1
Add example with funky expression and tupels
2018-01-24 05:19:43 -05:00
Niko Matsakis
519a18610c
Merge pull request #275 from pyfisch/patch-2
Add missing comma in tutorial
2018-01-24 05:18:59 -05:00
Niko Matsakis
038ea15f04
Merge pull request #277 from vmx/relax-extern-match
Allow match definition if no custom tokens are defined
2018-01-24 05:18:32 -05:00
Niko Matsakis
d6821a076c add newline to end of file 2018-01-24 05:18:22 -05:00
Volker Mische
daaad78583 Allow match definition if no custom tokens are defined
`extern` is not only used for custom lexers/tokens, but also to define
custom types for `Error` and `Location`. It should be possible to
have custom error types while having `match` dedefinitions as issue #261
shows.

Fixes #261.
2018-01-24 05:18:21 -05:00
Niko Matsakis
226cb536c8
Merge pull request #279 from vmx/issue-278
Return grammar errors first
2018-01-24 04:41:24 -05:00
Niko Matsakis
e2d8f223f4 update parse_table comment to describe error recovery 2018-01-24 04:35:33 -05:00
Niko Matsakis
88b4e65c22
Merge pull request #281 from gwenn/category
Specify `parsing` category in Cargo.toml
2018-01-24 04:19:32 -05:00
Niko Matsakis
c3f810704d
Merge pull request #286 from nikomatsakis/issue-240
Rework error recovery mechanism
2018-01-24 04:18:36 -05:00
Niko Matsakis
2e0d114793 add new style error recovery function and adjust tests
Also, add some detailed tests covering all the cases for error spans.
2018-01-23 13:14:50 -05:00
Niko Matsakis
1d36900d66 remove LALR annotation, not crucial 2018-01-23 12:49:26 -05:00
Niko Matsakis
dae7c1db35 make last_location into an &mut so we can thread it around 2018-01-23 12:49:26 -05:00
Niko Matsakis
004187aa86 make next_token and token_to_integer more hygienic 2018-01-23 12:49:26 -05:00
Niko Matsakis
3f4ed1e1af add a test for EOF loop 2018-01-23 12:49:26 -05:00
Niko Matsakis
b62a3fc095 make a test demonstrating the lock-in phenomena 2018-01-23 12:49:26 -05:00
Niko Matsakis
3eeb66c93d make unrecognized_token_error more hygienic 2018-01-23 12:49:26 -05:00
Niko Matsakis
a40cd3d0ff rework error recovery to drop tokens and handle EOF more gracefully 2018-01-23 12:49:26 -05:00
Niko Matsakis
94fa24c4a6 add more useful info when DEBUG_PRINT is enabled 2018-01-23 12:49:26 -05:00
Niko Matsakis
3d49e9cffd use lane-table even on LR(0) grammars
This is needed to avoid infinite loops in error recovery.
2018-01-23 12:49:26 -05:00
Markus Westerlind
08728df48a Add a test case for issue #240 2018-01-23 12:49:26 -05:00
gwenn
92c3400010 Specify parsing category in Cargo.toml
https://crates.io/categories/parsing
> Crates to help create parsers of binary and text formats.
2017-11-26 18:17:32 +01:00
Volker Mische
f309406335 Return grammar errors first
If some production in the grammar returns an error, give it priority
over built-in errors.

Fixes #278.
2017-11-23 00:43:31 +01:00
Pyfisch
e3d1370089
Add missing comma in tutorial
closes #219
2017-10-29 20:57:24 +01:00
Pyfisch
f7e83a3f4a
Add example with funky expression and tupels
closes #83
2017-10-29 18:48:54 +01:00
Niko Matsakis
01ccd43789 Merge pull request #254 from joerivanruth/transform-parse-error
Make ParseError Displayable
2017-10-15 05:47:15 -04:00
Niko Matsakis
0645c0aada Merge pull request #268 from notriddle/patch-1
Fix the "no-brackets" example code
2017-10-15 05:42:36 -04:00
Joeri van Ruth
5c7f81b821 Move internal token to __intern_token.
Re-export it at the toplevel because client visible types
use it.
2017-10-05 16:54:45 +02:00
Joeri van Ruth
9d38aa4722 Use a Display'able token type in the internal tokenizer 2017-10-05 16:54:45 +02:00
Joeri van Ruth
517acc3543 Suppress some warnings 2017-10-05 16:54:45 +02:00