diff --git a/tconfpy.3 b/tconfpy.3 index ce8774d..caf2389 100644 --- a/tconfpy.3 +++ b/tconfpy.3 @@ -252,7 +252,7 @@ .B InitialSymTable (Default: \fCSymbolTable()\fP) Used to pass a pre-initialized Symbol Table from the application to -the parser. +the parser. Defaults to an empty symbol table. .TP .B AllowNewVars (Default: \fCTrue\fP) @@ -616,30 +616,15 @@ .B VarDescriptor.Default (Default: \fCEmpty String\fP) This is a place to store the default value for a given variable. When -a variable is newly-defined in a configuration file, \fCtconfpy\fP places the -first value assigned to that variable into this attribute. For -variables already in the symbol table, \fCtconfpy\fP does nothing to this -attribute. This attribute is not actually used by \fCtconfpy\fP for anything. -It is provided as a convenience so that the calling program can easily -"reset" every variable to its default value if desired. +a variable is newly-defined in a configuration file, \fCtconfpy\fP +places the first value assigned to that variable into this attribute. +For variables already in the symbol table, \fCtconfpy\fP does nothing +to this attribute. This attribute is not actually used by +\fCtconfpy\fP for anything. It is provided as a convenience so that +the calling program can easily keep track of each variable's default +value. This makes it easy to do things like "reset" every variable +when restarting a program, for example. -The one place \fCVarDescriptor.Default\fP is used within the parser is when -using Variable Templates. Suppose a \fCFoo\fP is a templated variable and the -configuration file contains the statement: - -.ft C \" Courier -.nf - Foo = -.fi -.ft \" revert - -This will reset the templated variable to its -.B default -value. This is unlike the case of a "normal" variable where such -a statement sets it to a null string - literally the Right Hand Side -contains nothing in this case. The section entitled, -.B Using Variable Templates -discusses the rationale' for these semantics. .TP .B VarDescriptor.LegalVals (Default: \fC[]\fP) @@ -707,7 +692,7 @@ If you want this test to be skipped, then set \fCLegalVals\fP to an empty list, []. (This is the default when you first create an instance of \fCtconfpy.VarDescriptor\fP.) Do not set it to a Python -None or anything else. \fCtconfpy\fP expects this attribute to be a list in +\fCNone\fP or anything else. \fCtconfpy\fP expects this attribute to be a list in every case. @@ -734,7 +719,7 @@ .ft \" revert In all cases, if you want either of these tests skipped, set \fCMin\fP -or \fCMax\fP to the Python None. +or \fCMax\fP to the Python \fCNone\fP. .P All these various validations are logically "ANDed" together. @@ -798,12 +783,12 @@ It will contain the last namespace used. -.SS How The \fCtconfpy\fP Parser Validates The Initial Symbol Table +.SS How The \fCtconfpy\fP Parser Validates The Initial Symbol And Template Tables -When you pass an initial symbol table to the parser, \fCtconfpy\fP does some -basic validation that the table contents properly conform to the -\fCVarDescriptor\fP format and generates error messages if it finds -problems. However, the program does +When you pass an initial symbol and/or template table to the parser, +\fCtconfpy\fP does some basic validation that the table contents +properly conform to the \fCVarDescriptor\fP format and generates error +messages if it finds problems. However, the program does .B not check your specifications to see if they make sense. For instance if you define an integer with a minimum value of 100 and a maximum @@ -814,6 +799,12 @@ is outside the range of \fCMin\fP to \fCMax\fP, \fCtconfpy\fP will accept it quietly. +In the case of templates, \fCtconfpy\fP all makes sure that they are all +named "canonically". That is, a template name may not itself contain +a namespace. This effectively means that there can be no namespace +separator characters (".") in the template name. + + .SS The \fCAllowNewVars\fP API Option By default, \fCtconfpy\fP lets the user define any new variables they @@ -1023,8 +1014,8 @@ \fCTemplates\fP And \fCTemplatesOnly\fP. \fCTemplates\fP is used to pass a symbol table (separate from the main symbol table) containing the Variable Templates. By default, this -option is set to \fC{}\fP which means no templates are -defined. +option is set to an object of type \fCTemplate\fP containing +no templates. So what exactly is a "Variable Template"? It is the .B exact same thing @@ -3236,4 +3227,4 @@ .ft \" revert .SH DOCUMENT REVISION INFORMATION -$Id: tconfpy.3,v 1.153 2005/01/19 09:15:10 tundra Exp $ +$Id: tconfpy.3,v 1.154 2005/01/19 22:30:55 tundra Exp $