Parser done for both standard and buffer inputs.