Module BatGenlex


module BatGenlex: sig .. end
A generic lexical analyzer.

This module implements a simple ``standard'' lexical analyzer, presented as a function from character streams to token streams. It implements roughly the lexical conventions of Caml, but is parameterized by the set of keywords of your language.

This module extends Stdlib's Genlex module, go there for documentation on the rest of the functions and types.
Author(s): Jacques Garrigue, David Teller


type t 
A lexer
val of_list : string list -> t
Create a lexer from a list of keywords
val to_stream_filter : t -> char Stream.t -> Genlex.token Stream.t
Apply the lexer to a stream.
val to_enum_filter : t -> char BatEnum.t -> Genlex.token BatEnum.t
Apply the lexer to an enum.
val to_lazy_list_filter : t -> char BatLazyList.t -> Genlex.token BatLazyList.t
Apply the lexer to a lazy list.

Extending to other languages

module Languages: sig .. end