rust-lang / wg-grammar

Where the work of WG-grammar, aiming to provide a canonical grammar for Rust, resides
Apache License 2.0
99 stars 20 forks source link

Bridging to the reference #7

Open ehuss opened 6 years ago

ehuss commented 6 years ago

How will the grammar be used with the reference?

The reference has a nearly complete grammar now, but it is in an ad-hoc language, isn't testable, and its goals are different from the grammar for this group. This is an open-ended issue to brainstorm how the two can relate.

I'll spew some thoughts I have related to this:

I'd be fine with maintaining manual translations if necessary. Perhaps this issue will become clearer once the wg has made some progress.

I posted a similar issue at https://github.com/rust-lang-nursery/reference/issues/443.

ehuss commented 6 years ago

@Centril corrected some of my misunderstanding here. However, I think the general concern still stands. Many language specs include a simple, textual grammar without precedence or disambiguation. In my experience, grammars that include these rules can be quite difficult to follow.