Menu

#1091 [PATCH] Lexer for Motorola S-Record file format

Committed
closed
5
2015-01-19
2014-12-08
No

This file format contains binary data in text form, often used in embedded development. Since there is no formatting, it is hard to read without syntax highlighting. Attached are patches for Scintilla and SciTE and an example file, where the first section is valid and the second section contains errors (unknown type, wrong byte count, wrong checksum).

I plan to add a lexer for a similar file format called "Intel HEX" and thought of doing it in the same .cxx file to share some helper functions. Are the filenames (LexSrec srec.properties) ok in this case or should they be changed to something general?

1 Attachments

Discussion

  • Markus Heidelberg

    Patch for Scintilla

     
  • Markus Heidelberg

    Patch for SciTE

     
  • Neil Hodgson

    Neil Hodgson - 2014-12-08

    Basing the names on 'Hex' may help users unfamiliar with the area like me. If 'Srec' or similar is more familiar to practitioners in the field then they probably should get priority.

    There is one warning: in ColouriseSrecDoc, the WordList *[] argument is not used so the name (keywordLists) should be omitted.

     
  • Markus Heidelberg

    I'm not sure about the best word for a general name for this type of files, probably 'Hex' is quite good, so I have renamed the files accordingly and removed the variable name of the unused argument.
    At the company most of my colleagues say 'hex file' for Intel Hex and 'mot file' for Motorola S-Record, derived from the file extension. We don't have a general name for this, but that doesn't mean anything.

     

    Last edit: Markus Heidelberg 2014-12-08
  • Neil Hodgson

    Neil Hodgson - 2014-12-09
    • labels: --> scintilla, lexer, hex
    • assigned_to: Neil Hodgson
    • Group: Completed --> Committed
     
  • Neil Hodgson

    Neil Hodgson - 2014-12-09

    Committed as [4f3805] and [07645f].

     

    Related

    Commit: [07645f]
    Commit: [4f3805]

  • Neil Hodgson

    Neil Hodgson - 2015-01-11

    Is this feature stable? If not then it should be pulled out until it is.

     
  • Markus Heidelberg

    Yes, it is stable. These are no error fixes, but minor enhancements which I didn't consider from the beginning.

    SCE_HEX_RECTYPE_UNKNOWN has been introduced for Tektronix extended HEX by user danselmi and has now been adopted for S-Record and Intel HEX.

     
  • Neil Hodgson

    Neil Hodgson - 2015-01-19
    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.