Whole document tree
    

Whole document tree

Using PRC-Tools: 4.1 General syntax
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1 General syntax

A definition file should have the extension `.def', and is a freely formatted file consisting of numbers, strings, comments, keywords, and various punctuation.

  • Numbers may be in decimal (`37'), octal (`045'), or hexadecimal (`0x25').

  • Strings are enclosed in either single (`'Hello'') or double (`"world"') quotes, and may contain the usual C escape sequences (`\t', `\n', `\'', `\"', `\\', `\177', `\x7F', ...). If a string contains no spaces and does not conflict with a keyword, the quotes may be omitted.

  • Both C style (`/* comment */') and C++ style (`// until end of line') comments may appear anywhere white space could occur, and are ignored.

A definition file consists of several clauses, which generally have syntax like the following:

 
clause-kind { specific-data... }

For example, here is a complete definition file for a (hypothetical) fairly large non-beamable application:

 
application { "Dr McCoy" DAFp copy-prevention }

/* This app has three code resources: code #1 with all unannotated
   functions, #2 with functions placed in the "editfns" section,
   and #3 with "viewfns" functions.  */

multiple code { editfns viewfns }

NOTE: some details of definition file syntax are subject to change as we figure out just what ought to be in a definition file. For example, it's unclear what the best way to handle filenames is: whether they should appear in the file at all, or whether, for example, hack traps should match corresponding filenames on the build-prc command line.



This document was generated by root on January, 30 2002 using texi2html