Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the bison grammar for various language changes and fixes #25337

Merged
merged 1 commit into from
May 19, 2015

Conversation

bleibig
Copy link
Contributor

@bleibig bleibig commented May 12, 2015

  • Correctly lex CRLF in string literals
  • Update extern CRATE as NAME syntax
  • Allow leading :: in view paths
  • Allow TySums in type ascriptions and impls
  • Allow macros to have visibility and attributes
  • Update syntax for qualified path types and expressions
  • Allow block expressions to be called () and indexed []

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@nikomatsakis
Copy link
Contributor

Do we have a testing mechanism for this grammar? I seem to recall we added one recently. @brson?

@nikomatsakis
Copy link
Contributor

So, the changes themselves look good, but I'd love to see test cases! I see that there is a src/test/grammar directory, but I've not tried running it myself.

/me goes off to investigate a bit

@bleibig
Copy link
Contributor Author

bleibig commented May 12, 2015

You can run make check-grammar and that should build the parser and run it against all the rust source files in the compiler and test directories. There's some issues where it is testing files that are not expected to parse, but the idea is that the generated parser should accept any file that also passes rustc -Z parse-only.

@nikomatsakis
Copy link
Contributor

@bors rollup r+

ok. well, these changes seem good. we should figure out a better testing situation though.

@bors
Copy link
Contributor

bors commented May 18, 2015

📌 Commit 568d7f1 has been approved by nikomatsakis

steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 18, 2015
* Correctly lex CRLF in string literals
* Update `extern CRATE as NAME` syntax
* Allow leading `::` in view paths
* Allow TySums in type ascriptions and impls
* Allow macros to have visibility and attributes
* Update syntax for qualified path types and expressions
* Allow block expressions to be called () and indexed []
bors added a commit that referenced this pull request May 18, 2015
* Correctly lex CRLF in string literals
* Update `extern CRATE as NAME` syntax
* Allow leading `::` in view paths
* Allow TySums in type ascriptions and impls
* Allow macros to have visibility and attributes
* Update syntax for qualified path types and expressions
* Allow block expressions to be called () and indexed []
@bors
Copy link
Contributor

bors commented May 18, 2015

⌛ Testing commit 568d7f1 with merge 2e7d7bc...

@bors bors merged commit 568d7f1 into rust-lang:master May 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants