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

core: Create ParserState (NFC) #1114

Merged
merged 3 commits into from Jun 12, 2023
Merged

core: Create ParserState (NFC) #1114

merged 3 commits into from Jun 12, 2023

Conversation

math-fehr
Copy link
Collaborator

ParserState is used to encapsulate the state of a given parser.
This will allow us to share the state between parsers, so we can better separate the parser code.

For instance, when encountering an affine expression, an AffineParser will be created with that state, and will take care of parsing the expression.

@math-fehr math-fehr added the core xDSL core (ir, textual format, ...) label Jun 9, 2023
@math-fehr math-fehr requested a review from webmiche as a code owner June 9, 2023 21:20
@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (41415aa) 87.02% compared to head (78a3d8a) 87.03%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1114   +/-   ##
=======================================
  Coverage   87.02%   87.03%           
=======================================
  Files         138      138           
  Lines       20850    20863   +13     
  Branches     3138     3139    +1     
=======================================
+ Hits        18145    18158   +13     
  Misses       2186     2186           
  Partials      519      519           
Impacted Files Coverage Δ
xdsl/parser.py 85.50% <100.00%> (+0.19%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@math-fehr math-fehr merged commit 8a2d1d1 into main Jun 12, 2023
12 checks passed
@math-fehr math-fehr deleted the fehr/parser-state branch June 12, 2023 11:26
cigarichard pushed a commit to cigarichard/xdsl that referenced this pull request Jun 17, 2023
`ParserState` is used to encapsulate the state of a given parser.
This will allow us to share the state between parsers, so we can better
separate the parser code.

For instance, when encountering an affine expression, an `AffineParser`
will be created with that state, and will take care of parsing the
expression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core xDSL core (ir, textual format, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants