1131 Commits

Author SHA1 Message Date
Markus Westerlind
6400c14cb8 Fix version in clog command 2020-05-12 10:07:16 +02:00
Markus Westerlind
6632b80ecf Fix version in RELEASES.md 2020-05-12 10:06:38 +02:00
Markus Westerlind
91f2500f68 Sleep longer when publishing 2020-05-12 10:05:38 +02:00
Markus Westerlind
69aa2e09ce Bump version to 0.19 0.19.0 2020-05-11 23:49:25 +02:00
Markus Westerlind
274c918251
Merge pull request #527 from Marwes/span_empty
fix: Don't include whitespace in the span with empty nonterminals
2020-05-11 18:45:11 +02:00
Markus Westerlind
11a50e70f7 fix: Don't include whitespace in the span with empty nonterminals
Empty non-terminals used to be spanned by the whitespace between the
previous and next token. If the non-terminal was the first thing in
another production this span would leak into that production, causing it
to have a to large span assigned.

This makes empty productions instead only point to the start of the
lookahead to avoid this problem.
2020-05-11 00:28:14 +02:00
Markus Westerlind
672716e098
Merge pull request #525 from Marwes/symbol_type
perf: Move the symbol mismatch panic into a colder path
2020-05-02 17:58:21 +02:00
Markus Westerlind
e932f811a6 test: Shrink the maximum depth a bit to avoid stack overflows 2020-05-02 17:42:14 +02:00
Markus Westerlind
0c69e999a5 perf: Move the symbol mismatch panic into a colder path
Makes it easier for llvm to inline the pop functions
2020-05-02 17:42:14 +02:00
Markus Westerlind
29a4bea914
Merge pull request #524 from Marwes/refactor_gen
perf: Emit the GOTO table as nested matches
2020-05-02 17:40:23 +02:00
Markus Westerlind
8a47ed8c7c perf: Avoid subtracting in goto 2020-05-02 00:16:05 +02:00
Markus Westerlind
554b203531 Document the goto match expression 2020-05-02 00:03:26 +02:00
Markus Westerlind
6ae57343f3
Merge pull request #523 from Marwes/refactor_gen
perf(parse_table): Avoid generating unused rows in the GOTO matrix
2020-05-02 00:02:50 +02:00
Markus Westerlind
c5070af2ee perf: Emit the GOTO table as nested matches
Since most of the goto table is elements that will never be hit we can
shrink the binary size by emitting it as nested matches instead
without losing any performance.
2020-05-01 23:38:04 +02:00
Markus Westerlind
688b91930a perf(parse_table): Avoid generating unused rows in the matrix
Only the states in the beginning of a reduction are actually used, the
states for all other rows will never be used (really, no zero elements
will be accessed in the GOTO table so we might be able to do even better
without compromising performance).

By simply reordering the states so that states needed in the GOTO table
occupy the lower indices we can simply avoid generating the remaining
part of the GOTO table.

For the LALRPOP parser itself this is a reduction of about -40% (~100kB)
of the size of the parse tables (not counting the generated code)
2020-04-30 01:15:59 +02:00
Markus Westerlind
cb1924632b refactor: Various simplification in parse_table generation 2020-04-30 01:15:55 +02:00
Markus Westerlind
dd57a2b187
Merge pull request #521 from crlf0710/master
Bump dependency versions.
2020-04-23 15:51:12 +02:00
Markus Westerlind
8d22d77032
Merge pull request #522 from Kingdread/fallible-actions-tutorial
Tutorial: Add a section about fallible actions
2020-04-23 15:50:52 +02:00
Daniel Schadt
5ba76e2587 Add a tutorial site on fallible actions 2020-04-20 12:40:38 +02:00
Daniel Schadt
314ee6afc4 Move sections 7 & 8 one back
This opens up a new section before "Error recovery" to teach about
fallible actions (defined with `=>?`).
2020-04-20 11:40:38 +02:00
Charles Lew
075150bc8e Bump dependency versions. 2020-04-19 13:06:36 +08:00
Markus Westerlind
0d2e5baf7a
Merge pull request #517 from enterprisey/clippy-fix-1
Remove some lifetimes in codegen and clippy fix
2020-04-13 21:49:36 +02:00
Daniel Glus
7796cf881e regenerate lalrpop grammar 2020-03-21 16:49:08 -04:00
Daniel Glus
5247b2512c Remove some lifetimes in codegen and clippy fix 2020-03-18 02:46:15 -04:00
Markus Westerlind
8a96e9646b
Merge pull request #514 from Marwes/fn_mut
Miscanellous cleanup
2020-03-10 19:46:34 +01:00
Markus Westerlind
037a37264c doc: Add the lexer feature to the examples
The lexer feature bled into the examples due to `lalrpop-test` already
specifying it.

