996 Commits

Author SHA1 Message Date
Markus Westerlind
e5f2897aee Merge the public parsers in lrgrammar to one
This shrinks the generated code to 1Mb (from 2Mb WITH the cfg approach
in #413) while also removing the cfg'ing itself as that barely reduces the
size. (Thus this supersedes #413)

While this is a bit boilerplatey, I'd say it is worthile. We could
generate this in LALRPOP itself with some work
https://github.com/lalrpop/lalrpop/issues/304#issuecomment-431654594
2018-10-21 14:24:06 +02:00
Markus Westerlind
af12168773 Enable auto behavior for line endings in .gitattributes
Thought this was automatic but apparently not?
2018-10-21 14:23:44 +02:00
Markus Westerlind
15ba78f4ba Fix features and out-dir on the command line 2018-10-21 14:22:00 +02:00
Markus Westerlind
06967722a6 Ensure a consistent hash for lrgrammar.lalrpop 2018-10-21 14:22:00 +02:00
Markus Westerlind
a068fa3537 Avoid printing the entire diff if there are lots of lines 2018-10-21 14:22:00 +02:00
Markus Westerlind
66158dada1 Print out the first N lines that mismatched in the snapshot. 2018-10-21 14:22:00 +02:00
Markus Westerlind
c8df49872d feat: Allow setting features from the commandline 2018-10-21 14:22:00 +02:00
Markus Westerlind
3ff1b4c45f feat: Don't depend on lalrpop-snap to compile lalrpop
To recompile the snapshot we can now pass the snapshot feature instead
of copying over to the (now removed) lalrpop-snap directory
2018-10-21 14:22:00 +02:00
Markus Westerlind
9c26e5177e feat: Allow setting out_dir on the command line 2018-10-21 14:22:00 +02:00
Markus Westerlind
82aa6387bd Remove lalrpop-snap 2018-10-21 14:22:00 +02:00
Markus Westerlind
8df24776b1 Save the generated lrgrammar.rs file in the repo 2018-10-21 14:21:59 +02:00
Markus Westerlind
3e0624c90a Conditional doc 2018-10-21 14:21:41 +02:00
Markus Westerlind
e6b6a07fd6 feat: Let parse rules be conditionally compiled
Only public items can be conditionally compiled as those are the ones that affect the generated code.
2018-10-21 14:21:41 +02:00
Markus Westerlind
fa5a4ae4a3 Update lalrpop-snap 2018-10-21 14:21:40 +02:00
Markus Westerlind
89e809e408 Format files that werenÃ't formatted 2018-10-21 14:21:04 +02:00
Markus Westerlind
5800a234ce
Merge pull request #410 from Marwes/fmt
Run rustfmt
2018-10-16 22:17:10 +02:00
Markus Westerlind
ccd964cb1b Run rustfmt 2018-10-16 20:52:05 +02:00
Markus Westerlind
8149c6aadd
Merge pull request #406 from jimblandy/string-escapes
Process escape sequences in string literals appearing as terminals.
2018-10-16 20:49:57 +02:00
Jim Blandy
bfa33d2fb3 Recognize '\r' as an escape in string literals.
This brings LALRPOP's set of escape sequences into parity with Rust's.
2018-10-13 17:02:03 -07:00
Jim Blandy
e915302bbf Process escape sequences in string literals appearing as terminals.
The "\\" and "\"" escapes are necessary to make it possible to put arbitrary
text in a string literal at all. We have to support "\t" and "\n" to compile
the `whitespace` example from the book. But the other Rust escape sequences like
"\u{2a}" don't really seem necessary.
2018-09-21 16:32:36 -07:00
Jim Blandy
04c40f58dc Fix typos in comments. 2018-09-21 16:07:30 -07:00
dylan_DPC
d673c84fb7 other 0.15.2 -> 0.16.0 change 0.16.0 2018-09-04 00:03:04 +05:30
dylan_DPC
b15fedcfd9 bumped version
update release docs
2018-09-03 21:26:35 +05:30
dylan_DPC
167d50ac24 bump petgraph to 0.4.13 2018-09-01 02:13:12 +05:30
Markus Westerlind
dc42bff787
Merge pull request #399 from Marwes/issue_394
fix: Don't generate reduce actions which do not fit in the integer size
2018-08-29 19:08:35 +02:00
Markus Westerlind
947765ef59 fix: Don't generate reduce actions which do not fit in the integer size 2018-08-29 08:42:01 +02:00
Markus Westerlind
1eac726aad
Merge pull request #398 from Marwes/attribute_lalrpop_mod
feat: Allow attributes to be specified in lalrpop_mod!
2018-08-29 08:41:21 +02:00
Markus Westerlind
bfa20cd896 Fix travis by updating minimum rustc and doing cargo update 2018-08-29 00:04:57 +02:00
Markus Westerlind
1cc15c2088 feat: Allow attributes to be specified in lalrpop_mod!
Seems to be intentional that attributes on the macro invocation does not
work so we instead allow attributes inside it.

https://github.com/rust-lang/rust/issues/28284
2018-08-27 23:58:58 +02:00
Markus Westerlind
b87e606372
Merge pull request #385 from snsmac/regex_syntax_0.6
Update regex_syntax to 0.6.0
2018-07-01 21:14:10 +02:00
jr
0e6611928a Remove comment at wrong position 2018-06-21 00:16:46 +02:00
jr
567973afd0 Fix compilation for 1.20 2018-06-20 23:58:02 +02:00
jr
737d4d1b41 Update regex_syntax to 0.6.0 2018-06-20 21:46:13 +02:00
Markus Westerlind
b01b032622
Merge pull request #375 from Marwes/regex
feat: Update to regex 1.0
2018-06-05 11:02:55 +02:00
Markus Westerlind
5766e5f3c2
Merge pull request #353 from ayosec/outdir-280
Generate files in OUT_DIR
2018-06-05 10:54:47 +02:00
Ayose
c200f10ad8 Remove dead code for unused attribute 2018-06-01 02:13:42 +01:00
Ayose
f937d812c6 Return an error when OUT_DIR is not available 2018-06-01 02:13:42 +01:00
Ayose
2060b3e085 Remove unnecessary entries in .gitignore 2018-06-01 02:13:42 +01:00
Ayose
6469cde9af Define public modules in lalrpop_mod macro 2018-06-01 02:13:14 +01:00
Ayose
fb6f9d796f Ignore example in the documentation of the lalrpop_mod macro 2018-06-01 02:13:14 +01:00
Ayose
bdea00f436 Update the book with the changes on the generate file paths 2018-06-01 02:13:14 +01:00
Ayose
4640004b92 Explanation of the lalrpop_mod macro 2018-06-01 02:13:14 +01:00
Ayose
7dc816b98c Option to keep output files in source tree 2018-06-01 02:13:14 +01:00
Ayose
e7db1ee2e2 Generate files in OUT_DIR by default
The macro lalrpop_mod! can be used to define the mod with the generated code.
2018-06-01 02:13:14 +01:00
Christoph Hegemann
867938d6ee Typo fix in tutorial 2018-05-22 14:19:01 +05:30
Markus Westerlind
139a767c18 Update to regex 1.0 2018-05-08 21:22:33 +02:00
Markus Westerlind
0e48a4f178
Merge pull request #374 from Eijebong/atty
Update atty to 0.2, bit-set to 0.5 and ena to 0.9
2018-05-07 20:18:48 +02:00
Bastien Orivel
b1954a2453 Update ena to 0.9 2018-05-07 18:23:32 +02:00
Bastien Orivel
1e55bfac8b Update bit-set to 0.5 2018-05-07 18:12:07 +02:00
Bastien Orivel
fffa5ca306 Update atty to 0.2 2018-05-07 18:00:09 +02:00