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
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
Joeri van Ruth
d4669c1226
Change one more () into &'static str
2017-10-05 16:54:45 +02:00
Joeri van Ruth
f71329d454
Make default user error &'static str instead of ()
...
Because () doesn't implement fmt::Display, which is inconvenient.
2017-10-05 16:54:45 +02:00
Joeri van Ruth
e51a157122
Also rename map_err to map_error and map_loc to map_location
2017-10-05 16:54:45 +02:00
Joeri van Ruth
564cc5c066
Fix minor nits
...
- rename `map_tok` to `map_token`
- Add backticks about unrecognized token
2017-10-05 16:54:45 +02:00
Joeri van Ruth
27b4b05720
Modify comment
...
To trigger Travis rebuild.
2017-10-05 16:54:45 +02:00
Joeri van Ruth
65d26ae20f
Replace expect_err with unwrap_err
...
to make it work on older Rust versions.
2017-10-05 16:54:45 +02:00
Joeri van Ruth
7bdb7126b0
Add utility methods to ParseError
...
Add three methods .map_loc(), .map_tok() and .map_err()
that transform the locations, tokens and user error values
inside the ParseError.
2017-10-05 16:54:45 +02:00
Michael Howell
424e22c5fb
Fix the "no-commas" example code
...
It translated `<e:T?>` into `e?`, when it should've been `T?`.
`<e:T?>` is a nonterminal bound to the name, `T?` is a nonterminal bound to no name, and `e?` is meaningless.
2017-10-01 21:25:10 -07:00
Niko Matsakis
08bb4c98b9
Merge pull request #263 from fitzgen/support-associated-types
...
Allow actions to return a grammar's type parameter's associated type
2017-09-21 09:25:36 -04:00
Nick Fitzgerald
b3d667e679
Allow actions to return a grammar's type parameter's associated type
...
Supporting this requires determining which `where` clauses apply to the used
type parameters for the nonterminal and symbol types, so that we can bound the
type parameters in such a way that we get access to their associated types.
2017-09-18 10:15:28 -07:00
Niko Matsakis
ff250d40a0
Merge pull request #264 from fitzgen/where-clauses
...
Create an explicit structure for `where` clauses
2017-09-18 05:01:34 -04:00
Nick Fitzgerald
1cb7716c3b
Create an explicit structure for where
clauses
...
This commit parses a grammar's `where` clauses into a structure that allows us
to see what type parameters are being bound and in what ways.
2017-09-12 14:25:13 -07:00
Niko Matsakis
4176ff6313
Merge pull request #259 from nikomatsakis/issue-249
...
avoid out-of-bounds error in error classification
2017-08-30 06:25:24 -04:00
Niko Matsakis
7acc771eee
avoid out-of-bounds error in error classification
...
We still don't get optimal results here, but that's
a separate issue.
Fixes #249 .
2017-08-30 06:04:19 -04:00
Niko Matsakis
1026ef82cd
Merge pull request #258 from nikomatsakis/issue-253
...
error out with extra tokens, even in parse table mode
2017-08-30 05:34:20 -04:00
Niko Matsakis
9b7bf48fd8
in lane table mode, run algorithm even with just one reduce
...
Otherwise, we get errors in the existing error recovery tests.
cc #240 -- possible fix
2017-08-29 05:49:53 -04:00
Niko Matsakis
920ee76fec
even in parse table, error out if we hit EOF early
2017-08-29 05:46:22 -04:00
Niko Matsakis
f7d274a76a
Merge pull request #251 from nick70/master
...
Add missing back-tick in tutorial.
2017-08-29 04:32:50 -04:00
Nicholas Farshidmehr
59d152fa59
Add missing back-tick in tutorial.
2017-08-01 15:54:26 -04:00
Niko Matsakis
9a343f7a04
Merge pull request #245 from mchesser/master
...
Embed LALRPOP version in generated files, and check it on rebuild
2017-07-17 05:27:11 -04:00
Niko Matsakis
690db010be
Merge pull request #246 from fitzgen/unrecognized-token-with-expected
...
Ignore the possible expected token when we find an unrecognized token
2017-07-11 13:37:01 -04:00
Nick Fitzgerald
b50124ea54
Ignore the possible expected token when we find an unrecognized token
...
This will at least print an error message with the location, rather than
panicking, which is a lot more user-friendly :)
2017-07-02 09:55:04 -07:00
Michael Chesser
f0a88a823e
Embed LARPOP version in generated files, and check it when rebuilding files.
2017-07-01 14:51:40 +09:30
Niko Matsakis
92055a1e2c
gah fix regex version
2017-06-16 17:52:36 -04:00
Niko Matsakis
09d333ba11
Merge pull request #239 from nikomatsakis/release-0.13.1
...
Release 0.13.1
v0.13.1
v0.14.0
2017-06-16 15:56:22 -04:00
Niko Matsakis
735eb8779f
update README and tutorial
2017-06-16 15:54:50 -04:00
Niko Matsakis
dcce320a88
bump version number to 0.13.1
2017-06-16 15:49:05 -04:00
Niko Matsakis
390125ea11
update RELEASES.md
2017-06-16 15:47:18 -04:00
Niko Matsakis
0d273fadc6
Merge pull request #235 from jchlapinski/master
...
Added version information for lalrpop executable
2017-06-16 15:07:47 -04:00
Niko Matsakis
f934229ed7
Merge pull request #236 from wieczyk/issue115_allow_shebang_in_lalrpop_files
...
Issue115 allow shebang in lalrpop files
2017-06-16 15:07:13 -04:00
Niko Matsakis
ba2cb48f36
Merge pull request #238 from nikomatsakis/petgraph-lanetable-snapshot
...
Petgraph lanetable snapshot
2017-06-15 15:10:20 -04:00
Niko Matsakis
d4a23b83c5
upgrade snapshot, remove #[LALR]
annotation from lrgrammar.lalrpop
2017-06-15 11:06:08 -04:00
Niko Matsakis
714a251657
warn about using #[lalr]
2017-06-15 10:55:12 -04:00
Niko Matsakis
b1d1d939b9
make LALRPOP_LANE_TABLE the default
...
To opt out, you can do `LALRPOP_LANE_TABLE=disabled`
2017-06-15 10:50:55 -04:00
Niko Matsakis
e3ca9d35ad
add missing #[cfg(test)]
2017-06-15 10:50:50 -04:00
Niko Matsakis
063d3c464b
upgrade the snapshot
2017-06-15 09:04:53 -04:00
Niko Matsakis
611b209707
bump to petgraph 0.4.4
2017-06-15 08:59:42 -04:00
jc
79d96df948
added version information https://github.com/nikomatsakis/lalrpop/issues/224
2017-05-31 17:58:01 +02:00