Mercurial > pub > ImplabNet
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 180:c32688129f14 | 181:b2b6a6640aa3 |
|---|---|
| 59 int pos = m_bufferOffset + m_tokenLength; | 59 int pos = m_bufferOffset + m_tokenLength; |
| 60 | 60 |
| 61 while (pos < m_bufferSize) { | 61 while (pos < m_bufferSize) { |
| 62 var ch = m_buffer[pos]; | 62 var ch = m_buffer[pos]; |
| 63 | 63 |
| 64 state = dfa[state, ch > maxSymbol ? AutomatonConst.UNCLASSIFIED_INPUT : alphabet[ch]]; | 64 try { |
| 65 if (state == AutomatonConst.UNREACHABLE_STATE) | 65 var next = dfa[state, ch > maxSymbol ? AutomatonConst.UNCLASSIFIED_INPUT : alphabet[ch]]; |
| 66 | |
| 67 if (next == AutomatonConst.UNREACHABLE_STATE) | |
| 66 break; | 68 break; |
| 67 | 69 |
| 70 state = next; | |
| 71 }catch { | |
| 72 throw; | |
| 73 } | |
| 68 pos++; | 74 pos++; |
| 69 } | 75 } |
| 70 | 76 |
| 71 m_tokenLength = pos - m_bufferOffset; | 77 m_tokenLength = pos - m_bufferOffset; |
| 72 } while (state != AutomatonConst.UNREACHABLE_STATE && Feed()); | 78 } while (state != AutomatonConst.UNREACHABLE_STATE && Feed()); |
