Tom Lane writes:
> I think the minimum-damage place to fix this is by requiring \n after
> {comment} in the horiz_whitespace rule. As is, it's possible for
> xqcat to match to a second quote that is in the body of a -- comment.
You mean like this?
horiz_whitespace ({horiz_space}|{comment}{newline})
whitespace_with_newline ({horiz_whitespace}*{newline}{whitespace}*)
That doesn't work. The offending comment in the example is matched to
{whitespace} after {newline} in the second rule. The {horiz_whitespace}*
is matched to empty. We could do
special_whitespace ({space}+|{comment}{newline})
horiz_whitespace ({horiz_space}|{comment})
whitespace_with_newline ({horiz_whitespace}*{newline}{special_whitespace}*)
--
Peter Eisentraut peter_e@gmx.net