Skip to content

Sync the qasm3 grammar copy with OpenQASM AST 1.0.2 - #44

Open
HVSharma12 wants to merge 1 commit into
openqasm:mainfrom
HVSharma12:sync-qasm3-grammar-ast-1.0.2
Open

HVSharma12 wants to merge 1 commit into
openqasm:mainfrom
HVSharma12:sync-qasm3-grammar-ast-1.0.2

Conversation

@HVSharma12

Copy link
Copy Markdown

Fixes #43.

This copies qasm3Lexer.g4 and qasm3Parser.g4 from openqasm/openqasm at ast-py/v1.0.2, which match its current main. With it, assignments in cal blocks parse again with openqasm3 1.0.2, and the full test suite passes with both 1.0.2 and 1.0.1. Before, test_annotation_in_cal_block failed with 1.0.2.

The copy also brings in the other differences listed in #42, which are nop, quantum call expressions, empty array literals, dotted annotation keywords, the removed ~= operator and comments on the hidden channel.

openqasm3 1.0.2's visitor calls quantumCallExpression(), which the old copy lacks, so every
assignment in a cal block raises AttributeError. Copied from openqasm/openqasm at ast-py/v1.0.2.

Signed-off-by: HVSharma12 <harshvardhan.sharma@suse.com>
@CLAassistant

CLAassistant commented Nov 17, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assignments in cal blocks fail with openqasm3 1.0.2

2 participants