442
правки
Изменения
→Построение НКА
'''frag''' stack[1000], e1, e2, e
'''state''' s
'''for''' i = 0 '''to''' postfix.length - 1
'''switch'''(postfix[i])
'''case''' '.': <span style="color:#008000">// конкатенация</span>
e2 = stack.pop()
patch(e.out, s)
stack.push(frag(e.start, list1(s.out1)))
'''break'''
'''defaul'''t: <span style="color:#008000">// символ</span>
s = state(postfix[i], NULL, NULL)
push(frag(s, list1(s.out))
'''break'''
e = stack.pop()