Published on Building an Autocomplete Library for ANTLR4 Part 1 - IntroductionDecember 24, 2022autocomplete-libraryANTLR4ANTLR4 grammars are commonly used to build parsers and syntax analyzers. However, if you dive deeper you'll find out they also be used to predict what the user is going to type next.
Published onAugust 9, 2022Defining languages with sets - A horrible yet correct alternative to grammarsgrammarsformal-languagesstandaloneGrammars define a language, and a language is a set of strings... So is it possible to define a language by directly defining the set? Somehow it is
Published onJune 12, 2022NFA vs DFA - Building a Regex Engine Part 10regex-engineregexformal-languagesWith all the features of the engine finished the only question left is, what would have changed if instead of a NFA engine we had made a DFA engine?
Published onMay 28, 2022Backreferences - Building a Regex Engine Part 9regex-engineregexformal-languagesBackreferences match the same text captured by a previous capturing group. To implement them, we need to evolve the concept of matchers/transitions.
Published onMay 14, 2022Atomic groups - Building a Regex Engine Part 8regex-engineregexformal-languagesAtomic groups can be used to avoid unnecessary backtracking and optimize regex. In this post we explain them in detail and add them to the engine