This method scans a recapture encounter line. For the format of this line, see the specification.
# - - - B a s e E n c o u n t e r . s c a n R e c a p - - -
def scanRecap(self, scan):
'''Scan a recapture line.
[ scan is a Scan object ->
if CAPTURE_RECAP + (line in scan) is a valid recapture
encounter line in the context of self.compiler ->
scan := scan advanced to end of line
self := self with all fields from that line added
using names in self.OUT_FIELD_LIST
else ->
scan := scan advanced no further than end of line
Log() +:= error messages
raise SyntaxError ]
'''
First on the line is the full band number. See Section 32.4, “BandNoField.scanField()”
#-- 1 -
# [ if scan starts with a valid band number field in
# the context of self.compiler ->
# scan := scan advanced past that field
# self := self with the band number stored in
# attribute BAND_NO_ATTR
# else ->
# Log() +:= error message
# raise SyntaxError ]
BandNoField.scanField(self, scan, BAND_NO_ATTR)
Parsing of the body and tail sections is done by Section 74.13, “BaseEncounter.scanBody(): Scan encounter
line body and tail sections”.
#-- 2 --
# [ if scan contains a valid encounter body and tail in
# the context of self ->
# scan := scan advanced to end of line
# self := self with all fields from that line added
# else ->
# Log() +:= error message(s)
# raise SyntaxError ]
self.scanBody(scan)