reference implementation of pl0 grammar