• Regex literals optimization

    The regex literals optimization avoids running the regex engine on parts of the input text that cannot possibly ever match the regex.

  • A DFA for submatches extraction

    Finite Automata is commonly used to efficiently match a Regular Expression (RE) to a given textinput. There are RE engines for submatch extraction based on Non-deterministic Finite Automata (NFA). These algorithms usually return a single match for each submatch, instead of the history of submatches (full parse tree). An NFA can be converted to a Deterministic Finite Automata (DFA) to improve the runtime matching performance. This article describes an algorithm based on DFA that extracts full parse trees from text.
  • An efficient circular queue of strings

    This article describes a circular queue of strings based on a single string of substrings. The implementation is flexible, and can be based on a single fixed size array to avoid allocations on constrained devices.