Skip to content

Parser fails for annotated compound statements #39

@ajberdy

Description

@ajberdy

Error inside and outside cal blocks (slightly different message); both of these snippets parse without raising an error without the annotations.

import openpulse
p1 = """
cal{
    @annotated
    {1;2;}
}"""
p2 = """
@annotated
{1;2;}
"""

openpulse.parse(p1)
# openpulse.parser.OpenPulseParsingError: Unexpected token '{' at line 3, column 20.

openpulse.parse(p2)
# openqasm3.parser.QASM3ParsingError

I believe even without the annotations, behavior isn't fully correct either, see #36

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions