From 5703267bdd674bb881c08315267690e527599425 Mon Sep 17 00:00:00 2001 From: Virgil Date: Mon, 27 Jan 2025 14:20:41 +0200 Subject: [PATCH] Fix review comments --- .../wasm-semantics/binary-parsing/func.md | 24 ------------------- .../wasm-semantics/binary-parsing/int.md | 4 ---- 2 files changed, 28 deletions(-) delete mode 100644 pykwasm/src/pykwasm/kdist/wasm-semantics/binary-parsing/func.md diff --git a/pykwasm/src/pykwasm/kdist/wasm-semantics/binary-parsing/func.md b/pykwasm/src/pykwasm/kdist/wasm-semantics/binary-parsing/func.md deleted file mode 100644 index 9e1e0ecc9..000000000 --- a/pykwasm/src/pykwasm/kdist/wasm-semantics/binary-parsing/func.md +++ /dev/null @@ -1,24 +0,0 @@ -Parsing a [func type id](https://webassembly.github.io/spec/core/binary/modules.html#function-section). - -```k -module BINARY-PARSER-FUNC-SYNTAX - imports BINARY-PARSER-BASE-SYNTAX - - syntax DefnResult ::= parseDefnFunc(BytesWithIndex) [function, total] - -endmodule - -module BINARY-PARSER-FUNC [private] - imports BINARY-PARSER-DEFN-SYNTAX - imports BINARY-PARSER-FUNC-SYNTAX - imports BINARY-PARSER-INT-SYNTAX - - syntax DefnResult ::= #parseDefnFunc(IntResult) [function, total] - - rule parseDefnFunc(BWI:BytesWithIndex) => #parseDefnFunc(parseLeb128UInt(BWI)) - rule #parseDefnFunc(intResult(TypeIndex:Int, BWI:BytesWithIndex)) - => defnResult(binaryDefnFunctionType(TypeIndex), BWI) - rule #parseDefnFunc(E:ParseError) => E - -endmodule -``` diff --git a/pykwasm/src/pykwasm/kdist/wasm-semantics/binary-parsing/int.md b/pykwasm/src/pykwasm/kdist/wasm-semantics/binary-parsing/int.md index 43a13a628..793427cbd 100644 --- a/pykwasm/src/pykwasm/kdist/wasm-semantics/binary-parsing/int.md +++ b/pykwasm/src/pykwasm/kdist/wasm-semantics/binary-parsing/int.md @@ -54,10 +54,6 @@ module BINARY-PARSER-INT [private] => intResult(buildLeb128UInt(L), BWI) rule #parseLeb128UInt(E:ParseError) => E - syntax Int ::= buildLeb128UInt(Ints) [function, total] - rule buildLeb128UInt(.Ints) => 0 - rule buildLeb128UInt(Value:Int L:Ints) => Value +Int 128 *Int buildLeb128UInt(L) - syntax IntResult ::= #parseLeb128SInt(IntsResult) [function, total] rule parseLeb128SInt(BWI:BytesWithIndex) => #parseLeb128SInt(parseLeb128IntChunks(BWI))