Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement Parser #2149

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft

Reimplement Parser #2149

wants to merge 22 commits into from

Conversation

idavis
Copy link
Collaborator

@idavis idavis commented Feb 4, 2025

Lexing

  • Basic raw tokens
  • Basic cooked tokens
  • Cook praga and annotation

Parsing

Lowering

  • symbol ids
  • broadcast
  • implicit casts to explicit casts
  • semantic errors

Compiling

  • Replace AST transform

@idavis idavis requested a review from orpuente-MS February 4, 2025 02:11
@idavis idavis self-assigned this Feb 4, 2025
}
}

// TODO: profile this with iai-callgrind in a large OpenQASM3

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
Index,
}

// TODO: This seems to be an unnecessary wrapper. Consider removing.

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
… statements to QASM3 parser (#2191)

This PR adds the ability to parse `if`, `for`, `while`, `continue`,
`break`, and `end` statements to the QASM3 parser. It also adds the
ability to parse expression statements and aliases.

This PR also fixes:
1. Range expressions. Ranges expressions were being parsed as `start :
end : step`, but in QASM3 ranges are `start : step : end`.
2. Assign expressions. Assign expressions weren't being handled in the
Pratt parser.
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.

2 participants