Fixes #513
2020-03-10 16:06:15 +01:00
Markus Westerlind
a07f90289f cargo fix --edition --all 2020-03-10 16:00:06 +01:00
Markus Westerlind
165cf03bd1 cargo fmt 2020-03-10 15:56:07 +01:00
Markus Westerlind
8f73c9dcfb feat: Use FnMut/FnOnce in ParseErrors map functions 2020-03-10 15:53:32 +01:00
Markus Westerlind
634efcc3b7
Fix releases.md 2020-03-04 19:53:59 +01:00
Markus Westerlind
bcdfaf6e87
Merge pull request #512 from Marwes/version
Version
2020-03-04 19:53:13 +01:00
Markus Westerlind
dd974b0b62 Version 0.18.1 0.18.1 2020-03-04 17:13:43 +01:00
Markus Westerlind
a9a775ebb8 fix: Remove eprintln which I thought were removed 2020-03-04 17:13:08 +01:00
Markus Westerlind
452e1dc6d4
Merge pull request #511 from Marwes/version
Version 0.18.0
2020-03-04 17:00:32 +01:00
Markus Westerlind
c044587f1d Fix the version in RELEASE.md 0.18.0 2020-03-04 16:45:01 +01:00
Markus Westerlind
648185d3da Mention that the lexer feature is needed 2020-03-04 16:39:59 +01:00
Markus Westerlind
df3f428e37 Version 0.18.0 2020-03-04 16:37:23 +01:00
Markus Westerlind
45ae391f3e Add clog to version updating 2020-03-04 16:37:02 +01:00
Markus Westerlind
723678f364
Merge pull request #509 from Marwes/lexer_comment
feat: Allow the tokenizer to contain custom skip regexes/literals
2020-03-03 21:03:21 +01:00
Markus Westerlind
b22e892fc2 Update lrgrammar 2020-03-03 20:32:05 +01:00
Markus Westerlind
26932e85c0 Lower the required rust version 2020-03-03 20:30:43 +01:00
Markus Westerlind
4447616283 doc: Document lexer skipping 2020-03-03 20:30:43 +01:00
Markus Westerlind
ee2f7060e9 feat: Allow the tokenizer to contain custom skip regexes/literals
cc #14
2020-03-03 20:30:43 +01:00
Markus Westerlind
16194d5719 Update lrgrammar with MatchMapping 2020-03-03 20:30:43 +01:00
Markus Westerlind
a338f4c019
Merge pull request #510 from Marwes/shrink_generated
Improve the generated code slightly
2020-03-03 20:26:15 +01:00
Markus Westerlind
c156b4b2fd feat: states does not need to be passed to reduce actions 2020-03-03 11:14:08 +01:00
Markus Westerlind
f69bce3080 feat: action does not need to be passed to reduce actions 2020-03-03 11:11:14 +01:00
Markus Westerlind
d0a3ccbacc feat: Only generate simulate_reduce if error recovery is used 2020-03-03 11:01:56 +01:00
Markus Westerlind
781c6b4edb refactor: Avoid matching on tokens without contents 2020-03-03 10:54:57 +01:00
Markus Westerlind
65421657bd Remove unnecessary parens 2020-03-03 00:11:23 +01:00