aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexHex.cxx
AgeCommit message (Collapse)AuthorFilesLines
2017-09-11The Scintilla namespace is always active for internal symbols and for the lexerNeil1-2/+0
interfaces ILexer4 and IDocument.
2017-07-17Update types for Unix LP64 after changes to Sci_Position/Sci_PositionU.Neil Hodgson1-1/+3
2015-07-30Use Sci_Position / Sci_PositionU for variables in lexers that representJoe Mueller1-74/+74
positions and line numbers and may be widened to 64-bits in a future release.
2015-07-25Use Sci_PositionU/Sci_Position for arguments to functional lexers, folders, andNeil1-4/+4
comment recognizers to allow for future implementation of 64-bit positions.
2015-01-13LexHex S-Record: use the required data field size for some highlightingMarkus Heidelberg1-29/+75
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.
2015-01-13LexHex: use SCE_HEX_RECTYPE_UNKNOWN also for Srec and IHexMarkus Heidelberg1-4/+22
2015-01-11LexHex: add a default case for handling faulty states to all lexersMarkus Heidelberg1-0/+15
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.
2015-01-11LexHex: add a new state for garbage data after the recordMarkus Heidelberg1-8/+12
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.
2015-01-11LexHex Tektronix: use more address field types, not just data addressMarkus Heidelberg1-8/+30
Also use the new function for checking whether the record type is unknown.
2015-01-11LexHex: move general helper function up and add a prototypeMarkus Heidelberg1-17/+18
Even if it is only used in the Tektronix lexer.
2015-01-11LexHex Tektronix: use the dedicated helper function for getting the lengthMarkus Heidelberg1-1/+2
2015-01-11LexHex Tektronix: fix whitespace issues and remove unused leftover codeMarkus Heidelberg1-11/+14
Also clarify the intention of embracing the states in the format description.
2015-01-11LexHex: rename Tektronix extended HEX lexer from "thex" to "tehex"Markus Heidelberg1-14/+14
There exists a similar file format called "Textronix HEX", which would be the better candidate for this short name.
2015-01-08Feature [feature-requests:#1096]. Lexer added for Tektronix extended hex files.Neil1-0/+203
From danselmi.
2015-01-05Add folding support for Intel HEX filesMarkus Heidelberg1-3/+57
Extended address records can be used as fold point for subsequent data records.
2014-12-30Add new lexer for Intel HEX file formatMarkus Heidelberg1-1/+282
2014-12-30S-Record lexer: rename states from SCE_SREC_.. to SCE_HEX_..Markus Heidelberg1-39/+39
Preparation for adding a new lexer which uses mostly the same states.
2014-12-30S-Record lexer: extract reusable parts of helper functionsMarkus Heidelberg1-35/+60
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.
2014-12-29S-Record lexer: fix the description of the maximum data field digit countMarkus Heidelberg1-8/+8
500 was only true for S3 records with 32-bit address.
2014-12-29S-Record lexer: add future-proof highlighting for unknown record typesMarkus Heidelberg1-12/+14
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.
2014-12-29S-Record lexer: correctly count the characters of an invalid short lineMarkus Heidelberg1-8/+18
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.
2014-12-09Feature [feature-requests:#1091]. Lexer for Motorola S-Record.Neil1-0/+360
From Markus Heidelberg.