The Rexx Highlighter


The Rexx Highlighter

The Rexx Highlighter is a child project of the Rexx Parser. Developed around a common code base, it highlights Rexx programs as HTML, for ANSI terminals and as DocBook, and RexxPub adds a mode for (Lua)LaTeX.

~~~rexx
Say "Done!" -- Inform the user
~~~
Say "Done!" -- Inform the user

The figure above shows the HTML highlighter in action, or, to be more precise, the effect of a Rexx fenced code block in a Markdown file.


The highlighter in ooRexx

The highlighter is part of ooRexx since version 5.3.0 beta, revision 13571, with the parser. Its reference is the book, in the chapters:

  • Highlighting: the Highlighter class, its modes and options, and what is highlighted (variables and keywords, calls, compound variables and taken constants, numbers and strings, documentation comments).
  • Style Sheets: the 24 styles that come with ooRexx, with a gallery of all of them, and the format of a style sheet.
  • Style Patches: how to change a style for one listing.
  • Output Formats: what each mode writes.
  • Utilities and Samples: highlight and fencedcode, and the format of a Rexx fenced code block.
  • Highlighting in DocBook: how the ooRexx books get their listings highlighted.

The HTML version of the book has a style chooser, which changes the style of all the listings at once.

What RexxPub adds

RexxPub finds a style that is not in the parser's parser/css/ through the REXX_PARSER_STYLE_PATH environment variable (see Installation).