| About | Downloads | Documents | Links |

 

The general purpose
macro processor

Introduction

gema is a general purpose text processing utility based on the concept of pattern matching. In general, it reads an input file and copies it to an output file, while performing certain transformations to the data as specified by a set of patterns defined by the user. It can be used to do the sorts of things that are done by Unix utilities such as cpp, grep, sed, awk, or strings. It can be used as a macro processor, but it is much more general than cpp or m4 because it does not impose any particular syntax for what a macro call looks like. Unlike utilities like sed or awk, gema can deal with patterns that span multiple lines and with nested constructs. It is also distinguished by being able to use multiple sets of rules to be used in different contexts.

Included with the program are examples of pattern files for using it to convert documents to HTML from LaTeX or nroff -man.

gema has been extended with a binding to the scripting language Lua, named GeL, that provides the ability of executing piece of Lua code in gema actions. It also may be used to add gema powerful matching capabilities to any Lua-enabled software. See the appropriate page in the documentation section for details.

Documentation

Look at the documents page to read online, or download, man page, reference manual and other material.

How to get it

Check the latest release at SourceForge.net Logo

Status

gema is in a stable status; no further features are planned for the time being.

License

Gema licence follows the "Historical Permission Notice and Disclaimer" template and is Open Source Software according to the OSI definition.

Copyright notice:
    This software includes parts of "gema", the general-purpose macro translator.
    GEMA is © by David N. Gray <DGray@acrg>
    (Visit http://gema.sourceforge.net/ for further details)

Permission to use, copy, modify and distribute Gema and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and supporting documentation.

Different representations of the above copyright notice are acceptable as long as they contain the same information.

Copyright holder makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.

David N. Gray March, 2004