[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sablecc grammar puzzle



It seems that the problem here is that the expression grammar is trying to
do semantic checking at parse time, but it really doesn't have enough
context to do so.

Fortunately, you can separate semantic checking from parsing, by just
parsing identifiers and not classifying them as being boolean functions or
value functions (i.e. combine atomic_factor and boolean_function); use a
walker to do type checking at a later phase.

pat