PCG: Cog in Perl

Sunday 5 February 2006This is nearly 19 years old. Be careful.

Jeremy Shute wrote me to say that he like the idea of my Cog code generator enough to reimplement it in Perl: PCG :: The Perl Code Generator.

Jeremy also sent along an elisp snippet to get Emacs to run Cog interactively, handy during development of the code generators:

;; COG stuff.
(defun cog-buffer ()
  (interactive)
  (save-buffer)
  (call-process "cog.py" nil "*Messages*" nil "-r" (buffer-file-name))
  (revert-buffer nil t))
(global-set-key [f5] 'cog-buffer)

Comments

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.