LL(1) simple parser with grammar. Transform program to RPN