comparison Implab/Automaton/RegularExpressions/RegularExpressionVisitor.cs @ 236:302ca905c19e v2

JsonReader optimizations
author cin
date Tue, 21 Nov 2017 14:57:58 +0300
parents d5c5db0335ee
children
comparison
equal deleted inserted replaced
235:b49969a7043c 236:302ca905c19e
127 127
128 public virtual void Visit(EndToken token) { 128 public virtual void Visit(EndToken token) {
129 if (m_root == null) 129 if (m_root == null)
130 m_root = token; 130 m_root = token;
131 m_idx++; 131 m_idx++;
132 m_indexes[m_idx] = AutomatonConst.UNCLASSIFIED_INPUT; 132 m_indexes[m_idx] = AutomatonConst.UnclassifiedInput;
133 m_firstpos = new HashSet<int>(new[] { m_idx }); 133 m_firstpos = new HashSet<int>(new[] { m_idx });
134 m_lastpos = new HashSet<int>(new[] { m_idx }); 134 m_lastpos = new HashSet<int>(new[] { m_idx });
135 Followpos(m_idx); 135 Followpos(m_idx);
136 m_ends.Add(m_idx); 136 m_ends.Add(m_idx);
137 } 137 }