Skip to content

new lexer : SINEX file format#329

Closed
freinquin wants to merge 1 commit intoScintillaOrg:masterfrom
freinquin:devel_sinex
Closed

new lexer : SINEX file format#329
freinquin wants to merge 1 commit intoScintillaOrg:masterfrom
freinquin:devel_sinex

Conversation

@freinquin
Copy link
Copy Markdown
Contributor

The SINEX format is a block-oriented file format used in science, and especially space geodesy. It was created about 30 years ago (https://www.iers.org/SharedDocs/Publikationen/EN/IERS/Documents/ac/sinex/sinex_v202_pdf.pdf). The files are usually created by programs (just like XML files usually are) but it would be very useful to navigate through those files via a SINEX-enabled text editor.
I have a working implementation for geany :
image
It is my understanding that the code must be available in official releases of ctags & scintilla/lexilla before submitting a pull request on the geany repo. The ctags part was included in July, this is the lexilla part.

@freinquin freinquin force-pushed the devel_sinex branch 3 times, most recently from feb6a72 to 9147454 Compare September 12, 2025 21:05
Comment thread lexers/LexSINEX.cxx

using namespace Lexilla;

// States when parsing a real number
Copy link
Copy Markdown
Contributor

@zufuliu zufuliu Sep 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use anonymous namespace for rest of the file before extern const LexerModule line (see LexZig.cxx), then you can remove static from function definition.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. Done.

@freinquin
Copy link
Copy Markdown
Contributor Author

Sync'ed with current master branch

@nyamatongwe
Copy link
Copy Markdown
Member

SCE_SINEX_STRING is defined but never used.

There's a warning from cppcheck for lengthLine. If it can be less than 0 then passing as unsigned is dangerous.

lexilla\lexers\LexSINEX.cxx:162:17: warning: Checking if unsigned expression 'lengthLine' is less than zero. [unsignedLessThanZero]
 if (lengthLine <= 0)
                ^

@nyamatongwe nyamatongwe added the sinex Caused by the SINEX lexer label Oct 5, 2025
@freinquin
Copy link
Copy Markdown
Contributor Author

SCE_SINEX_STRING is defined but never used.

You're right. Now removed.

There's a warning from cppcheck for lengthLine. If it can be less than 0 then passing as unsigned is dangerous.

Can't happen. The passed argument has type "size_t" (unsigned something). Anyway, my test is an old habit of trying and catch all possible values and more. Changed to a mere "==".

nyamatongwe pushed a commit that referenced this pull request Oct 8, 2025
@nyamatongwe nyamatongwe added the committed Issue fixed in repository but not in release label Oct 8, 2025
@nyamatongwe
Copy link
Copy Markdown
Member

Committed.

@nyamatongwe nyamatongwe removed the committed Issue fixed in repository but not in release label Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sinex Caused by the SINEX lexer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants