Dienstag, 22. September 2009

Subethaedit Promela Mode

I have revised and fixed the Promela mode from the Subethaedit website (written by Ingmar J. Stein) a while back. Somehow my submission to the website probably got lost and i didn't follow up on it. Anyway, i revised it once again and you can download it directly from here. In a nutshell, this is what happened to the mode since i started changing the mode from the website:
  • Updated keywords.
  • Fixed a bug the prevent the keywords from being colored correctly.
  • Integrated Applescripts for syntax check and startup of a modified Xspin version.
  • Code folding.
The bundled Xspin version is a modified version of the latest Xspin 5.2 version. In a nutshell, the xspin version disables any kind of file operation (since you should do that with Subethaedit) and reloads the promela file on any operation. That way, you can use Xspin as a frontend for Spin without fear to break anything and Subethaedit for editing.

Preliminaries:
  • The promela binary must be placed in /usr/local/bin, i.e., /usr/local/bin/spin. Otherwise, it won't work. See an earlier blog post with a few comments how to compile Spin on MacOS.
  • For Xspin to work, you need Tcl/TK. The versions i use are Tl 8.4.19 and Tk 8.4.19. I can't say whether it will work for different versions. I know i had trouble with more recent versions once.
The whole thing hasn't been tested extensively, but it works for me and at least for me it works better than the mode on the Subethaedit website. Enjoy!
blog comments powered by Disqus