-
-
Notifications
You must be signed in to change notification settings - Fork 436
Added IBM RPG lexer #1078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Added IBM RPG lexer #1078
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n github-linguist
…re keywords as some keywords are also special values (ex: date // *date)
alecthomas
approved these changes
May 12, 2025
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi !
Here's a lexer for IBM RPG !
You can learn about this language here :
For legacy purposes, the language can be written in two different forms, the fixed format (looks like a punched card, expects specific characters to be at certain columns in source code) and the free format (gets rid of fixed format, and looks like modern languages as Python).
This lexer only handles the free format, I may open a pull request later to implement the fixed format syntax.
There are some RPG repositories available on GitHub, you can search using "language:RPGLE" to see them.
The language is old but still maintained and even continues to evolve nowadays.
The lexer is based on the latest version at this day, RPG 7.6.
Are the MIME types in the XML files important ? I don't think this language has one (and I didn't know there were MIME types for programming languages), so I made one which looks like what I saw in other lexers XML files.
And the language can have embedded SQL statements in the source code, so I reused the SQL lexer. Please tell me if there's a better way to do it.
The language is rather tied to IBM environment, so if you're interested, here's how to try it :