| |
---|
| | |
---|
| | # Program Information |
---|
| | |
---|
| | PROGNAME = "tconfpy" |
---|
| | RCSID = "$Id: tconfpy.py,v 1.160 2004/04/02 09:21:19 tundra Exp $" |
---|
| | RCSID = "$Id: tconfpy.py,v 1.161 2004/04/06 19:50:17 tundra Exp $" |
---|
| | VERSION = RCSID.split()[2] |
---|
| | |
---|
| | # Copyright Information |
---|
| | |
---|
| |
---|
| | Messages["eSTRINGSHORT"] = FILENUM + "Right-Hand-Side Too Short. '%s' Must Be At Least %s Characters Long" |
---|
| | Messages["eTYPEBAD"] = FILENUM + "Type Mismatch. '%s' Must Be Assigned Values Of Type %s Only" |
---|
| | Messages["eVALLARGE"] = FILENUM + "%s Is Larger Than The Maximum Allowed, %s, For Variable '%s'" |
---|
| | Messages["eVALSMALL"] = FILENUM + "%s Is Smaller Than The Minimum Allowed, %s, For Variable '%s'" |
---|
| | Messages["eVARDOLLAR"] = FILENUM + "Variable Name Cannot Begin With The '%s' Symbol" % DOLLAR |
---|
| | Messages["eVARRESERVED"] = FILENUM + "Variable Name Cannot Begin With The '%s' Symbol" |
---|
| | Messages["eVARNAMESPC"] = FILENUM + "Variable Names May Not Contain Whitespace" |
---|
| | Messages["eVARNONAME"] = FILENUM + "Variable Name Evaluates To Null String. Not Permitted" |
---|
| | Messages["eVARREADONLY"] = FILENUM + "Variable '%s' Is Read-Only. Cannot Change Its Value" |
---|
| | Messages["eVARUNDEF"] = FILENUM + "Attempt To Reference Undefined Variable '%s'" |
---|
| |
---|
| | if btyp != IF: |
---|
| | ErrorMsg("eELSENOIF", (cfgfile, linenum)) |
---|
| | CondStack.append(["", False]) # Error makes all that follows False |
---|
| | |
---|
| | # We *are* in an IF block and ELSE is appropriate. |
---|
| | # We *are* in an IF block an ELSE is appropriate. |
---|
| | # To determine whether the ELSE should be taken or not we have |
---|
| | # to look at the state of that IF block AND the state of |
---|
| | # the block that contains the IF. This is because the IF |
---|
| | # block state is the AND of the state of its parent block |
---|
| |
---|
| | |
---|
| | if not l: |
---|
| | ErrorMsg("eVARNONAME", (cfgfile, linenum)) |
---|
| | |
---|
| | # Suppress attempts to set variables named with leading DOLLAR |
---|
| | |
---|
| | elif l[0] == DOLLAR: |
---|
| | ErrorMsg("eVARDOLLAR", (cfgfile, linenum)) |
---|
| | # Suppress attempts to set variables named starting |
---|
| | # with certain reserved symbols because dereferencing |
---|
| | # such variable names is impossible |
---|
| | |
---|
| | elif l[0] in (COMMENT, ENVIRO): |
---|
| | ErrorMsg("eVARRESERVED", (cfgfile, linenum, l[0])) |
---|
| | |
---|
| | # Suppress any attempt to change a RO variable |
---|
| | |
---|
| | elif l in SymTable and not SymTable[l].Writeable: |
---|
| |
---|
| | |