comparison Implab/Formats/TextScanner.cs @ 178:d5c5db0335ee ref20160224

working on JSON parser
author cin
date Wed, 23 Mar 2016 19:51:45 +0300
parents a0ff6a0e9c44
children c32688129f14
comparison
equal deleted inserted replaced
177:a0ff6a0e9c44 178:d5c5db0335ee
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 ? DFAConst.UNCLASSIFIED_INPUT : alphabet[ch]]; 64 state = dfa[state, ch > maxSymbol ? AutomatonConst.UNCLASSIFIED_INPUT : alphabet[ch]];
65 if (state == DFAConst.UNREACHABLE_STATE) 65 if (state == AutomatonConst.UNREACHABLE_STATE)
66 break; 66 break;
67 67
68 pos++; 68 pos++;
69 } 69 }
70 70
71 m_tokenLength = pos - m_bufferOffset; 71 m_tokenLength = pos - m_bufferOffset;
72 } while (state != DFAConst.UNREACHABLE_STATE && Feed()); 72 } while (state != AutomatonConst.UNREACHABLE_STATE && Feed());
73 73
74 m_tokenOffset = m_bufferOffset; 74 m_tokenOffset = m_bufferOffset;
75 m_bufferOffset += m_tokenLength; 75 m_bufferOffset += m_tokenLength;
76 76
77 if (final[state]) { 77 if (final[state]) {