Hi Duncan,

I'm looking for something along the lines of:

String literals are described by the following lexical definitions:
>
> *stringliteral  * ::=  [stringprefix 
> <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-stringprefix>](shortstring
>  
> <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-shortstring>
>  | longstring 
> <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-longstring>)*stringprefix
>    * ::=  "r" | "u" | "R" | "U"*shortstring    * ::=  "'" shortstringitem 
> <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-shortstringitem>*
>  "'" | '"' shortstringitem 
> <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-shortstringitem>*
>  '"'*longstring     * ::=  "'''" longstringitem 
> <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-longstringitem>*
>  "'''" | '"""' longstringitem 
> <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-longstringitem>*
>  '"""'*shortstringitem* ::=  shortstringchar 
> <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-shortstringchar>
>  | stringescapeseq 
> <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-stringescapeseq>*longstringitem
>  * ::=  longstringchar 
> <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-longstringchar>
>  | stringescapeseq 
> <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-stringescapeseq>*shortstringchar*
>  ::=  <any source character except "\" or newline or the 
> quote>*longstringchar * ::=  <any source character except 
> "\">*stringescapeseq* ::=  "\" <any source character>
>
>
 That's from the Python's Language Reference that I just shared.

Reply via email to