defining clear ownership pattern for grammar symbols, getting rid of all
shared_ptrs in the parser