Chris <chrisb@nimrod.itg.telstra.com.au> writes:
>> the grammar is just plain not LR(1) unless you
>> count UNION JOIN as a single token.
> Would it be bad to make UNION JOIN as a single token?
That's exactly the solution I'm proposing. However, it's pretty painful
to make the lexer do it directly (consider intervening comments, for
example) so what I have in mind is a filter between the parser and lexer
that does one-token lookahead when it finds a UNION token. If next
token is JOIN, pass back just one UNIONJOIN token, else stash away the
second token to be returned on next call from parser.
regards, tom lane