Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #24 from ehuss/resources
Browse files Browse the repository at this point in the history
Add resources page with links.
  • Loading branch information
Centril authored Jan 24, 2019
2 parents 040f030 + 2de4ba5 commit c32db23
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 35 additions & 0 deletions misc/resources.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c32db23

Please sign in to comment.