Implemented logic for variable assignment.
1 parent 0098ab3 commit 8a6eed78d76e3ab7179a74e7201c22bc12863d53
@tundra tundra authored on 19 Mar 2004
Showing 1 changed file
View
30
tconfpy.py
 
# Program Information
 
PROGNAME = "tconfpy"
RCSID = "$Id: tconfpy.py,v 1.123 2004/03/20 00:02:09 tundra Exp $"
RCSID = "$Id: tconfpy.py,v 1.124 2004/03/20 01:04:36 tundra Exp $"
VERSION = RCSID.split()[2]
 
# Copyright Information
 
# were found, so the only thing left might be a variable
# definition/assignment.
 
elif EQUAL in line:
 
# Do any necessary variable dereferencing
line, ref_ok = DerefVar(line, cfgfile, linenum)
 
 
# Only do this if all var references were valid
if ref_ok:
# Get left and right sides of the assignment
e = line.index(EQUAL)
l = line[:e].strip()
r = line[e+1:].strip()
 
# Construct the entry and load it into the symbol table
d = VarDescriptor()
d.Value = r
SymTable[l] = d
#####
# Line Format Is Not In One Of The Recognized Forms - Syntax Error
#####