Read Y as a placeholder in opcode family names

Names such as egN_timeX_onccY have a second number, so eg1_time2_oncc3 was
reported as unknown. Check that a name made from each family is found.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-01 18:43:01 +00:00
co-authored by Claude Sonnet 5.5
parent 83c905633c
commit 41f752e1c1
2 changed files with 31 additions and 4 deletions
+4 -4
View File
@@ -46,8 +46,8 @@ type HeaderInfo struct {
}
// OpcodeInfo describes an opcode of the format. A name that stands for a
// family has uppercase placeholders: N and X stand for a number, as in
// loccN and egN_timeX, and * for any name, as in hint_*.
// family has uppercase placeholders: N, X and Y stand for a number, as in
// loccN and egN_timeX_onccY, and * for any name, as in hint_*.
type OpcodeInfo struct {
// Name is the opcode's own name.
Name string
@@ -89,8 +89,8 @@ var (
headerByName map[string]*HeaderInfo
)
// patternRE reads a name's placeholders: a run of N and X letters, or a *.
var patternRE = regexp.MustCompile(`[NX]+|\*`)
// patternRE reads a name's placeholders: a run of N, X and Y letters, or a *.
var patternRE = regexp.MustCompile(`[NXY]+|\*`)
// pattern returns the expression that matches the names a family name stands
// for, or nil if the name is a single opcode's.