879 Commits

Author SHA1 Message Date
Niko Matsakis
4cc5e50166 fix typo in the README 2017-03-21 05:15:03 -04:00
Niko Matsakis
a26cd51862 Merge pull request #197 from wieczyk/issue179_inconsistency_when_switching_parser_modes
parse table generator is now packing terminal parameters into tuple
2017-03-21 05:14:07 -04: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
Niko Matsakis
4ca00adf07 Merge pull request #196 from wieczyk/issue157_bracket_chars_are_perceived_as_part_of_syntax
Issue157 bracket chars are perceived as part of syntax
2017-03-18 07:57:05 -04:00
Pawel Wieczorek
040c76776e Added tests for error-cases for tokenizer 2017-03-17 22:32:23 +01:00
Niko Matsakis
e4f73c3757 try the large example, which revealed a few bugs 2017-03-17 06:19:46 -04:00
Niko Matsakis
b774a53fa7 add a comment 2017-03-17 05:15:12 -04:00
Niko Matsakis
25d89effd3 implement the rest of the lane table algorithm
Or, at least, enough to pass the "torturous" `paper_example_g1_build`
test.
2017-03-17 05:14:38 -04:00
Pawel Wieczorek
6fb8f7e8de Better coverage for new method of handling character literals in
tokenizer.
2017-03-16 19:49:50 +01:00
Niko Matsakis
7515fccef6 inefficient version of the core lane table algorithm
The missing piece is updating the lookaheads of the new states that wind
up getting created.
2017-03-16 08:54:47 -04:00
Pawel Wieczorek
ebfdb238f6 Initial fix for nikomatsakis/lalrpop#157 2017-03-16 00:25:37 +01:00
Niko Matsakis
5144980de5 some limited comments referring back to the README 2017-03-15 06:16:13 -04:00
Niko Matsakis
16c0cbad26 create a state set where each state maps to a ContextSet 2017-03-15 06:13:45 -04:00
Niko Matsakis
e6a2c29c1d add method rows() that creates a ContextSet for each state 2017-03-15 05:40:40 -04:00
Niko Matsakis
27e154f072 update README to describe The Plan 2017-03-10 06:14:02 -05:00
Niko Matsakis
416d3801d6 factor out the first-sets and state-graph
Rebuilding them is just silly
2017-03-08 05:44:32 -05:00
Niko Matsakis
e02bca0a92 add an initial version of the LR(1) construction algorithm
It only handles LALR(1) grammars right now.
2017-03-08 05:27:03 -05:00
Niko Matsakis
8203eac67c rewrite the lane table tracing to start with a conflicting action
This removes all the redundant columns due to shifts.
2017-03-07 05:59:03 -05:00
Niko Matsakis
c7ba5efd79 convert the lane-table construction to always use LR0 internally
It's more efficient.
2017-03-07 05:48:59 -05:00
Niko Matsakis
18b775112d start writing up how the lane table stuff works
This is my best effort to supplement the existing paper and also just
document my own personal understanding.
2017-03-07 05:11:41 -05:00
Niko Matsakis
68532b5439 make lane table construction generic in lookahead L 2017-03-06 06:48:40 -05:00
Niko Matsakis
8f3f864688 rename tests to reference the paper more explicitly
Also include the full G1, which I now see is the smallest example (or
one of them) that requires splitting a state.
2017-03-06 06:00:31 -05:00
Niko Matsakis
8bf0117e9e remove unused dependency bitflags 2017-03-06 05:20:33 -05:00
Niko Matsakis
f01edc0423 add a conflict set 2017-03-06 05:20:28 -05:00
Niko Matsakis
87ecc86426 Merge pull request #186 from king6cong/master
unify dep info
2017-03-06 05:17:15 -05:00
king6cong
e570f44427 unify dep info
adjust doc cargo.toml so that publish.sh correctly unify dep version
2017-03-06 00:10:53 +08:00
Niko Matsakis
c961159578 Merge pull request #192 from nikomatsakis/ascii-canvas-crate
move `ascii-canvas` into its own crate
2017-03-03 04:43:34 -05:00
Niko Matsakis
bb2b0904f3 move ascii-canvas into its own crate 2017-03-02 05:52:54 -05:00
Niko Matsakis
7ac329ac93 Merge pull request #191 from ahmedcharles/unused
Remove unused function.
2017-03-02 05:30:36 -05:00
Niko Matsakis
3fa9e14b89 Merge pull request #190 from ahmedcharles/upgrade
Upgrade various packages to their latest versions.
2017-03-02 05:30:06 -05:00
Niko Matsakis
75c1b9d5d5 Merge pull request #189 from ahmedcharles/doctests
Disable doctests in lalrpop-snap.
2017-03-02 05:29:35 -05:00
Ahmed Charles
1442fd037e Remove unused function. 2017-03-01 17:52:36 -08:00
Ahmed Charles
8c18b80841 Upgrade various packages to their latest versions. 2017-03-01 16:57:28 -08:00
Ahmed Charles
950b908930 Disable doctests in lalrpop-snap. 2017-03-01 16:39:45 -08:00
Niko Matsakis
43872afe75 Merge pull request #187 from nikomatsakis/regex
remove DFA codegen and replace with regex-set
2017-02-28 06:39:09 -05:00
Niko Matsakis
9a8f0cb179 store the string list into a local, so we can coerce it 2017-02-27 20:22:11 -05:00
Niko Matsakis
0705f422e7 remove DFA codegen and replace with regex-set 2017-02-27 10:12:39 -05:00
Niko Matsakis
9791cdb419 Merge pull request #184 from nikomatsakis/0.12.5
Release 0.12.5
2017-02-11 08:20:01 +01:00
Niko Matsakis
826be9555c publish 0.12.5 0.12.5 2017-02-11 08:19:16 +01:00
Niko Matsakis
ffab149493 bump to 0.12.5 2017-02-11 08:11:03 +01:00
Niko Matsakis
4d05b62b99 update release notes 2017-02-11 08:10:37 +01:00
Niko Matsakis
70ed503f98 Merge pull request #182 from Marwes/error_recovery_panic
fix: Don't accidentally cast a reduce action to usize
2017-02-07 07:08:18 +01:00
Markus Westerlind
b69e679d5b fix: Don't accidentally cast a reduce action to usize
This caused panics in certain error recovery scenarios as a reduce action represented by a negative number would get casted to `usize` which then caused an index out of bounds panic.

