Skip to content

Commit

Permalink
Update regex terminals to match new syntax (#1049)
Browse files Browse the repository at this point in the history
Part of runtimeverification/k/issues/4295

Escapes all usages of `-` and `^` within character classes to align with
the new regex syntax.
  • Loading branch information
Scott-Guest authored May 9, 2024
1 parent d80687a commit 5f12760
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/defn/k-files/wasm.k
Original file line number Diff line number Diff line change
Expand Up @@ -1441,10 +1441,10 @@ module WASM-TOKEN-SYNTAX
syntax WasmStringToken ::=
r"\\\"(([^\\\"\\\\])|(\\\\[0-9a-fA-F]{2})|(\\\\t)|(\\\\n)|(\\\\r)|(\\\\\\\")|(\\\\')|(\\\\\\\\)|(\\\\u\\{[0-9a-fA-F]{1,6}\\}))*\\\"" [token]
syntax IdentifierToken ::=
r"\\$[0-9a-zA-Z!$%&'*+/<>?_`|~=:\\@^.-]+" [token]
r"\\$[0-9a-zA-Z!$%&'*+/<>?_`|~=:\\@\\^.\\-]+" [token]
syntax WasmIntToken ::=
r"[\\+-]?[0-9]+(_[0-9]+)*" [token]
| r"[\\+-]?0x[0-9a-fA-F]+(_[0-9a-fA-F]+)*" [token]
r"[\\+\\-]?[0-9]+(_[0-9]+)*" [token]
| r"[\\+\\-]?0x[0-9a-fA-F]+(_[0-9a-fA-F]+)*" [token]
syntax #Layout ::=
r"\\(;([^;]|(;+([^;\\)])))*;\\)" [token]
| r";;[^\\n\\r]*" [token]
Expand Down

0 comments on commit 5f12760

Please sign in to comment.