Age | Commit message (Collapse) | Author | Files | Lines |
|
interfaces ILexer4 and IDocument.
|
|
|
|
positions and line numbers and may be widened to 64-bits in a future release.
|
|
comment recognizers to allow for future implementation of 64-bit positions.
|
|
Equal to how it is already implemeted for the Intel HEX lexer.
Specific record types do not use a data field, the checksum field
directly follows the address field then.
In these cases now the byte count field is also marked as wrong if its
content is not what is to be expected for this record type. Also the
checksum field is now fixed after the address field instead of allowing
data field in between if the byte count is too big.
Also simplify this code path for IHex to be equal to the Srec code.
|
|
|
|
If the state variable is set to a state not used in this lexer, an
endless loop would occur because Forward() is never invoked then.
|
|
IHex and Srec just set to the DEFAULT state before, TEHex used the
SCE_HEX_DATA_UNKNOWN state for garbage data, which is not the actual intention
for this state.
|
|
Also use the new function for checking whether the record type is
unknown.
|
|
Even if it is only used in the Tektronix lexer.
|
|
|
|
Also clarify the intention of embracing the states in the format
description.
|
|
There exists a similar file format called "Textronix HEX", which would
be the better candidate for this short name.
|
|
From danselmi.
|
|
Extended address records can be used as fold point for subsequent data
records.
|
|
|
|
Preparation for adding a new lexer which uses mostly the same states.
|
|
CalcChecksum() takes a parameter to decide between one's or two's
complement. The variable "cs" has been changed to "signed int" to
simplifiy calculation of the two's complement with signed arithmetic
instead of using bitwise operations, which would cause "overflow"
warnings in Coverity without additional "& 0xFF" masking.
|
|
500 was only true for S3 records with 32-bit address.
|
|
An S4 record for example, which is not defined in the S-Record
specification, will now be highlighted until record end (checksum)
instead of aborting after the "byte count" field. The former behaviour
looked a bit half-baked.
Since the size of the address field is unknown, the address and data
fields are highlighted with the same style in the new state
SCE_SREC_DATA_UNKNOWN. Alternating styles (ODD/EVEN) for readability of
the data field of valid record types are not applied.
|
|
If the line only consisted of 3 digits (e.g. S12), then highlighting of
the third one (first digit of the "count" field) was dependent on the
content of the subsequent line. Now this digit is always highlighted as
valid "byte count", independent on its value, if there is no further
digit behind.
The function return value can be negative now.
|
|
From Markus Heidelberg.
|