| |
---|
| | SymbolTable.Symbols => All symbols and their values as a result of the parse |
---|
| | SymbolTable.DebugMsgs => Any Debug Messages if debug was requested |
---|
| | SymbolTable.ErrMsgs => Any Error Messages |
---|
| | SymbolTable.WarnMsgs => Any Warning Messages |
---|
| | Symboltable.LiteralLines => Any Literal Text found in the configuration file |
---|
| | SymbolTable.LiteralLines => Any Literal Text found in the configuration file |
---|
| | SymbolTable.TotalLines => Total number of lines processed |
---|
| | SymbolTable.Visited => List of configuration files processed |
---|
| | .fi |
---|
| | .ft \" revert |
---|
| | |
---|
| | You can tell whether a parse was successful by examining \fCErrMsgs\fP. |
---|
| |
---|
| | |
---|
| | .ft C \" Courier |
---|
| | .nf |
---|
| | retval = ParseConfig("myconfigfile", AllowNewVars=False) |
---|
| | w.fi |
---|
| | .fi |
---|
| | .ft \" revert |
---|
| | |
---|
| | This means that the configuration file can "reference" any predefined |
---|
| | variables, and even change their values (if they are Writeable), but |
---|
| |
---|
| | whitespace is ignored, as is whitespace around comparison |
---|
| | operators. However, there are some places where |
---|
| | whitespace matters: |
---|
| | |
---|
| | - Variable names may not contain whitespace |
---|
| | |
---|
| | - Directives must be followed by whitespace if they take |
---|
| | other arguments. |
---|
| | |
---|
| | - When assigning a value to a string variable, whitespace |
---|
| | within the value on the right-hand-side is preserved. |
---|
| | Leading- and trailing whitespace around the right-hand- |
---|
| | side of the assignment is ignored. |
---|
| | |
---|
| | - Whitespace within both the left- and right-hand-side |
---|
| | arguments of a conditional comparison |
---|
| | (\fC.if ... == / != ...\fP) is significant for purposes |
---|
| | of the comparison. |
---|
| | Variable names may not contain whitespace |
---|
| | |
---|
| | Directives must be followed by whitespace if they take |
---|
| | other arguments. |
---|
| | |
---|
| | When assigning a value to a string variable, whitespace |
---|
| | within the value on the right-hand-side is preserved. |
---|
| | Leading- and trailing whitespace around the right-hand- |
---|
| | side of the assignment is ignored. |
---|
| | |
---|
| | Whitespace within both the left- and right-hand-side |
---|
| | arguments of a conditional comparison |
---|
| | (\fC.if ... == / != ...\fP) is significant for purposes |
---|
| | of the comparison. |
---|
| | |
---|
| | |
---|
| | .IP \(bu 4 |
---|
| | Case is always significant except when assigning a value to Booleans |
---|
| |
---|
| | There is only one master copy of the configuration that needs to be |
---|
| | edited when system-wide changes are required. |
---|
| | |
---|
| | .P |
---|
| | |
---|
| | One last thing needs to be noted here. \fCtconfpy\fP does not detect |
---|
| | so-called "circular" inclusions. If file \fCa\fP \fC.include\fPs file |
---|
| | \fCb\fP and file \fCb\fP \fC.include\fPs file \fCa\fP, you will have an |
---|
| | infinite loop of inclusion, which, uh ..., is a Bad Thing... |
---|
| | One last thing needs to be noted here. \fCtconfpy\fP does not permit |
---|
| | so-called "circular" or "recursive" inclusions. If file \fCa\fP |
---|
| | \fC.include\fPs file \fCb\fP and file \fCb\fP \fC.include\fPs file |
---|
| | \fCa\fP, you will have an infinite loop of inclusion, which, uh ..., |
---|
| | is a Bad Thing. So, the parser checks each time you attempt to open a |
---|
| | new configuration file to see if it's already been processed. If it |
---|
| | has, an error is produced, and the \fC.include\fP line that would have |
---|
| | caused a circular reference is ignored. Thereafter, the program will |
---|
| | continue to process the remainder of the configuration as usual. |
---|
| | |
---|
| | .SS Conditional Directives |
---|
| | |
---|
| | One of the most powerful features of \fCtconfpy\fP is its "conditional |
---|
| |
---|
| | .fi |
---|
| | .ft \" revert |
---|
| | |
---|
| | .SH DOCUMENT REVISION INFORMATION |
---|
| | $Id: tconfpy.3,v 1.157 2005/01/20 08:18:32 tundra Exp $ |
---|
| | |
---|
| | $Id: tconfpy.3,v 1.158 2005/01/20 08:42:34 tundra Exp $ |
---|
| | |
---|
| | |