chan close $chan
}
##### Parse input data
# Note that actual input parsing here is done by the parser selected
# above. Each parser accepts one line of data and emits a list that
# consists of a canonical tag and its associated data.
# The *readFile* level manages the segment list structure based on
# those tags. Generally, format-specific consistency checks are
# handled in the parsers.
foreach line $dataL {
set lineL [{*}$parser $line]
switch -- [lindex $lineL 0] {
default {
# Unknown line types are warned about, but we continue and
# allow the user to decide what to do about the issue.
log::warn "binconvert::readfile: Unknown line type\

chan close $chan
}
##### Parse input data
# Note that actual input parsing here is done by the parser selected
# above. Each parser accepts one line of data and emits a list that
# consists of a canonical tag and its associated data.
# # The specification for the interfaces to the procedures are as follows: # the line parser must take exactly one argument, the line to be parsed. # It must return a list consisting of one data type token plus one or two # data fields appropriate to the token. The list of supported tokens is: # # * DATA *lineAddress* *dataList* # * SEGADDR *segAddressOffset* # * HEADER *headerData* # * NOP {} # * STARTADDR *executionStartAddress* *optionalProcessorType* # * EOF {} #
# The *readFile* level manages the segment list structure based on those
# tags. Format-specific consistency checks are handled in the parsers.
foreach line $dataL {
set lineL [{*}$parser $line]
switch -- [lindex $lineL 0] {
default {
# Unknown line types are warned about, but we continue and
# allow the user to decide what to do about the issue.
log::warn "binconvert::readfile: Unknown line type\