Jump to content
Excelsior Forums
Sign in to follow this  
AlexIljin

Oberon-2 syntax highlighting plugin for Notepad++

Recommended Posts

  • Oberon2Lexer v0.3 - the new syntax highlighting plugin for Notepad++ is now available for download. Both flavours of Notepad++ (ANSI and Unicode) are supported.
    This announcement is also available in Russian:
http://forum.oberoncore.ru/viewtopic.php?f=30&t=2205
Can do:
  • the plugin adds "Oberon-2" entry to the "Languages" menu, and is associated with the .ob2 file extension by default;
  • text is highlighted with the following styles (the background colour is always white, unlike on this forum):
  • Unsafe - the word SYSTEM, highlighted in red;
  • Flow breaker - the words EXIT, RETURN and HALT, highlighted in bold blue;
  • Keyword - all the predefined identifiers I could find except for the ones mentioned in "Unsafe" and "Flow breaker" styles, highlighted in blue: IF THEN ELSE END;
  • Number - REAL (including the "E" and "D" syntax) and INTEGER constants (including hexadecimal numbers with the "H" suffix), not highlighted by default;
  • String - 'single-quoted' and "double-quoted" strings and hexadecimal numbers with the "X" suffix, not highlighted by default;
  • Comment - (* block comments (* with arbitrary nesting level *) *) and -- wing comments, highlighted in gray;
  • Compiler option - <* XDS compiler pragmas (* with nested comments *) *>, highlighted in green;
  • Error - unterminated strings, comments, compiler options, as well as invalid numbers (1.E+), invalid characters (e.g. %, @, $), etc., highlighted in underlined red;
  • Default - everything else is black on white by default.

[*]you can change the font, colour, etc. for each of the styles in the standard "Settings - Styler Configurator..." dialog. You can also assign other file extensions to be handled by this plugin.

'

Can NOT do:

  • modify the list of recognized keywords;
  • code folding - planned for a future release.

'

A direct download link:

http://cdnetworks-kr-1.dl.sourceforge.net/project/oberonrevival/Oberon2Lexer/Oberon2Lexer.v0.3.zip

A list of SourceForge mirrors is available here:

http://sourceforge.net/projects/oberonrevival/files/Oberon2Lexer/Oberon2Lexer.v0.3.zip/download

Full source code is included (two XDS Oberon-2 projects, the one with the "U" suffix is for the Unicode version of Notepad++). The scanner is implemented in a portable manner (see the project structure on the attached images). There is a separate module to attach the plugin to Notepad++, another module to attach it to Scintilla, and the scanner itself is completely independent and can be ported to any application. Legend: red = modules importing SYSTEM, square frame = modules importing Windows.def, oval = the rest.

post-2688-13028569903389_thumb.png

post-2688-13028569903761_thumb.png

Share this post


Link to post
Share on other sites

Oberon2Lexer v0.3.1 was released. This is a minor bugfix release. The only bug fixed was invalid highlighting of hexadecimal constants (H and X suffixes) if the constant contained lower case characters.

Release notes can be seen here: https://sourceforge.net/projects/npp-plugins/files/Oberon2Lexer/Oberon2Lexer%200.3.1/ReleaseNotes.v0.3.1.txt/view

A direct download link: http://citylan.dl.sourceforge.net/project/npp-plugins/Oberon2Lexer/Oberon2Lexer%200.3.1/Oberon2Lexer.v0.3.1.zip

For a list of SourceForge mirrors visit this page: https://sourceforge.net/settings/mirror_choices?projectname=npp-plugins&filename=Oberon2Lexer/Oberon2Lexer%200.3.1/Oberon2Lexer.v0.3.1.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×