Literate programming features

From CoreASM Wiki

Jump to: navigation, search

As an additional front-end, or maybe a pre-processor to some current front-end (e.g., Carma), we may want to introduce a filter to extract CoreASM code from textual documents.

Inspiration for this feature comes of course from the corresponding AsmL model, but also from classic Literate Programming works (e.g., Knuth). A distinct possibility would be to write an OpenOffice (Writer) style to mark the code and a macro to run Carma in the background and load the spec's output in a new OpenOffice document. We could also write a (very simple!) filter to extract the code from an ODF document and save it as a .casm file (possibly, with the intervening text embedded as comments).

--Vincenzo 11:27, 6 October 2006 (PDT)

An effective approach could be to develop a "standardized" set of LaTeX macros for typesetting CorASM code (the same macros we already have developed for our papers), with two different sets of definitions: one which would produce LaTeX code for typesetting, another one which would produce ASCII source for CoreASM. This would allow us to copy & paste macro-based LaTeX code from papers, compile it with the second set of macros, and obtain the source code to run with CoreASM.

--Vincenzo 15:54, 9 October 2006 (PDT)

Personal tools