From 6ddb6f5759456c319e4305e00bbb5a5a881001ae Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 20 Aug 2026 17:13:29 -0700 Subject: [PATCH] regenerate parser oracle --- lib/std/zig/parser_generated_oracle.zig | 10 +++++----- tools/gen_parser_oracle.zig | 9 +++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/std/zig/parser_generated_oracle.zig b/lib/std/zig/parser_generated_oracle.zig index 1cd16d6ce1495e8587fd16feb019f23501c90f3d..79de64f7298ad6f141babcea868bdef5cae4c474 100644 --- a/lib/std/zig/parser_generated_oracle.zig +++ b/lib/std/zig/parser_generated_oracle.zig @@ -3073,7 +3073,7 @@ const Parser = struct { return blk_0: { const pos_0 = p.i; if (blk_1: { - if (std.mem.startsWith(u8, p.source[p.i..], "\xef\xbb\xbf")) { + if (std.mem.startsWith(u8, p.source[p.i..], "")) { p.i += 3; break :blk_1 true; } @@ -3145,7 +3145,7 @@ const Parser = struct { return blk_0: { const pos_0 = p.i; if (blk_1: { - if (std.mem.startsWith(u8, p.source[p.i..], "\xf4")) { + if (std.mem.startsWith(u8, p.source[p.i..], "ô")) { p.i += 1; break :blk_1 true; } @@ -3201,7 +3201,7 @@ const Parser = struct { return blk_0: { const pos_0 = p.i; if (blk_1: { - if (std.mem.startsWith(u8, p.source[p.i..], "\xf0")) { + if (std.mem.startsWith(u8, p.source[p.i..], "ð")) { p.i += 1; break :blk_1 true; } @@ -3257,7 +3257,7 @@ const Parser = struct { return blk_0: { const pos_0 = p.i; if (blk_1: { - if (std.mem.startsWith(u8, p.source[p.i..], "\xed")) { + if (std.mem.startsWith(u8, p.source[p.i..], "í")) { p.i += 1; break :blk_1 true; } @@ -3313,7 +3313,7 @@ const Parser = struct { return blk_0: { const pos_0 = p.i; if (blk_1: { - if (std.mem.startsWith(u8, p.source[p.i..], "\xe0")) { + if (std.mem.startsWith(u8, p.source[p.i..], "à")) { p.i += 1; break :blk_1 true; } diff --git a/tools/gen_parser_oracle.zig b/tools/gen_parser_oracle.zig index e20b3bfc15f9e376370778c21061d4363d1dd6ba..866c266d82b6284d506aaa2dbf0ae4d11136c987 100644 --- a/tools/gen_parser_oracle.zig +++ b/tools/gen_parser_oracle.zig @@ -267,17 +267,14 @@ const Generator = struct { const bytes = g.p.strings.items[literal.off..][0..literal.len]; try g.w.print( \\blk_{d}: {{ - \\if (std.mem.startsWith(u8, p.source[p.i..], " - , .{suffix}); - try std.zig.stringEscape(bytes, g.w); - try g.w.print( - \\")) {{ + \\if (std.mem.startsWith(u8, p.source[p.i..], {q})) {{ + \\ \\p.i += {d}; \\ break :blk_{d} true; \\}} \\break :blk_{d} false; \\}} - , .{ bytes.len, suffix, suffix }); + , .{ suffix, bytes, bytes.len, suffix, suffix }); }, .class => |ranges| { try g.w.writeAll("(p.i < p.source.len and switch (p.source[p.i]) {"); -- 2.54.0