ulexer.mli 643 Bytes
Newer Older
1
2
3
4
5
6
7
open Camlp4.Sig

type token =
  | KEYWORD of string
  | IDENT of string
  | ANY_IN_NS of string
  | INT of string
8
  | CHAR of string
9
  | STRING of string
10
  | STRING2 of string
Pietro Abate's avatar
Pietro Abate committed
11
  | PVAR of string
12
  | IDENTPAR of string
13
14
  | EOI

15
16
exception Error of int * int * string

17
18
val toplevel : bool ref

19
20
21
22
23
module Loc   : Loc with type t = int * int
module Token : Token with module Loc = Loc and type t = token
module Error : Error

val mk : unit -> (Loc.t -> char Stream.t -> (Token.t * Loc.t) Stream.t)
24
25
26
27

val in_comment: bool ref
val lexbuf: Ulexing.lexbuf option ref
val enc: Ulexing.enc ref
28
val sync: Ulexing.lexbuf -> unit
29
30

val dump_file: string -> unit