Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/amanda849/pymlir into lin…
Browse files Browse the repository at this point in the history
…alg_transpose
  • Loading branch information
Amanda Tang committed Oct 1, 2024
2 parents 0536888 + 02ecdf3 commit a6ad50b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mlir/dialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def make_rules(cls):
for fname, ftype in sfields:
syntax = syntax.replace('{%s.%s}' % (fname, ftype), ftype)
# Replace back braces
syntax = syntax.replace('{LBRACE}', '{')
syntax = syntax.replace('{RBRACE}', '}')
syntax = syntax.replace('{LBRACE}', '"{"')
syntax = syntax.replace('{RBRACE}', '"}"')
lark_exprs.append(syntax)

cls._fields_ = list(fields)
Expand Down
4 changes: 2 additions & 2 deletions mlir/lark/mlir.lark
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ constant_literal : bool_literal | integer_literal | float_literal | string_liter

// Identifier syntax
bare_id : (letter| underscore) (letter|digit|underscore|id_chars)*
suffix_id : digits | bare_id
suffix_id : digits | ((letter | id_punct) (letter | id_punct | digits)*)

// Dimensions
dimension : "?" | decimal_literal
Expand Down Expand Up @@ -335,5 +335,5 @@ mlir_file: definition_and_function_list* -> only_functions_and_definitions
// Things to ignore: whitespace, single-line comments
%ignore WS

COMMENT : "//" /(.)+/ NEWLINE
COMMENT : "//" /(.)*/ NEWLINE
%ignore COMMENT

0 comments on commit a6ad50b

Please sign in to comment.