An ANTLR4 grammar for Python 3 based on version 3.6 of The Python Language Reference.
This grammar has been tested against the Python 3's standard library, the contents of the asyncio folder there is included in the examples section.
Note that there are two grammars here, one for Java and other for Python3 target. Target of grammars are mentioned at the top of the grammar. This grammar contains embedded code that handles the insertion of INDENT and DEDENT tokens. The embedded code, located inside the NEWLINE lexer rule as well as the @lexer::members section is well documented, so people trying to port this grammar to another target should not have much difficulty.
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/c6be2109-e82d-407f-ac9e-6a3bdb5c1b5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
this is a correct function of ANTL4, the grammar is not written as a target independent.There is simply hardcoded java in the grammar. This sections are not translated and are used as is.
The doc probably refers to some other file.