Repository navigation
Export Structured Text routine bodies - #68
Draft
santiagolgzz wants to merge 4 commits into
Draft
santiagolgzz wants to merge 4 commits into
santiagolgzz wants to merge 4 commits into
Conversation
Fallbacks that skip or guess something now record a short plain-English note as well as logging a warning: a controller tag left out, a produced/consumed tag exported as Base, a guessed Region Map offset, an unrecovered Region Map rung, and a routine with no readable type exported as RLL. The notes are available as project.conversion_notes and written as one XML comment at the top of the L5X; a fallback that hits many objects gets one line naming the first few and a count. With no notes, the output is unchanged.
When no unclaimed rung fits the gap, no rung is missing and nothing was skipped or guessed, so it is logged but no longer noted.
ST routines were exported with Type="ST" and no content. Decode their source with STDecoder while the database is built, store the lines in an st_lines table keyed by the routine's object_id, and emit them as <STContent><Line Number="n"> with CDATA text, as Studio 5000 does. If decoding fails, the routines export with empty bodies and a warning instead of the conversion aborting.
The decoder left out a line record whose text it could not read without saying so. It now counts them per routine (STDecoder.unreadable_lines), and the export records a conversion note naming each affected routine and how many lines it lost.
santiagolgzz
force-pushed
the
up/st-bodies-notes
branch
from
November 4, 2026 21:32
7d841af to
d968b0b
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #67.
Building on #58: the decoder is available through
st_decoder(), but the L5X export doesn't use it yet, so Structured Text routines come out empty. This fills them in, with each routine's lines in order.On the three public
ACDTests*files the routine matches the reference export line for line. If the decoder can't read a line, or a whole routine, a conversion note names the routine; it used to drop unreadable lines silently.