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 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 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 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