Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo #42

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: python
python:
- '3.5'
- '3.6'
- '3.7'

install:
- python -m pip install -U pip setuptools
Expand Down Expand Up @@ -34,7 +35,7 @@ deploy:
on:
repo: ferraith/setuptools-antlr
tags: true
python: '3.6'
python: '3.7'

- provider: pypi
user: ferraith
Expand All @@ -46,4 +47,4 @@ deploy:
on:
repo: ferraith/setuptools-antlr
tags: true
python: '3.6'
python: '3.7'
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Python 3.7 support

## [0.3.0] - 2018-07-29
### Changed
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A ``setuptools`` command for generating ANTLR based parsers.

This is an extension for `setuptools <https://pypi.org/project/setuptools/>`__ integrating the famous `ANTLR <http://www.antlr.org/>`__ parser generator into the Python packaging process. It encapsulates the Java based generator of ANTLR and provides the user a single command to control the generation process.

All command line options of ANTLR are also available through the setuptools command. The user have the choice to pass the options on the command line or configure ANTLR in a dedicated section in the ``setup.cfg`` file.
All command line options of ANTLR are also available through the setuptools command. The user has the choice to pass the options on the command line or configure ANTLR in a dedicated section in the ``setup.cfg`` file.

ANTLR grammars and its dependencies like imported grammars or token files are automatically detected. For each grammar a Python package will be generated during execution of the ``antlr`` command.

Expand All @@ -40,7 +40,7 @@ Installation
``setuptools-antlr`` can be installed in various ways. To run it the following prerequisites have to be fulfilled:

- Python 3.5+
- setuptools 29.0.0+
- setuptools
- Java JRE 1.7+

The source distribution is already shipped with ANTLR 4.7.1. It isn't necessary to download ANTLR additionally.
Expand Down Expand Up @@ -180,7 +180,7 @@ A reference configuration is provided in the ``resources`` directory.
Sample
******

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.
Besides 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:

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
'Programming Language :: Python :: 3.7'
]
)
7 changes: 3 additions & 4 deletions setuptools_antlr/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ class AntlrCommand(setuptools.Command):

An extra command for setuptools to generate ANTLR based parsers, lexers, listeners and visitors.
The antlr command wraps the Java based generator provided by ANTLR developers. It searches for
all grammar files and generates a Python package containing a modules specified in the user
options. Please keep in mind that only grammars are generated which aren't included by other
grammars. This prevents generation of shared content like common terminals.
all grammar files. For each grammar a Python package is generated containing the modules
specified in the user options.

:cvar _MIN_JAVA_VERSION: Minimal version of java required by ANTLR
:cvar _EXT_LIB_DIR: Relative path to external libs directory
Expand Down Expand Up @@ -162,7 +161,7 @@ def finalize_options(self):
as late as possible, ie. after any option assignments from the command-line or from other
commands have been done.
"""
# parse grammars
# parse grammars option
if self.grammars:
self.grammars = shlex.split(self.grammars, comments=True)

Expand Down