1*16467b97STreehugger Robot1) ABOUT 2*16467b97STreehugger Robot======== 3*16467b97STreehugger Robot 4*16467b97STreehugger RobotThis is the Python3 package 'antlr3', which is required to use parsers created 5*16467b97STreehugger Robotby the ANTLR3 tool. See <http://www.antlr.org/> for more information about 6*16467b97STreehugger RobotANTLR3. 7*16467b97STreehugger Robot 8*16467b97STreehugger Robot 9*16467b97STreehugger Robot2) STATUS 10*16467b97STreehugger Robot========= 11*16467b97STreehugger Robot 12*16467b97STreehugger RobotThe Python3 target for ANTLR3 is still in beta. Documentation is lacking, some 13*16467b97STreehugger Robotbits of the code is not yet done, some functionality has not been tested yet. 14*16467b97STreehugger RobotAlso the API might change a bit - it currently mimics the Java implementation, 15*16467b97STreehugger Robotbut it may be made a bit more pythonic here and there. 16*16467b97STreehugger Robot 17*16467b97STreehugger RobotWARNING: The runtime library is not compatible with recognizers generated by 18*16467b97STreehugger RobotANTLR versions preceding V3.4.x. If you are an application developer, 19*16467b97STreehugger Robotthen the suggested way to solve this is to package the correct runtime with 20*16467b97STreehugger Robotyour application. Installing the runtime in the global site-packages directory 21*16467b97STreehugger Robotmay not be a good idea. 22*16467b97STreehugger RobotSorry for the inconvenience. 23*16467b97STreehugger Robot 24*16467b97STreehugger Robot 25*16467b97STreehugger Robot3) DOWNLOAD 26*16467b97STreehugger Robot=========== 27*16467b97STreehugger Robot 28*16467b97STreehugger RobotThis runtime is part of the ANTLR distribution. The latest version can be found 29*16467b97STreehugger Robotat <http://www.antlr.org/download.html>. 30*16467b97STreehugger Robot 31*16467b97STreehugger RobotIf you are interested in the latest, most bleeding edge version, have a look at 32*16467b97STreehugger Robotthe git repository at <http://github.com/antlr/antlr3>. 33*16467b97STreehugger Robot 34*16467b97STreehugger Robot 35*16467b97STreehugger Robot4) INSTALLATION 36*16467b97STreehugger Robot=============== 37*16467b97STreehugger Robot 38*16467b97STreehugger RobotJust like any other Python package: 39*16467b97STreehugger Robot$ python3 setup.py install 40*16467b97STreehugger Robot 41*16467b97STreehugger RobotSee <http://docs.python.org/inst/> for more information. 42*16467b97STreehugger Robot 43*16467b97STreehugger RobotIf this fails due to an obscure setuptools error, you may need a newer bootstrap 44*16467b97STreehugger Robotscript (ez_setup.py): see <https://pypi.python.org/pypi/setuptools/> for full 45*16467b97STreehugger Robotsetuptools installation instructions, or simply download the given ez_setup.py 46*16467b97STreehugger Robotscript, place it in this folder, and run the above setup.py command. 47*16467b97STreehugger Robot 48*16467b97STreehugger Robot 49*16467b97STreehugger Robot5) DOCUMENTATION 50*16467b97STreehugger Robot================ 51*16467b97STreehugger Robot 52*16467b97STreehugger RobotDocumentation (as far as it exists) can be found in the wiki 53*16467b97STreehugger Robot<http://www.antlr.org/wiki/display/ANTLR3/Antlr3Python3Target> 54*16467b97STreehugger Robot 55*16467b97STreehugger Robot 56*16467b97STreehugger Robot6) REPORTING BUGS 57*16467b97STreehugger Robot================= 58*16467b97STreehugger Robot 59*16467b97STreehugger RobotPlease file bug reports on github: <http://github.com/antlr/antlr3>. 60*16467b97STreehugger Robot 61*16467b97STreehugger Robot 62*16467b97STreehugger Robot7) HACKING 63*16467b97STreehugger Robot========== 64*16467b97STreehugger Robot 65*16467b97STreehugger RobotOnly the runtime package can be found here. There are also some StringTemplate 66*16467b97STreehugger Robotfiles in 'src/org/antlr/codegen/templates/Python3/' and some Java code in 67*16467b97STreehugger Robot'src/org/antlr/codegen/Python3Target.java' (of the main ANTLR3 source 68*16467b97STreehugger Robotdistribution). 69*16467b97STreehugger Robot 70*16467b97STreehugger RobotIf there are no directories 'tests' and 'unittests' in 'runtime/Python3', you 71*16467b97STreehugger Robotshould fetch the latest ANTLR3 version from the perforce depot. See section 72*16467b97STreehugger RobotDOWNLOAD. 73*16467b97STreehugger RobotYou'll need java and ant in order to compile and use the tool. 74*16467b97STreehugger RobotBe sure to properly setup your CLASSPATH. 75*16467b97STreehugger Robot(FIXME: is there some generic information, how to build it yourself? I should 76*16467b97STreehugger Robotpoint to it to avoid duplication.) 77*16467b97STreehugger Robot 78*16467b97STreehugger RobotYou can then use the commands 79*16467b97STreehugger Robot$ python3 setup.py unittest 80*16467b97STreehugger Robot$ python3 setup.py functest 81*16467b97STreehugger Robotto ensure that changes do not break existing behaviour. 82*16467b97STreehugger Robot 83*16467b97STreehugger RobotPlease send patches as pull requests on github. For larger code contributions 84*16467b97STreehugger Robotyou'll have to sign the "Developer's Certificate of Origin", which can be 85*16467b97STreehugger Robotfound on <http://www.antlr.org/license.html> or use the feedback form at 86*16467b97STreehugger Robot<http://www.antlr.org/misc/feedback>. 87