An instance of this class represents the information from a page header line. See the specification.
# - - - - - c l a s s P a g e H e a d e r - - - - -
class PageHeader:
'''Represents a new page header line.
Exports:
PageHeader(size, pageNo):
[ (size is the band size or other sheet type as a string) and
(pageNo is the page number as a string) ->
return a new PageHeader object with those values ]
.size: [ as passed to constructor, read-only ]
.pageNo: [ as passed to constructor, read-only ]
PageHeader.scanLine(compiler, scan): # Static method
[ (compiler is a BaseCompiler object) and
(scan is a Scan object) ->
if the line in scan is a valid page header line in
the context of compiler, with the scan position just
after the PAGE_SYMBOL ->
return a new PageHeader object representing that line
else ->
Log() +:= error message(s)
raise SyntaxError
In any case ->
scan := scan advanced no further than end of line ]
'''