lustre-v6
Lxm
Lexemes
type t
type pragma =
| Pragma of string * string
val dummy : string -> t
val str : t -> string
val id : t -> Lv6Id.t
val line : t -> int
val file : t -> string
val pragma : t -> pragma list
val override_name : string -> t -> t
val cstart : t -> int
column numbers
val cend : t -> int
val make : Lexing.lexbuf -> t
lexer/parser interface
In order to able to compute line and colums numbers, the lexer is supposed to:
val new_line : Lexing.lexbuf -> unit
val make_string : Lexing.lexbuf -> t
val add_pragma : t -> pragma list -> t
compiler interface
type 'a srcflagged = {
src : t;
it : 'a;
}
used to attach a source information to a lexeme
val flagit : 'a -> t -> 'a srcflagged
val last_made : unit -> t
Returns the last created lexem. Useful to locate syntax errors.
Erreur/Warning printing
val details : t -> string
val short_details : t -> string
prints something like: 'machin' (line:10, col:3 to 7)
val position : t -> string
prints something like: line:10, col:3 to 7