Changeset 33800ac8


Ignore:
Timestamp:
Aug 31, 2021, 1:49:09 AM (3 years ago)
Author:
Jacob Prud'homme <jafprudhomme@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
Children:
7582458
Parents:
602e8d5
git-author:
Jacob Prud'homme <jafprudhomme@…> (07/13/21 13:12:47)
git-committer:
Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:09)
Message:

Broke apart reading to intermediate format and parsing from intermediate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.cfa

    r602e8d5 r33800ac8  
    4141} // comments
    4242
    43 // Process the configuration file to set the simulation parameters.
    44 void parse_config( const char * config_file, config_entry entries[], size_t num_entries ) {
     43// Parse configuration from a file formatted in shell style
    4544        KVPairs kv_pairs{ num_entries };
    4645
     
    6564        } // try
    6665        close( in );
     66
     67        return kv_pairs;
     68}
     69
     70// Process the configuration file to set the simulation parameters.
     71void parse_config( const char * config_file, config_entry entries[], size_t num_entries ) {
     72        KVPairs kv_pairs = parse_shell_config_format( config_file );
     73
    6774        // *** WE MUST ALLOW SOME SORT OF VALIDATION FUNCTIONALITY TOO!!! ***
    68 
    6975        int entries_so_far = 0;
    7076        for ( i; kv_pairs.size ) {
Note: See TracChangeset for help on using the changeset viewer.