Catch annotation sequences that don't end with newline
authorDiane Trout <diane@caltech.edu>
Sat, 23 Jun 2007 00:46:45 +0000 (00:46 +0000)
committerDiane Trout <diane@caltech.edu>
Sat, 23 Jun 2007 00:46:45 +0000 (00:46 +0000)
commit510c9340528467a30a64d03d3936a4d8fdd18af4
tree12d64d736a77728bfa25c1b44e977bc345914903
parentf3c0553a22b0e4ddc39ee45f51725352d92e97f1
Catch annotation sequences that don't end with newline
ticket:265
for some unknown reason if the last sequence in an annotation file
wasn't terminated by a new line, spirit ended up duplicating the
last character. Needless to say this meant that it wouldn't always
align properly.

I installed a hack into push_back_seq::operator() that checks for
this condition and removes the duplicated character if the bug was
triggered.

Needless to say if spirit (or my grammar) gets fixed and this bug goes
away the hack will need to be removed. I think the sequence equality
tessts in test_sequence::sequence_no_trailing_newline should trip if
the last character doesn't get duplicated.

Also I didn't test what happens if a location based sequence doesn't
end with a newline.
alg/sequence.cpp
alg/test/test_sequence.cpp