% Author: Elsa W. Birch, ewbirch@stanford.edu, Covert Lab - Stanford Bioengineering
% Date: 4/24/2011
% Version: associated with production of the figures for Birch et al. 2012 
%
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
%
% Summary: checks for any logical keywords that may cause rule parsing or evaluation errors
% 
% Inputs: varName or any element etc as model is parsed
%
% Outputs: reservedKeywordFound - logical, true if reserved keyword is found, false if not
%
%
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
%
% Notes: 
%
%
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

function [reservedKeywordFound] = FBA_EB_reservedKeywordCheck(varName)

reservedKeywordsRegExp = '\<(and)\>|\<(not)|\<(or)\>';

[~,~,~, reservedMatches, ~, ~, ~] = regexpi(varName, reservedKeywordsRegExp);

if ~isempty( cat(2,reservedMatches{:}) );
    reservedKeywordFound = true;
else
    reservedKeywordFound = false;
end