A parser generator using the weak precedence method