In part one of this post I covered building and annotating an abstract syntax tree from a postfix regular expression, as well as populating the firstpos, lastpos, and followpos sets for each node in the AST is it relates to it's position in the regular

Todays post is an overview of a implementing the Aho-Sethi-Ullman Direct DFA Construction algorithm, aka "Algorithm 3.5: Construction of a DFA from a Regular Expression" as originally found in "the dragon" book[1]. This post is going to go deep in the

When creating a classical Rogue-like and for many other dungeon based games as well, the levels of the game are procedurally generated. This is so that each play through of the game offers the player a new experience - no two games are the sam

Searching for the occurence of one string within the body of a larger string is a process done millions of times, and is one of the central operations in text processing. It is performed as part of  querying a search engine and whenever you press

The visitor pattern is a behavioral design pattern first popularized in the "Gang of Four" book. It is used to separate operations on types from the types themselves. When using the composite pattern to build an AST from a class heiracrchy, as one woul