Mercurial > pub > ImplabNet
diff Implab/Formats/TextScanner.cs @ 181:b2b6a6640aa3 ref20160224
minor fixes and debug
author | cin |
---|---|
date | Thu, 24 Mar 2016 03:54:46 +0300 |
parents | c32688129f14 |
children | 76e8f2ba12b8 |
line wrap: on
line diff
--- a/Implab/Formats/TextScanner.cs Thu Mar 24 02:30:46 2016 +0300 +++ b/Implab/Formats/TextScanner.cs Thu Mar 24 03:54:46 2016 +0300 @@ -61,10 +61,16 @@ while (pos < m_bufferSize) { var ch = m_buffer[pos]; - state = dfa[state, ch > maxSymbol ? AutomatonConst.UNCLASSIFIED_INPUT : alphabet[ch]]; - if (state == AutomatonConst.UNREACHABLE_STATE) + try { + var next = dfa[state, ch > maxSymbol ? AutomatonConst.UNCLASSIFIED_INPUT : alphabet[ch]]; + + if (next == AutomatonConst.UNREACHABLE_STATE) break; - + + state = next; + }catch { + throw; + } pos++; }