Plasma GitLab Archive
Projects Blog Knowledge

Module Netulex.Ulexing

module Ulexing: sig .. end


This is a lexing buffer for ulex.
type lexbuf 
exception Error
Lexical error
val from_ulb_lexbuf : Netulex.ULB.unicode_lexbuf -> lexbuf
Creates a new lexbuf from the unicode_lexbuf. After that, the unicode_lexbuf must no longer be modified.
val lexeme_start : lexbuf -> int
The character position of the start of the lexeme
val lexeme_end : lexbuf -> int
The character position of the end of the lexeme
val lexeme_length : lexbuf -> int
The length of the lexeme in characters
val lexeme : lexbuf -> int array
Returns the lexeme as array of Unicode code points
val lexeme_char : lexbuf -> int -> int
Returns the code point of a certain character of the lexeme
val sub_lexeme : lexbuf -> int -> int -> int array
Returns a substring of the lexeme as array of Unicode code points. The first int is the characater position where to start, the second int is the number of characters.
val utf8_lexeme : lexbuf -> string
Returns the lexeme as UTF-8 encoded string
val utf8_sub_lexeme : lexbuf -> int -> int -> string
Returns a substring of the lexeme as UTF-8 encoded string. The first int is the characater position where to start, the second int is the number of characters.
val utf8_sub_lexeme_length : lexbuf -> int -> int -> int
Same as String.length(utf8_sub_lexeme args), i.e. returns the number of bytes a certain sub lexeme will have when encoded as UTF-8 string.
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml