You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The UTF8BOM/SHEBANG definition is floating in a chapter outside of the Lexical chapter. I think it is relevant to lexing, so it should be somehow incorporated in the Lexical chapter. (Not sure how, probably need to rearrange things a little.) Input format #1459
I think there should be an appendix consolidating all the Lexer rules blocks. This should be generated automatically.
The "input format" subchapter is almost completely useless, and could be moved somewhere else. Input format #1459
There should be a note about token ambiguity (this can be relatively brief, but should be mentioned). This depends on the lexer/parser implementation. rustc works by splitting tokens into smaller parts. The proc_macro parser works by only issuing the smaller tokens, and using the Spacing to determine if they should be combined later on. The tokens that I'm aware of that cause this issue are:
The lexical specification needs some cleanup and organization. Some things I can think of:
+=
+
=
&&
&
&
||
|
|
<<
<
<
<-
<
-
>>
>
>
>>=
>
>=
>=
>
=
+=
+
=
See also:
rust-lang/wg-grammar#3
https://internals.rust-lang.org/t/pre-pre-rfc-canonical-lexer-specification/4099
The text was updated successfully, but these errors were encountered: