determines if the input sequence between this left parenthesis and the matching "right parenthesis is valid; the left parenthesis is saved in last

determine(pvalid,currentchar);