FILE(READ ${SRC} _src)
string(REGEX MATCHALL "[ID]PARM_[A-Z_]*[ ]*=[ ]*[0-9]+[^\n]*\n" _iparms "${_src}")

string(REGEX MATCHALL "[ID]PARM_[A-Z_]*[ ]*=[ ]*[0-9]+[^\n]*\n" _iparms "${_src}")
string(REGEX REPLACE "([ID]PARM_[A-Z_]*)[ ]*=[ ]*([0-9]+)[^\n]*\n" "  if(!strcmp(\"\\1\", string)) { *value = \\2_semicolumn_ return 0_semicolumn_}\n" _iparms "${_iparms}")
string(REPLACE ";" "" _iparms "${_iparms}")
string(REPLACE "_semicolumn_" ";" _iparms "${_iparms}")
string(REGEX MATCHALL "API_[A-Z_]*[ ]*=[ ]*[0-9]+[^\n]*\n" _api "${_src}")
string(REGEX REPLACE "(API_[A-Z_]*)[ ]*=[ ]*([0-9]+)[^\n]*\n" "  if(!strcmp(\"\\1\", string)) { *value = \\2_semicolumn_ return 0_semicolumn_}\n" _api "${_api}")
string(REPLACE ";" "" _api "${_api}")
string(REPLACE "_semicolumn_" ";" _api "${_api}")
FILE(WRITE ${DST} "#include <string.h>
int api_str_to_int( char * string, int * value) {
${_iparms}
${_api}
  return 1;
}")
