base implementation of recursive descent parser