% Input: string (containing user input)

% Output: string

% Description:
% Checks if the input contains simple syntactical errors and stops the
% computation with an error message in this case.

function [modified] = simplesyntaxcheck(string)
% simple syntax error checks
    if  ismember('*',string)
        error('Equation %s may not contain *. For instance, write 3x + 0.65y <= 3 instead of 3*x + 0.65*y <= 3',string);
    end;
    
    if  ismember('(',string) ||  ismember('(',string)
        error('Equation %s may not contain brackets.',string);
    end;  
    
    if ~isempty(regexp(string,'<[0123456789]','ONCE'))
        error('< not supported. Please use <= instead');
    end;
    
    if ~isempty(regexp(string,'>[0123456789]','ONCE'))
        error('> not supported. Please use >= instead');
    end;
    
    %modified = strrep(string, '*', '');
    modified = string;