I am primarily a Vim user, but I'm interested in Pacu since it allows scripting Syntax HIghlighting (and other things ?) with Javascript. Is there any documentation on how to write such scripts, the API exposed, etc. I'm also interested in the terminal window and if there is any integration between the terminal window and the text buffers, perhaps via scripting also?
Each release of Pacu ships with a copy of charcoal, which is a collection of syntax descriptions (see: http://github.com/unclewerner/charcoal). There's currently no other way of scripting Pacu, but it has been quite easy to create script bindings (easier than reading XML stuff!-) The terminal uses an intelligent message detection based on the same syntax descriptions as used for the highlighting. I could open it up, too. Documentation is still missing, but implementation of the syntax description language is open, entirely one file: http://github.com/unclewerner/libPONA/blob/master/pona/Syntax.hpp. I recently tried to explain someone how it works, but I fear it is mind-boggling. Basically you need three parts: a syntax definition in a graph oriented style (like BNF, but pona::Syntax), a "stack" and colour support by a theme. Pacu can parse files in multiple levels (like Ruby embedded in XHTML) and therefore the "stack" defines the order of the different levels.
Damn... now I'm starting to write the docu right here. Anyway, you were probably looking for automating command line driven workflows. If you have a specific idea, let me know. I see then how I could support it by extending/documenting the scripting API.
FYI: I screwed up haXe support in version 1.2 and it will be fixed with Pacu-1.2.2, which I hope to push in two days clear.
2010-06-21 10:14 PM
2010-06-22 01:39 AM
Damn... now I'm starting to write the docu right here. Anyway, you were probably looking for automating command line driven workflows. If you have a specific idea, let me know. I see then how I could support it by extending/documenting the scripting API.
FYI: I screwed up haXe support in version 1.2 and it will be fixed with Pacu-1.2.2, which I hope to push in two days clear.
2010-06-22 02:12 AM