comparison ppc/lexer.mli @ 0:bfdcc3820b32

Basis
author Mike Spivey <mike@cs.ox.ac.uk>
date Thu, 05 Oct 2017 08:04:15 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:bfdcc3820b32
1 (* ppc/lexer.mli *)
2 (* Copyright (c) 2017 J. M. Spivey *)
3
4 open Dict
5
6 (*
7 The lexer is generated from a camllex script. It takes an input
8 buffer, reads a token, and returns the |token| value that corresponds
9 to it. The lexer maintains the current line number in |lineno| for
10 producing error messages. Lexical errors result in the exception
11 |Lex_error|, whose arguments are a format and argument list suitable
12 for passing to |printf| to print the message.
13 *)
14
15 (* |token| -- scan a token and return its code *)
16 val token : Lexing.lexbuf -> Parser.token
17
18 (* |lineno| -- source line number *)
19 val lineno : int ref
20
21 (* |string_table| -- fetch table of string constants *)
22 val string_table : unit -> (Keiko.symbol * string) list