Regular expression parser based on a Pratt Parser design.
The goal of this parser is to build a minimal AST that allows us
to validate that we can support the expression on the GPU. The goal
is not to parse with the level of detail that would be required if
we were building an evaluation engine. For example, operator precedence is
largely ignored but could be added if we need it later.
The Java and cuDF regular expression documentation has been used as a reference:
Regular expression parser based on a Pratt Parser design.
The goal of this parser is to build a minimal AST that allows us to validate that we can support the expression on the GPU. The goal is not to parse with the level of detail that would be required if we were building an evaluation engine. For example, operator precedence is largely ignored but could be added if we need it later.
The Java and cuDF regular expression documentation has been used as a reference:
Java regex: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html cuDF regex: https://docs.rapids.ai/api/libcudf/stable/md_regex.html
The following blog posts provide some background on Pratt Parsers and parsing regex.
- https://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/ - https://matt.might.net/articles/parsing-regex-with-recursive-descent/