[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. AutoGen Definitions File

This chapter describes the syntax and semantics of the AutoGen definition file. In order to instantiate a template, you normally must provide a definitions file that identifies itself and contains some value definitions. Consequently, we keep it very simple. For "advanced" users, there are preprocessing directives, sparse arrays, named indexes and comments that may be used as well.

The definitions file is used to associate values with names. Every value is implicitly an array of values, even if there is only one value. Values may be either simple strings or compound collections of name-value pairs. An array may not contain both simple and compound members. Fundamentally, it is as simple as:

 
prog_name = "autogen";
flag = {
    name      = templ_dirs;
    value     = L;
    descrip   = "Template search directory list";
};

For purposes of commenting and controlling the processing of the definitions, C-style comments and most C preprocessing directives are honored. The major exception is that the #if directive is ignored, along with all following text through the matching #endif directive. The C preprocessor is not actually invoked, so C macro substitution is not performed.

2.1 The Identification Definition  
2.2 Named Definitions  
2.3 Assigning an Index to a Definition  
2.4 Dynamic Text  
2.5 Controlling What Gets Processed  
2.6 Pre-defined Names  
2.7 Commenting Your Definitions  
2.8 What it all looks like.  
2.9 YACC Language Grammar  
2.10 Alternate Definition Forms  



This document was generated by Bruce Korb on June 4, 2003 using texi2html

Viewable With Any Browser   AutoGen Home