Added logic to suppress redefinition of reserved symbols.
1 parent 6df1dfb commit 24b2416b324213e6b21d240d626c950d36b59173
@tundra tundra authored on 24 Mar 2004
Showing 1 changed file
View
9
tconfpy.py
 
# Program Information
 
PROGNAME = "tconfpy"
RCSID = "$Id: tconfpy.py,v 1.136 2004/03/24 22:25:47 tundra Exp $"
RCSID = "$Id: tconfpy.py,v 1.137 2004/03/24 22:32:53 tundra Exp $"
VERSION = RCSID.split()[2]
 
# Copyright Information
 
Messages["eENDIFMISS"] = FILENUM + "Missing %d" + " '%s' " % ENDIF + " Statement(s)"
Messages["eEQUIVEXTRA"] = FILENUM + "Only a single '%s' Or '%s' Operator Permitted" % (EQUIV, NOTEQUIV)
Messages["eIFEXTRATXT"] = FILENUM + "Extra Text On Line. '%s' Only Accepts Variable References As Arguments"
Messages["eVARREADONLY"] = FILENUM + "Variable '%s' Is Read-Only. Cannot Change Its Value"
Messages["eRESERVED"] = FILENUM + "Cannot Modify Value Of Reserved Symbol '%s'"
Messages["eVARUNDEF"] = FILENUM + "Attempt To Reference Undefined Variable '%s'"
 
 
###########
if l in SymTable and not SymTable[l].Writeable:
 
ErrorMsg("eVARREADONLY", (cfgfile, linenum, l))
# Suppress any attempt to change a Reserved symbol
 
elif l in Reserved:
ErrorMsg("eRESERVED", (cfgfile, linenum, l))
 
# Load variable into the symbol table
 
else:
 
# Munge the variable name to incoroprate
# the current namespace