Giter Club home page Giter Club logo

extract-code's Introduction

Extract Code

A filter for extracting TeX'able code from source files. I originally wrote this tool to support the writing of my book "Concurrent Programming in ML" (Cambridge University Press), and then later extended it to support other research languages that I have worked on (e.g., Moby and Manticore's Parallel ML).

Commands are specified as comments that must begin at the start of a line and have "(*@" as their first three characters.

The supported commands are (using SML comment syntax):

(*@FILE attributes files *)

open the list of files for extracted output with the specified attibutes (attributes are @LEFT, @CENTER)

(*@BEGIN files *)

start directing output to the files

(*@END files *)

stop directing output to the specified files; if files is empty, then all active files are stoped.

(*@BEGIN-ELLIPSE *)
(*@END-ELLIPSE *)

suspend/resume output to the current files.

(*@BEGIN-HIGHLIGHT *)
(*@END-HIGHLIGHT *)

suspend/resume highlighting the output to the current files. Currently, highlighting is represented by underlining.

(*@IF-FILE files *)
(*@ELIF-FILE files *)
(*@ELSE *)
(*@END-IF *)

conditional extraction

(*@INSERT
  ... stuff ...
*)

insert the stuff into the open files

(*@KW*)token(*@WK*)

treat the token as a keyword. This markup is not supported for all source languages.

extract-code's People

Contributors

johnreppy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.