glcpp: Fix two (or more) successive applications of token pasting
authorCarl Worth <cworth@cworth.org>
Thu, 29 Sep 2011 23:51:08 +0000 (16:51 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 30 Sep 2011 18:43:59 +0000 (11:43 -0700)
commit3c01a589448b92945f26bd7e3bfa75155c06f3cf
tree39d270335dae7150e8a106ebe6e3e74a214b0758
parent8e6b99e7b13da33547fcc8388fe867e851ee0bda
glcpp: Fix two (or more) successive applications of token pasting

There was already a loop here to look for multiple token pastes, but
it was mistakenly incrementing the iterator counter after performing
one paste.

Instead, leave the loop iterator in place to coalesce as many tokens
as necessary into one.

This fixes the recently add 096-paste-twice test as well as the
following piglit test:

spec/glsl-1.30/preprocessor/concat/concat-03.frag

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Carl Worth <cworth@cworth.org>
src/glsl/glcpp/glcpp-parse.y