The following notations are used by the Lexer and Syntax grammar snippets:
|CAPITAL||KW_IF, INTEGER_LITERAL||A token produced by the lexer|
|ItalicCamelCase||LetStatement, Item||A syntactical production|
||The exact character(s)|
|\x||\n, \r, \t, \0||The character represented by this escape|
||An optional item|
|x*||OuterAttribute*||0 or more of x|
|x+||MacroMatch+||1 or more of x|
|xa..b||HEX_DIGIT1..6||a to b repetitions of x|
||Either one or another|
||Any of the characters listed|
|[ - ]||[
||Any of the characters in the range|
||Any characters, except those listed|
||Any characters, except this sequence|
Some rules in the grammar — notably unary operators, binary operators, and keywords — are given in a simplified form: as a listing of printable strings. These cases form a subset of the rules regarding the token rule, and are assumed to be the result of a lexical-analysis phase feeding the parser, driven by a DFA, operating over the disjunction of all such string table entries.
When such a string in
monospace font occurs inside the grammar, it is an implicit reference to a single member of such a string table production. See tokens for more information.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.