state_machine_emulator/main.py
def process_file_c_program(filename, c_program):
    """ read the c program file and parse it """
    with open(filename, 'r') as c_program_file:
        line = c_program_file.readline()
        while line:
            # only process lines without comments
            if '#' not in line:
                parts = line.strip().split(',')
                for index, p in enumerate(parts):
                    if index != 1:
                        parts[index] = int(parts[index])
                    else:
                        parts[index] = parts[index].strip()
                c_program.append(parts)
            line = c_program_file.readline()
    # return c_program
 read the c program file and parse it 
read the c program file and parse it
read the c program file and parse it
def process_file_c_program(filename, c_program):
    with open(filename, 'r') as c_program_file:
        line = c_program_file.readline()
        while line:
            if '#' not in line:
                parts = line.strip().split(',')
                for index, p in enumerate(parts):
                    if index != 1:
                        parts[index] = int(parts[index])
                    else:
                        parts[index] = parts[index].strip()
                c_program.append(parts)
            line = c_program_file.readline()
def process_file_c_program ( filename , c_program ) : with open ( filename , 'r' ) as c_program_file : line = c_program_file . readline ( ) while line : if '#' not in line : parts = line . strip ( ) . split ( ',' ) for index , p in enumerate ( parts ) : if index != 1 : parts [ index ] = int ( parts [ index ] ) else : parts [ index ] = parts [ index ] . strip ( ) c_program . append ( parts ) line = c_program_file . readline ( )
read the c program file and parse it
read the c program file and parse it
""" read the c program file and parse it """ # only process lines without comments # return c_program
filename
c_program