Niko Matsakis
7adaad0818
Merge pull request #340 from Marwes/version_0.15
...
Prepare the 0.15 release
2018-03-22 13:43:02 -04:00
Markus Westerlind
1135de29ff
Version 0.15.0
2018-03-18 12:57:34 +01:00
Markus Westerlind
c9fcd1f644
fix: Use the correct type for !
in macro expanded productions
2018-03-17 12:47:30 +01:00
Brendan Zabarauskas
701d609500
Run rustfmt on entire codebase
2018-03-01 16:50:36 +11:00
Ahmed Charles
3f6bd2a00e
Change parse_X to XParser::parse.
2018-02-15 10:25:29 +00:00
Ahmed Charles
c1e75406c4
Add support for pub(restricted).
...
Fixes #256 .
2018-01-31 04:02:35 +00:00
Ahmed Charles
d7b244f309
Fix cargo build for lalrpop-test.
2018-01-27 00:35:25 +00:00
Ahmed Charles
e5875274f4
Update tests.
2018-01-26 12:07:52 +00:00
Niko Matsakis
df38c3e2ae
update all version numbers to 0.14.0
2018-01-24 05:53:03 -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
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
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
a40cd3d0ff
rework error recovery to drop tokens and handle EOF more gracefully
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
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
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
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
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
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
920ee76fec
even in parse table, error out if we hit EOF early
2017-08-29 05:46:22 -04:00
Niko Matsakis
dcce320a88
bump version number to 0.13.1
2017-06-16 15:49:05 -04:00
Pawel Wieczorek
98699b7e64
End-user tests
2017-05-14 23:33:44 +02:00
Niko Matsakis
b3c07c473b
unrelated: fix unused warnings about issue 113
2017-05-03 04:48:44 -04:00
Niko Matsakis
8d3fc895d3
add an end-to-end test by tweaking expr_arena
2017-05-03 04:47:44 -04:00
Niko Matsakis
2b434f4869
Merge pull request #221 from ruuda/rust113
...
Restore Rust 1.13 compatibility
2017-04-20 15:01:09 -04:00
Ruud van Asseldonk
701808e23a
rename test to avoid shadowing module name
...
The test name matching the module name caused an error on Rust 1.13 (but
not on 1.16 and later). It can be avoided easily by renaming the test,
which also avoids ambiguity.
2017-04-19 20:14:24 +02:00
Minijackson
d3607d2783
Extendto lalrpop-snap + allow unused imports + ensure internal token use in test
2017-04-17 17:24:10 +02:00
Minijackson
4ecd594e51
Add a test for a nicer pull request!
...
It's true because it rhymes
2017-04-17 14:18:19 +02:00
Niko Matsakis
2f1fc3c5ae
stop tracking match_section.rs
2017-04-07 05:56:53 -04:00
Niko Matsakis
fb9b843ed2
move to version 0.13.0
2017-04-07 05:55:42 -04:00
Niko Matsakis
248c752f62
extend the tutorial to explain lexing vs parsing
2017-04-04 06:24:38 -04:00
Niko Matsakis
5d30989369
ignore match_section.rs
2017-04-03 05:55:57 -04:00
Niko Matsakis
3b3c1719f7
break apart the unit
tests into two
2017-04-03 05:54:43 -04:00
Niko Matsakis
4ebd265f86
silence some warnings that were driving me crazy
2017-03-30 05:18:08 -06:00
Niko Matsakis
243e9983cf
add negative parsing to existing test
2017-03-30 05:18:08 -06:00
Peter Wagenet
9c1317508e
implement customizable match
section
2017-03-30 05:17:43 -06:00
Pawel Wieczorek
d6ebe3b0f0
Added comments explaining usage of artifical token Tok::Fraction
2017-03-19 15:49:38 +01:00
Pawel Wieczorek
baf722a403
parse table generator is now packing terminal parameters into tuple
2017-03-19 04:59:30 +01:00
Ahmed Charles
8c18b80841
Upgrade various packages to their latest versions.
2017-03-01 16:57:28 -08:00