RDDL lexer/parser in Python3.
Project description
pyrddl
RDDL lexer/parser in Python3.
Quickstart
$ pip3 install pyrddl
Usage
Script mode
The pyrddl
script provides ways to parse and inspect RDDL files
from the command line.
$pyrddl --help
usage: pyrddl [-h] [-v] rddl
RDDL lexer/parser in Python3.
positional arguments:
rddl RDDL filepath
optional arguments:
-h, --help show this help message and exit
-v, --verbose verbosity mode
Programmatic mode
The pyrddl
package provides an API for integrating RDDL parser
with your own Python package/project.
from pyrddl.parser import RDDLParser
# read RDDL file
with open(filepath, 'r') as file:
rddl = file.read()
# buid parser
parser = RDDLParser()
parser.build()
# parse RDDL
model = parser.parse(rddl) # AST
License
Copyright (c) 2018-2019 Thiago Pereira Bueno All Rights Reserved.
pyrddl is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
pyrddl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with pyrddl. If not, see http://www.gnu.org/licenses/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyrddl-0.1.10.tar.gz
.
File metadata
- Download URL: pyrddl-0.1.10.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea7e82664b64b885db75eab25a7b87678ae5128ba762268fce4dd1aaf38b4acf |
|
MD5 | b71fcf37a38a0e555686caa4d9ebeac8 |
|
BLAKE2b-256 | cd67904c3ef3a8ce9e6a388759615ac64e45162b1e2deff67bc827e78de46be9 |