Skip to main content
aptk - A Parse Toolkit
======================

This is a module for creating parsers from grammars. aPTK targets to make
this in a very "documented" way. So you can define the grammar in doc-string
of your grammar class or even in your reStructuredText documentation.

.. highlight:: aptk

A simple example of a greeting parser::

:grammar GreetingGrammar

<greeting> := <greeting-clause> <.ws> <greeted>
<ws> := \s+
<greeting-clause> := "hello" | "hi"
<greeted> := \w+

This will create a class named `GreetingGrammar`. First rule in the
grammar will be used as start-rule for a normal parsing. Parsing a
rule, will result in a ParseTree. Here follows an example of rule
``<greeting>`` matching "hello world"::

<greeting> ~~ "hello world"
-> greeting(
greeting-clause( 'hello' ),
greeted( 'world' )
)

Actually what you see above is a test assertion for applying rule greeting
to string "hello world", what is expected to result in the parse-tree
displayed above.

But read more in `aptk's documentation`_.

.. _aptk's documentation: http://aptk.readthedocs.org

Download
--------

You can download this package from PyPI_.

.. _PyPI:: http://pypi.python.org/pypi/aptk#downloads

.. highlight:: bash

Or install it with easy_install::

easy_install -U aptk

or get the the source from source code repository from bitbucket.org::

$ hg clone https://bitbucket.org/klorenz/aptk


Building Documentation
----------------------

For building documentation you need sphinx, you can get it using::

$ easy_install -U Sphinx

Then you can::

$ cd docs
$ make html
$ firefox _build/html/index.html


License
-------

Licensed under New BSD License, see LICENSE.txt.


Release Notes
-------------

======= =================================================================
Version Notes
======= =================================================================
0.6.4 fix setup issue
0.6 Backtracking for Operation Precedence
0.5.7 add comments

0.5.4 first tests for postcircumfix pass, more tests, cleaned code a bit

0.5.3 Added operation precedence parser. Pretty simple yet, but supports
infix, postfix, prefix, circumfix operations. postcircumfix is
also implemented but not tested at all others are partly tested.

0.5 Starting with version 0.5, which shall indicate, that there is
still a lot to do.

Especially documentation is far from complete and it contains
some passages, which are already outdated.

Next releases will focus on documentation and testing and adding
an operator precendence parser.

======= =================================================================

Metadata

Release files for aptk 0.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for aptk 0.6.4
File Size Uploaded
aptk-0.6.4.zip 56.2 kB Details
aptk-0.6.4.tar.gz 46.4 kB Details

Release files / aptk-0.6.4.zip

Download URL aptk-0.6.4.zip
Size 56.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7371938c198ce3284e52b1d75bf5b3a2ff9082661e733d30bf43698779d51667
BLAKE2b-256 checksum
How to use checksums
c3c18ad58cbb48cc7d452d7c938ceff4219f40dac18adccbf8dc796fe2b04e34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / aptk-0.6.4.tar.gz

Download URL aptk-0.6.4.tar.gz
Size 46.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e3a79630ab46f65d0c41f119d760b10c32b9b3b7dbe0589b4c8df5ec27d7937f
BLAKE2b-256 checksum
How to use checksums
67f4e986fd78833ad49e3c2b39f01f550d442505bedeb0726c2291a96f58d027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.6.4 This release

2 release files

0.6.3

3 release files

0.6.2

3 release files

0.6.1

3 release files

0.6

3 release files

0.5.9

3 release files

0.5.8

3 release files

0.5.7

3 release files

0.5.6

3 release files

0.5.5

3 release files

0.5.4

3 release files

0.5.3

3 release files

0.5.2

3 release files

0.5.1

3 release files

0.5.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page