summaryrefslogtreecommitdiff
path: root/cpp.sig
blob: e842e13c73b4970441210e641c316792f4726393 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
signature CPP = sig
  structure T: TOKENIZER

  type t
  type tkPos

  type tkExpectedVal
  exception TkExpected of tkExpectedVal

  type tkErrorVal
  exception TkError of tkErrorVal

  datatype tkExp =
    Tk of T.token |
    Id |
    NumConst |
    StrLiteral |
    UnOp |
    BinOp |
    Op

  val create: string -> string list -> t
  val getToken: t -> T.token * t
  val getLastPos: t -> tkPos

  val tkExpectedPrint: tkExpectedVal -> unit
  val tkErrorPrint: tkErrorVal -> unit

  val debugPrint: t -> unit
end