Module Kernel.TranslSource

Translation from syntax to regular expressions

This module handles the translation of pattern syntax (from the grammar) into regular expression structures that can be processed by the compilation pipeline.

Main components:

Tricky implementation details:

Sourceval printf_debug : bool
Sourcemodule Indices : sig ... end
Sourceval string_of_goto : 'a Kernel__Info.grammar -> 'a Kernel__Info.goto_transition Fix.Indexing.index -> string
Sourcemodule Globbing : sig ... end
Sourceval transl_filter : 'g Info.grammar -> 'g Indices.t -> Stdlib.Lexing.position -> lhs:Syntax.symbol option -> rhs:(Syntax.filter_symbol * Stdlib.Lexing.position) list -> 'g Info.lr1 Utils.IndexSet.t
Sourceval compile_reduce_expr : 'g Info.grammar -> 'g Redgraph.graph -> 'g Redgraph.target_trie -> 'g Kernel__Regexp.Expr.t -> 'g Redgraph.target Utils.IndexSet.t * 'g Info.lr1 Utils.IndexSet.t
Sourceval transl : 'g Info.grammar -> 'g Redgraph.graph -> 'g Indices.t -> 'g Redgraph.target_trie -> capture: (Syntax.capture_kind -> string -> Kernel__Regexp.Capture.n Utils.IndexSet.element) -> Syntax.regular_expr -> Kernel__Regexp.Capture.n Utils.IndexSet.t * 'g Regexp.Expr.t