On Thu, Apr 25, 2013 at 1:25 AM, Patrick Walton <pwal...@mozilla.com> wrote:
> I have an untested grammar for Rust here,
> with the token regexes not yet filled in:
>
> https://gist.github.com/anonymous/5457664
>
> yapps2 reports that this grammar is LL(1).
>
> Note that the refactorings I made resulted in a grammar which isn't that
> great for tooling or parsing in many places. In particular the contortions
> needed to make `self_ty_and_maybenamed_args` result in an AST that combines
> the self type and the type of the first argument together in bizarre ways.
>
> Since this is untested, I'm sure there are bugs, but it's probably a good
> sign that I could at least refactor the grammar to what I think is LL(1).

This is really cool, but I'm sort of confused about the apparent
multiple ongoing efforts toward having a precise and machine-readable
Rust grammar.  Should we consider one of these the "real" grammar?

Lindsey
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to