function b = BR_isEQop(s)
% BR_isEQop - determines if s is an = statement
% On input:
%     s (string): logical string
% On output:
%     b (Boolean): true if = statement, else false
% Call:
%     b = BR_isEQop(s);
% Author:
%     T. Henderson
%     UU
%     Fall 2018
%

LEFT_PAREN = '(';
RIGHT_PAREN = ')';
EQ_OP = '=';

b = 0;

len_s = length(s);
count = 1;
for c = 2:len_s
    if s(c)==LEFT_PAREN
        count = count + 1;
    elseif s(c)==RIGHT_PAREN
        count = count - 1;
    end
    if count==1&s(c+1)==EQ_OP
        b = 1;
        return
    end
end
