This repository generates parsers from OpenQASM specification.
Generated parsers are available as assets in releases, and ready-to-use JavaScript parsers are hosted on GitHub Pages.
To use the generated parsers in a web page, include the following snippet:
<script type="importmap">
{
"imports": {
"antlr4": "https://unpkg.com/[email protected]/dist/antlr4.web.mjs",
"qasm3Lexer": "https://qat-inria.github.io/openqasm-parser/openqasm-javascript-parser-v3.1.0/qasm3Lexer.js",
"qasm3Parser": "https://qat-inria.github.io/openqasm-parser/openqasm-javascript-parser-v3.1.0/qasm3Parser.js"
}
}
</script>For a usage example, see examples/qasm_viewer.html (source|result).