function [includes, paramNames] = parseConstParams(const_params_file)
% parseConstParams identifies existing parameter names and include files

%   Copyright 2017-2018 The MathWorks, Inc.

content = fileread(const_params_file);

% Parse out any include files, e.g. extract rtwtypes.h from a line like
% 
%     #include "rtwtypes.h"
includes = regexp(content, '(?<=\#include\s+\")\S+?(?=\")', 'match');

% Parse out any const parameter names, e.g. extract param_name from a line like
% 
%    const real32_T rtCP_pooled_paPucvh9XzBJ[2] = {1.0F, 2.0F};
paramNames = regexp(content, '(?<=const\s+\S+\s+)\S+?(?=\s|\[)', 'match');
paramNames = unique(paramNames);

