RFScholte - 2010-10-23

And/or a try/finally statement around the switch to catch them all, no matter what.
Only with one of these solutions I will be able to catch them all.

To give an idea why we need such solution: we're working on a streaming parser, which means we'll write while reading to keep the output as much as the same as the input. While writing we want to use eventhandlers to select certain states to slightly modify them. Untill now we parsed the input to a model and wrote that to a file, but this way some data might get lost (comments, indents, etc.). That's why we need to catch every loop.

example :
try {
switch (zzBufferL[zzCurrentPosL]) {
//a lot of cases and a default
}
finally {
%statehandler%
}

}