3 * Copyright (c) 2001-2002,
4 * George C. Necula <necula@cs.berkeley.edu>
5 * Scott McPeak <smcpeak@cs.berkeley.edu>
6 * Wes Weimer <weimer@cs.berkeley.edu>
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
20 * 3. The names of the contributors may not be used to endorse or promote
21 * products derived from this software without specific prior written
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
25 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
27 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
28 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 (* This interface is generated manually. The corresponding .ml file is
40 * generated automatically and is placed in ../obj/clexer.ml. The reason we
41 * want this interface is to avoid confusing make with freshly generated
45 val init: filename:string -> in_channel -> Lexing.lexbuf
46 val finish: unit -> unit
48 (* This is the main parser function *)
49 val initial: Lexing.lexbuf -> Parser.token
52 val push_context: unit -> unit (* Start a context *)
53 val add_type: string -> unit (* Add a new string as a type name *)
54 val add_identifier: string -> unit (* Add a new string as a variable name *)
55 val pop_context: unit -> unit (* Remove all names added in this context *)