The added tests were extracted and minimized from [gluon's grammar](abd06a4f6e/parser/src/grammar.lalrpop) with the test case below being a minimal reproduction.

Panicking
```
type Test = a ->
```

Valid expression
```
type Test = a -> a
in 1
```
2017-01-28 16:22:37 +01:00
Niko Matsakis
333aaef2e8 Merge pull request #178 from Marwes/expected_tokens
feat: Add the expected successor tokens to UnrecognizedToken errors
2017-01-06 04:26:14 -05:00
Markus Westerlind
77c82c0cd4 feat: Add the expected successor tokens to UnrecognizedToken errors
This just adds the terminal strings defined in the grammar which is not the best possible information but it is better than no information.

Partial fix for #58
2016-12-28 19:31:06 +01:00
Niko Matsakis
5731a3f582 Merge pull request #175 from paupino/feature/fix-readme
Fixes typo in README.md for Configuration object
2016-12-04 03:46:10 -08:00
Paul Mason
54bad3c5f7 Fixes typo in README.md for Configuration object 2016-12-03 17:51:09 -08:00
Niko Matsakis
81efcba748 Merge pull request #174 from nikomatsakis/release-0.12.4
Release 0.12.4
0.12.4
2016-11-30 02:10:53 -08:00
Niko Matsakis
a3144a1b88 publish 0.12.4 2016-11-29 14:47:11 -05:00