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

Specification and Grammar incomplete with regards to lexing rules #24272

Closed
bruno-medeiros opened this issue Apr 10, 2015 · 4 comments
Closed

Comments

@bruno-medeiros
Copy link

Both the reference (http://doc.rust-lang.org/reference.html#lexical-structure) and the grammar reference (http://doc.rust-lang.org/grammar.html#lexical-structure) are very incomplete with regards to the lexing rules. For example:

  • lifetimes token not documented
  • attributes token not documented
  • character/string literal token rules are incomplete, they do not seem to specify the b/br# prefixes for character and string literals.

I'm writing a lexer for an IDE (to do syntax highlighting), and since I'm not yet familar with Rust itself, this makes my life a bit harder...

@steveklabnik
Copy link
Member

Yup, we'd love to get this filled out.

@fhahn
Copy link
Contributor

fhahn commented Apr 10, 2015

@bruno-medeiros there exists an Antler lexer, which only differs from the Rust lexer slightly, maybe this could help.

@bruno-medeiros
Copy link
Author

there exists an Antler lexer, which only differs from the Rust lexer slightly, maybe this could help.

Yeah it does. Another user had also directed me to that.

Hum, and I also just realized the Attribute rule is not a token, but a grammar rule...

@steveklabnik
Copy link
Member

I'm going to close this in favor of #30942, which is more general.

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

No branches or pull requests

3 participants