1. Georg Brandl
  2. pygments-main
  3. Issues
Issue #601 resolved

New lexer for cfengine3 policy files

Diego Zamboni
created an issue


(I have also sent this by email, but I'm opening an issue just for completeness).

First of all, thank you for all your work in pygments! It's really a useful program, I use it primarily through gist.github.com.

I have written a pygments lexer for cfengine3 policy files (http://cfengine.org/). Cfengine is a very popular configuration management engine.

You can find the code at this gist: http://gist.github.com/571230

I've made it a separate python file for ease of testing, but if it's added to the distribution, I would suggest adding it to other.py.

You can see an example output here: http://zzamboni.org/files/cfengine_stdlib.html

It would be awesome to see cfengine support in pygments! This is my first-ever lexer, so of course I would also welcome any feedback, corrections or suggestions.

Best regards, --Diego Zamboni

Comments (6)

  1. Anonymous

    Thanks for the comment. The cfengine_stdib file is licensed as GPL, see the top of the file at http://www.cfengine.org/manuals/cfengine_stdlib.cf

    In any case, I would advise against including it with Pygments, since it's bound to cause confusion when users find they have two (very likely differing) cfengine_stdlib.cf files: the one that came with cfengine, and the one that came with Pygments.

    BTW, I've made some changes recently to the lexer to fix some erroneous recognition of certain structures, these changes are reflected in the gist at https://gist.github.com/571230, so if you grab the code from there you should have the latest version.

    Thanks again!

  2. Log in to comment