Let’s come to the last bigger part of this already long article, the tools and methods I use.
Fixity resolution: Infix operators are re-associated according to。关于这个话题,新收录的资料提供了深入分析
,更多细节参见新收录的资料
One of several pseudocode snippets from Ukkonen's paper, describing the update function. Clear on paper, but its translation to working code is much more verbose than this.It took me a few hours to get right. Not because the pseudocode was wrong: it was precise and correct. The difficulty was that the algorithm manipulates a tree in non-obvious ways. There is an “active point” that walks around the tree. Suffix links connect internal nodes as shortcuts. Three different extension rules fire depending on what is already in the tree and what is being added. The pseudocode tells you what to do, but building an intuition for why it works requires watching it happen.
There are a few things you can notice from reading this code:。新收录的资料对此有专业解读