From 2de4ba558f822f6159a928a4c04eb6ab26240550 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 23 Jan 2019 16:26:58 -0800 Subject: [PATCH] Add resources page with links. --- README.md | 4 ++++ misc/resources.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 misc/resources.md diff --git a/README.md b/README.md index 6e3ef06..a03156a 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ the Rust language. The primary audiences for the grammar are: The grammar tools produced here are not intended to be used directly within rustc, or any other existing tools. +## Links +- [Meeting notes](misc/meeting-notes.md) +- [Resources](misc/resources.md) + ## License Licensed under either of diff --git a/misc/resources.md b/misc/resources.md new file mode 100644 index 0000000..a1db1cc --- /dev/null +++ b/misc/resources.md @@ -0,0 +1,35 @@ +# Resources + +This is a collection of various resources that may be helpful to anyone +looking at or working on the grammar. + +## Previous/Existing Grammars and Parsers +- The truth: https://github.com/rust-lang/rust/tree/master/src/libsyntax +- The reference: https://github.com/rust-lang-nursery/reference/ +- The old grammar: https://doc.rust-lang.org/nightly/grammar.html ([src](https://github.com/rust-lang/rust/blob/master/src/doc/grammar.md)) +- The old ANTLR grammar ([removed](https://github.com/rust-lang/rust/pull/41705)): https://github.com/rust-lang/rust/tree/12e76e24cc1466ffb2bd37cc7652a6dd7ba15735/src/grammar +- Old flex/bison grammar ([outdated](https://github.com/rust-lang/rust/issues/32723)): https://github.com/rust-lang/rust/tree/master/src/grammar +- Intellij's parser: https://github.com/intellij-rust/intellij-rust/blob/master/src/main/grammars/RustParser.bnf +- jorendorff's ANTLR grammar: https://github.com/jorendorff/rust-grammar/ +- Niko's rustypop: https://github.com/nikomatsakis/rustypop +- Haskell parser: https://github.com/harpocrates/language-rust/blob/master/src/Language/Rust/Parser/Internal.y + +## Grammar RFC +The call to canonicalize the grammar. + +- RFC: https://github.com/rust-lang/rfcs/blob/master/text/1331-grammar-is-canonical.md +- RFC tracker: https://github.com/rust-lang/rust/issues/30942 +- Original RFC discussion with interesting stuff: https://github.com/rust-lang/rfcs/pull/1331 + +## New Rust Parsing Projects +- Parser used here: https://github.com/rust-lang-nursery/gll + (Forked from https://github.com/lykenware/gll/) +- Lossless syntax tree: https://github.com/matklad/rowan/ +- New front-end rust parser: https://github.com/matklad/rust-analyzer/ + +## Testing +Some other test suites for Rust parsing. + +- https://github.com/brson/ctrs +- The old grammar bot: https://github.com/rust-lang/rust/issues/28592 +- Intellij's test suite: https://github.com/intellij-rust/intellij-rust/tree/master/src/test/resources/org/rust/lang/core/parser/fixtures