[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] Bitbucket updated rendering of Modula-2 sources with GM2 suppo
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] Bitbucket updated rendering of Modula-2 sources with GM2 support |
Date: |
Thu, 31 Mar 2016 07:56:54 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Benjamin Kowarsch <address@hidden> writes:
> About a year ago I had updated my Modula-2 plugin for the Pygments
> rendering framework to support multiple dialects, including GM2
> extensions.
>
> Bitbucket.org have now finally updated their Pygments installation and
> the multi-dialect plugin is now active, although it is not the latest
> version.
>
> If you host any of your Modula-2 sources on Bitbucket, you can have
> them rendered specific to the dialect and GM2 extensions you might use
> by inserting a special comment with a dialect tag in each source file.
>
> For example, if you are using GM2 with PIM, you can insert tag
>
> (*!m2pim+gm2*)
>
> or if you are using GM2 with ISO, you can insert tag
>
> (*!m2iso+gm2*)
>
> and the plugin will recognise all the appropriate reserved words,
> predefined identifiers etc and render them accordingly.
>
> Until some time ago, Github were also using Pygments but they have
> since migrated away from Python to Ruby. Since there is no renderer
> for Ruby that covers as many languages, they embarked on a migration
> path where a mishmash of multiple renderers are used until all
> previous capabilities are available under Ruby. This is a moving
> target and I have refrained from any effort to port the plugin.
>
> Nevertheless, the Pygments framework can also be used standalone to
> render sources to PDF, RTF and other formats. Using it standalone
> allows more control over the output by supplying one's own style
> sheets. The plugin also supports Algol rendering mode, whereby all
> reserved words and predefined identifiers are rendered in the style of
> the Algol-60 report, that is to say, reserved words in lowercase
> boldface (and optionally underlined), predefined identifiers lowercase
> boldface italic.
>
> You can get the latest version here:
>
> https://bitbucket.org/trijezdci/m2r10/src/9767a567c711b92c6dedc87540d3600c5210cba8/_GRAMMAR/pygments.lexers.modula2.py
>
>
> https://bitbucket.org/trijezdci/m2r10/src/9767a567c711b92c6dedc87540d3600c5210cba8/_GRAMMAR/pygments.styles.algol.py
>
>
> https://bitbucket.org/trijezdci/m2r10/src/9767a567c711b92c6dedc87540d3600c5210cba8/_GRAMMAR/pygments.styles.algol_nu.py
>
> Pygments is available from pygments.org.
Hi Benjamin,
this is really great thank you! This must have been a lot of work and
it will be good to see source code rendered correctly on bitbucket.
Also hugely useful to generate pdf/rtf output for reports etc.
Once again thank you
regards,
Gaius