QuTech-Delft / libqasm

libQASM: Library to parse cQASM files
https://arxiv.org/abs/1805.09607
Other
15 stars 16 forks source link

[V3 Extended] Some ANTLR parser error messages are far from great #190

Closed rturrado closed 4 months ago

rturrado commented 6 months ago

A code like 1 = true will report an ANTLR parser error message such as: input.cq:3:7: missing 'measure' at 'true'.

rturrado commented 4 months ago

This issue may have been fixed (at least for some cases). For example, at the moment, the example above, 1 = true, produces a syntactic AST, and then fails the semantic checks with the following message: Error at input.cq:3:5..6: left-hand side of assignment statement must be assignable.