summaryrefslogtreecommitdiff
path: root/CHANGES
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2015-04-24 13:06:34 -0500
committerDavid Beazley <dave@dabeaz.com>2015-04-24 13:06:34 -0500
commitdaa1160e3b7e7bd94dc06da9e11ce9e188406fda (patch)
tree2c46c324aa4ddecbf9ff7b1fc7b891e10e7a0cdf /CHANGES
parentcbea715bef497c3f1ecccf3be00c63755c6a5f2e (diff)
downloadply-daa1160e3b7e7bd94dc06da9e11ce9e188406fda.tar.gz
Further refinement of table handling with packages. More unit tests.
Diffstat (limited to 'CHANGES')
-rw-r--r--CHANGES28
1 files changed, 19 insertions, 9 deletions
diff --git a/CHANGES b/CHANGES
index 08e4876..3dcdef9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,18 +1,28 @@
Version 3.6
---------------------
04/24/15: beazley
- Fixed some problems related to use of packages and table file
- modules. Just to emphasize, if you use a command such as this:
+ Fixed some issues related to use of packages and table file
+ modules. Just to emphasize, PLY now generates its special
+ files such as 'parsetab.py' and 'lextab.py' in the *SAME*
+ directory as the source file that uses lex() and yacc().
- # lexer.py
- parser = yacc.yacc(tabmodule='foo.bar.parsetab')
+ If for some reason, you want to change the name of the table
+ module, use the tabmodule and lextab options:
- You need to make sure that the file 'lexer.py' is located at
- foo/bar/lexer.py. If this is not the same location, then
- you need to also include the outputdir option
+ lexer = lex.lex(lextab='spamlextab')
+ parser = yacc.yacc(tabmodule='spamparsetab')
- parse = yacc.yacc(tabmodule='foo.bar.parsetab',
- outputdir='foo/bar')
+ If you specify a simple name as shown, the module will still be
+ created in the same directory as the file invoking lex() or yacc().
+ If you want the table files to be placed into a different package,
+ then give a fully qualified package name. For example:
+
+ lexer = lex.lex(lextab='pkgname.files.lextab')
+ parser = yacc.yacc(tabmodule='pkgname.files.parsetab')
+
+ For this to work, 'pkgname.files' must already exist as a valid
+ Python package (i.e., the directories must already exist and be
+ set up with the proper __init__.py files, etc.).
Version 3.5
---------------------