Metadata-Version: 2.1
Name: openqasm3
Version: 0.0.0
Summary: Reference OpenQASM AST in Python
Home-page: https://github.com/Qiskit/openqasm
Author: OpenQASM Contributors
License: Apache 2.0 Software License
Keywords: openqasm quantum
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering
Description-Content-Type: text/markdown; variant=GFM
Provides-Extra: tests
Provides-Extra: all
License-File: ../../LICENSE

# OpenNode: a reference OpenQASM 3.0 AST in Python

This directory contains a reference AST implementation for OpenQASM 3.0 in Python. It consists of:

* ast.py: The AST nodes.
* parser/antlr: A parser based on Antlr grammar and reference parser also found in this repo.
It walks the ANTLR parse tree to generate the AST tree.
* ast_visitor: A base AST visitor and an example showing how to implement compiler passes
using the visitor.
* tests: A set of unit tests.


## Developer setup

1. Setup the Antlr tools following the [README under grammar](../README.md). Then from 
source/grammar directory, run:
```
antlr4 -o ../openqasm/parser/antlr -Dlanguage=Python3 -visitor qasm3.g4
```
2. Change to the current directory and install additional requirements with 
`pip install -r requirements.txt -r requirements-dev.txt`.
3. Format python code: `black .`.
4. Check style: `bylint .`.
5. Run tests: `pytest`.


