Skip to content

Commit fec3d1a

Browse files
Update regex terminals to match new syntax (#356)
* Update regex to match new syntax * Set Version: 0.2.53 --------- Co-authored-by: devops <[email protected]>
1 parent 68fbdaf commit fec3d1a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

kmir/k-src/mir-lexer-syntax.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Primitive types (in literal format) used in MIR.
3434
//TODO: locate the code defines the primitive types in MIR.
3535
//Do we need to redefine regular expression? Maybe move to Type File
3636
syntax UnsignedLiteral ::= r"[0-9]+_(usize|u8|u16|u32|u64|u128)" [token]
37-
syntax SignedLiteral ::= r"[-]?[0-9]+_(isize|i8|i16|i32|i64|i128)" [token]
37+
syntax SignedLiteral ::= r"-?[0-9]+_(isize|i8|i16|i32|i64|i128)" [token]
3838
syntax FloatLiteral ::= r"-?[0-9]+(.[0-9]+)?((E|e)(\\+|-)?[0-9]+)?(f32|f64)" [token]
3939
syntax HexLiteral ::= r"0x[0-9a-fA-F]+" [token]
4040
syntax StringLiteral ::= r"[\\\"]([^\\\"\\\\\\n]|\\\\[\\\"'nrt0\\\\]|\\\\x[0-7][0-9a-fA-F]|\\\\u\\{[0-9a-fA-F]+\\}|\\\\u[0-9a-fA-F]([0-9a-fA-F]([0-9a-fA-F]([0-9a-fA-F]([0-9a-fA-F][0-9a-fA-F]?)?)?)?)?|\\\\\\n)*[\\\"]" [token, prec(-1)]
@@ -63,7 +63,7 @@ Types such as structs, tuples and unions, which has fields (indexed by `VariantI
6363
```
6464

6565
```k
66-
syntax AllocReferenceToken ::= r"#\\(-*alloc[0-9]+(?:\\+0x[0-9a-fA-F]+)?-*\\)#" [token]
66+
syntax AllocReferenceToken ::= r"#\\(-*alloc[0-9]+(\\+0x[0-9a-fA-F]+)?-*\\)#" [token]
6767
syntax DoubleHexDigitNoIntLetter ::= r"[a-fA-F][0-9a-fA-F]" [token]
6868
syntax DoubleHexDigitNoIntDigit ::= r"[0-9][a-fA-F]" [token]
6969
```

kmir/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "kmir"
7-
version = "0.2.52"
7+
version = "0.2.53"
88
description = ""
99
authors = [
1010
"Runtime Verification, Inc. <[email protected]>",

kmir/src/kmir/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
from .kmir import KMIR
44

5-
VERSION: Final = '0.2.52'
5+
VERSION: Final = '0.2.53'

package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.52
1+
0.2.53

0 commit comments

Comments
 (0)