The vector's number goes beside its kind, not at the end of the line
Kind and Number together are what names a thing: Vector 16 and Device 32 are identifiers in a way that Vector on its own is not. Everything after them - where it lives, what it is called, where it was written - says something about it rather than naming it, so with the number at the far end a line opened with a bare kind and closed with the fact that would have told you what you were reading. Fields are now Kind, Number, Address, Name, File, Line. A label still carries a dash where its number would be, which reads as "this kind is not numbered" rather than as a field that went missing. Manual and the docs check follow. Verified with break.sh by swapping the number and the address back. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
co-authored by
Claude Opus 5
parent
f3d8985bc4
commit
7dca141aae
+4
-4
@@ -838,8 +838,8 @@ if "## Running the Assembler:" not in am:
|
||||
else:
|
||||
section = am.split("## Running the Assembler:")[1].split("\n## ")[0]
|
||||
said = [row.split(" |")[0] for row in re.findall(r'^\| (\w+ \|.*)$', section, re.M)
|
||||
if row.split(" |")[0] in ("Kind", "Address", "Name", "File", "Line", "Number")]
|
||||
if said != ["Kind", "Address", "Name", "File", "Line", "Number"]:
|
||||
if row.split(" |")[0] in ("Kind", "Number", "Address", "Name", "File", "Line")]
|
||||
if said != ["Kind", "Number", "Address", "Name", "File", "Line"]:
|
||||
problems.append("the Assembler Manual does not describe the symbol file's six"
|
||||
" fields in order; it lists %s" % (said or "none"))
|
||||
else:
|
||||
@@ -875,7 +875,7 @@ else:
|
||||
" Assembler Manual describes six"
|
||||
% (number, len(fields)))
|
||||
break
|
||||
kind, address, name, source, where, index = fields
|
||||
kind, index, address, name, source, where = fields
|
||||
kinds.add(kind)
|
||||
if kind not in ("Program", "Data", "Vector", "Device"):
|
||||
problems.append("a symbol file calls something a %r, and the"
|
||||
@@ -934,7 +934,7 @@ else:
|
||||
# drift lands on a line that has nothing to do with the name.
|
||||
sources = {}
|
||||
for row in open(dump).read().splitlines():
|
||||
kind, address, name, source, where, index = row.split("\t")
|
||||
kind, index, address, name, source, where = row.split("\t")
|
||||
if source not in sources:
|
||||
try:
|
||||
sources[source] = open(source).read().splitlines()
|
||||
|
||||
Reference in New Issue
Block a user