From 4e1237078521a9727b0339af6be16cffea908782 Mon Sep 17 00:00:00 2001 From: ferraith Date: Sun, 29 Jul 2018 14:07:59 +0200 Subject: [PATCH 1/4] Moved unittests from test to tests folder --- {test => tests}/resources/distributed/CommonTerminals.g4 | 0 {test => tests}/resources/distributed/SharedRules.g4 | 0 {test => tests}/resources/distributed/SomeGrammar.g4 | 0 {test => tests}/resources/incomplete/SharedRules.g4 | 0 {test => tests}/resources/incomplete/SomeGrammar.g4 | 0 {test => tests}/resources/standalone/SomeGrammar.g4 | 0 {test => tests}/test_command.py | 0 {test => tests}/test_util.py | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename {test => tests}/resources/distributed/CommonTerminals.g4 (100%) rename {test => tests}/resources/distributed/SharedRules.g4 (100%) rename {test => tests}/resources/distributed/SomeGrammar.g4 (100%) rename {test => tests}/resources/incomplete/SharedRules.g4 (100%) rename {test => tests}/resources/incomplete/SomeGrammar.g4 (100%) rename {test => tests}/resources/standalone/SomeGrammar.g4 (100%) rename {test => tests}/test_command.py (100%) rename {test => tests}/test_util.py (100%) diff --git a/test/resources/distributed/CommonTerminals.g4 b/tests/resources/distributed/CommonTerminals.g4 similarity index 100% rename from test/resources/distributed/CommonTerminals.g4 rename to tests/resources/distributed/CommonTerminals.g4 diff --git a/test/resources/distributed/SharedRules.g4 b/tests/resources/distributed/SharedRules.g4 similarity index 100% rename from test/resources/distributed/SharedRules.g4 rename to tests/resources/distributed/SharedRules.g4 diff --git a/test/resources/distributed/SomeGrammar.g4 b/tests/resources/distributed/SomeGrammar.g4 similarity index 100% rename from test/resources/distributed/SomeGrammar.g4 rename to tests/resources/distributed/SomeGrammar.g4 diff --git a/test/resources/incomplete/SharedRules.g4 b/tests/resources/incomplete/SharedRules.g4 similarity index 100% rename from test/resources/incomplete/SharedRules.g4 rename to tests/resources/incomplete/SharedRules.g4 diff --git a/test/resources/incomplete/SomeGrammar.g4 b/tests/resources/incomplete/SomeGrammar.g4 similarity index 100% rename from test/resources/incomplete/SomeGrammar.g4 rename to tests/resources/incomplete/SomeGrammar.g4 diff --git a/test/resources/standalone/SomeGrammar.g4 b/tests/resources/standalone/SomeGrammar.g4 similarity index 100% rename from test/resources/standalone/SomeGrammar.g4 rename to tests/resources/standalone/SomeGrammar.g4 diff --git a/test/test_command.py b/tests/test_command.py similarity index 100% rename from test/test_command.py rename to tests/test_command.py diff --git a/test/test_util.py b/tests/test_util.py similarity index 100% rename from test/test_util.py rename to tests/test_util.py From 1ef3d9fa8e79fd4da16924d9861896bdcd45460b Mon Sep 17 00:00:00 2001 From: ferraith Date: Sun, 29 Jul 2018 14:09:26 +0200 Subject: [PATCH 2/4] Moved foobar example to samples folders --- README.rst | 6 +++--- {example => samples/foobar}/foobar/__init__.py | 0 {example => samples/foobar}/foobar/dsl/Bar.g4 | 0 {example => samples/foobar}/foobar/dsl/Foo.g4 | 0 {example => samples/foobar}/foobar/dsl/common/Terminals.g4 | 0 {example => samples/foobar}/foobar/frontend/__init__.py | 0 {example => samples/foobar}/foobar/frontend/foobar.py | 0 {example => samples/foobar}/setup.cfg | 0 {example => samples/foobar}/setup.py | 0 9 files changed, 3 insertions(+), 3 deletions(-) rename {example => samples/foobar}/foobar/__init__.py (100%) rename {example => samples/foobar}/foobar/dsl/Bar.g4 (100%) rename {example => samples/foobar}/foobar/dsl/Foo.g4 (100%) rename {example => samples/foobar}/foobar/dsl/common/Terminals.g4 (100%) rename {example => samples/foobar}/foobar/frontend/__init__.py (100%) rename {example => samples/foobar}/foobar/frontend/foobar.py (100%) rename {example => samples/foobar}/setup.cfg (100%) rename {example => samples/foobar}/setup.py (100%) diff --git a/README.rst b/README.rst index a277c74..beef7bf 100644 --- a/README.rst +++ b/README.rst @@ -177,10 +177,10 @@ Apart from passing options on the command line it's also possible to add a dedic A reference configuration is provided in the ``resources`` directory. -Example -******* +Sample +****** -Alongside the ``setuptools-antlr`` source code a example project called ``foobar`` is provided in the ``example`` directory. This example consists of the two ANTLR grammars ``Foo`` and ``Bar``. During the execution of ``setuptools-antlr`` two Python packages will be generated into the ``foobar`` package directory containing a parser for each grammar. +Alongside the ``setuptools-antlr`` source code a sample project called ``foobar`` is provided in the ``samples`` directory. This sample consists of the two ANTLR grammars ``Foo`` and ``Bar``. During the execution of ``setuptools-antlr`` two Python packages will be generated into the ``foobar`` package directory containing a parser for each grammar. To generate parsers for both grammars and build a ``foobar`` wheel package execute the following command: diff --git a/example/foobar/__init__.py b/samples/foobar/foobar/__init__.py similarity index 100% rename from example/foobar/__init__.py rename to samples/foobar/foobar/__init__.py diff --git a/example/foobar/dsl/Bar.g4 b/samples/foobar/foobar/dsl/Bar.g4 similarity index 100% rename from example/foobar/dsl/Bar.g4 rename to samples/foobar/foobar/dsl/Bar.g4 diff --git a/example/foobar/dsl/Foo.g4 b/samples/foobar/foobar/dsl/Foo.g4 similarity index 100% rename from example/foobar/dsl/Foo.g4 rename to samples/foobar/foobar/dsl/Foo.g4 diff --git a/example/foobar/dsl/common/Terminals.g4 b/samples/foobar/foobar/dsl/common/Terminals.g4 similarity index 100% rename from example/foobar/dsl/common/Terminals.g4 rename to samples/foobar/foobar/dsl/common/Terminals.g4 diff --git a/example/foobar/frontend/__init__.py b/samples/foobar/foobar/frontend/__init__.py similarity index 100% rename from example/foobar/frontend/__init__.py rename to samples/foobar/foobar/frontend/__init__.py diff --git a/example/foobar/frontend/foobar.py b/samples/foobar/foobar/frontend/foobar.py similarity index 100% rename from example/foobar/frontend/foobar.py rename to samples/foobar/foobar/frontend/foobar.py diff --git a/example/setup.cfg b/samples/foobar/setup.cfg similarity index 100% rename from example/setup.cfg rename to samples/foobar/setup.cfg diff --git a/example/setup.py b/samples/foobar/setup.py similarity index 100% rename from example/setup.py rename to samples/foobar/setup.py From 67daede21ba3ca7bbcb6ae6b8928521668190589 Mon Sep 17 00:00:00 2001 From: ferraith Date: Sun, 29 Jul 2018 14:23:32 +0200 Subject: [PATCH 3/4] Fixed path to foobar sample --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d567545..c0d4185 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,8 @@ install: script: # run unit tests - python setup.py test --addopts "--cov=setuptools_antlr --cov-report html" - # build example project - - pushd example + # build foobar sample project + - pushd samples/foobar - python setup.py antlr bdist_wheel - popd From 4c6ac07f0304f9537493bd61ff3c99f892be038a Mon Sep 17 00:00:00 2001 From: ferraith Date: Sun, 29 Jul 2018 14:24:06 +0200 Subject: [PATCH 4/4] Added changes in 0.2.2 and 0.3.0 releases --- CHANGELOG.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecaee3f..3cf2418 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.3.0] - 2018-07-29 +### Changed +- Folder structure of project. +### Removed +- Filtering of root-level grammars. + +## [0.2.2] - 2018-07-25 +### Fixed +- Faulty detection of grammar rule as import statement. + ## [0.2.1] - 2018-06-15 ### Fixed - Faulty detection of import statements. @@ -14,6 +24,8 @@ adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ### Changed - Use package source directory as default output directory. -[Unreleased]: https://github.com/ferraith/setuptools-antlr/compare/0.2.1...HEAD +[Unreleased]: https://github.com/ferraith/setuptools-antlr/compare/0.3.0...HEAD +[0.3.0]: https://github.com/ferraith/setuptools-antlr/compare/0.2.2...0.3.0 +[0.2.2]: https://github.com/ferraith/setuptools-antlr/compare/0.2.1...0.2.2 [0.2.1]: https://github.com/ferraith/setuptools-antlr/compare/0.2.0...0.2.1 [0.2.0]: https://github.com/ferraith/setuptools-antlr/compare/0.1.2...0.2.0