(** Time-stamp: <modified the 01/09/2008 (at 17:04) by jahier> *) (** Common to lus2lic and lic2loc *) (** Lexeme *) type t type pragma = Pragma of string * string val dummy : string -> t val str : t -> string val id : t -> Ident.t val line : t -> int val file : t -> string val pragma : t -> pragma list (** column numbers *) val cstart : t -> int val cend : t -> int (** lexer/parser interface In order to able to compute line and colums numbers, the lexer is supposed to: - use Lxm.make to return a lexeme to the parser - use newline to add a new line *) val make : Lexing.lexbuf -> t val new_line : Lexing.lexbuf -> unit (* remove the quotes from the string *) val make_string: Lexing.lexbuf -> t val add_pragma : t -> pragma list -> t (** compiler interface *) (** used to attach a source information to a lexeme *) type 'a srcflagged = { src : t ; it : 'a } val flagit : 'a -> t -> 'a srcflagged (** Returns the last created lexem. Useful to locate syntax errors. *) val last_made : unit -> t (** Erreur/Warning printing *) val 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 *)