Sedlex_ppx.Ppx_sedlexSourcePPX rewriter for sedlex.
Transforms match%sedlex lexbuf with ... into DFA-based lexer code. Registration with ppxlib is done via side effects at module initialization.
The values below are not part of the public API. They are exposed so that ppx_sedlex_test can invoke the code generator in isolation and inspect the generated AST and DFA.
Clear all internal tables (partitions, lookup tables). Must be called between independent compilations in tests.
val handle_sedlex_match :
Ppxlib.Parsetree.expression ->
Ppxlib.Parsetree.expression * Sedlex_compiler.Sedlex.dfahandle_sedlex_match match_expr compiles a match%sedlex lexbuf with ... expression into generated DFA code using the built-in regexp environment. Returns the generated expression and the DFA automaton.
map_expression expr applies the sedlex mapper to expr, processing any [%sedlex] or [%sedlex.regexp?] extensions it contains.