Optionally use 'cio' in place of 'trick_chkpnt_io' field #749

Added an alias to use cio for trick_chkpnt_io and io for trick_io.
This commit is contained in:
Alex Lin 2019-06-14 07:43:37 -05:00
parent 0e7d1ae345
commit 78b5a0c692

View File

@ -145,6 +145,14 @@ void FieldDescription::parseComment(std::string comment) {
comment = get_regex_field(comment , "(.*)@?trick_chkpnt_io[\\({]([^\\)}]+)[\\)}]" , 1) + comment = get_regex_field(comment , "(.*)@?trick_chkpnt_io[\\({]([^\\)}]+)[\\)}]" , 1) +
get_regex_field(comment , "@?trick_chkpnt_io[\\({]([^\\)}]+)[\\)}](.*)" , 2) ; get_regex_field(comment , "@?trick_chkpnt_io[\\({]([^\\)}]+)[\\)}](.*)" , 2) ;
} }
ret_str = get_regex_field(comment , "@?cio[\\({]([^\\)}]+)[\\)}]" , 1) ;
if ( ! ret_str.empty()) {
chkpnt_io = io_map[ret_str] ;
if(debug_level >= 4) std::cout << "go for cio " << io << std::endl ;
chkpnt_io_found = true ;
comment = get_regex_field(comment , "(.*)@?cio[\\({]([^\\)}]+)[\\)}]" , 1) +
get_regex_field(comment , "@?cio[\\({]([^\\)}]+)[\\)}](.*)" , 2) ;
}
ret_str = get_regex_field(comment , "@?trick_io[\\({]([^\\)}]+)[\\)}]" , 1) ; ret_str = get_regex_field(comment , "@?trick_io[\\({]([^\\)}]+)[\\)}]" , 1) ;
if ( ! ret_str.empty()) { if ( ! ret_str.empty()) {
@ -154,6 +162,14 @@ void FieldDescription::parseComment(std::string comment) {
comment = get_regex_field(comment , "(.*)@?trick_io[\\({]([^\\)}]+)[\\)}]" , 1) + comment = get_regex_field(comment , "(.*)@?trick_io[\\({]([^\\)}]+)[\\)}]" , 1) +
get_regex_field(comment , "@?trick_io[\\({]([^\\)}]+)[\\)}](.*)" , 2) ; get_regex_field(comment , "@?trick_io[\\({]([^\\)}]+)[\\)}](.*)" , 2) ;
} }
ret_str = get_regex_field(comment , "@?io[\\({]([^\\)}]+)[\\)}]" , 1) ;
if ( ! ret_str.empty()) {
io = io_map[ret_str] ;
if(debug_level >= 4) std::cout << "go for io " << io << std::endl ;
io_found = true ;
comment = get_regex_field(comment , "(.*)@?io[\\({]([^\\)}]+)[\\)}]" , 1) +
get_regex_field(comment , "@?io[\\({]([^\\)}]+)[\\)}](.*)" , 2) ;
}
/* /*
Units can include parenthesis now. We need to match the parenthesis in Units can include parenthesis now. We need to match the parenthesis in