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: Factor BaseParser out of the parser (NFC) #1191

Merged
merged 2 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions xdsl/parser/affine_parser.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from __future__ import annotations
from xdsl.parser.base_parser import BaseParser

from xdsl.parser.core import Parser, ParserState, Token, ParseError
from xdsl.parser.core import ParserState, Token, ParseError
from xdsl.ir.affine import AffineExpr, AffineMap


class AffineParser(Parser):
class AffineParser(BaseParser):
_BINOP_PRECEDENCE = {
"+": 10,
"-": 10,
Expand All @@ -15,7 +16,7 @@ class AffineParser(Parser):
}

def __init__(self, state: ParserState) -> None:
self.resume_from_state(state)
self._resume_from(state)

def _parse_primary(self, dims: list[str], syms: list[str]) -> AffineExpr:
"""
Expand Down
Loading