|
|
1.1 root 1:
2: (* December 1988, Jussi Rintanen, Helsinki University of Technology *)
3:
4: (* This is the interface between the abstract definition of ML Twig lexical
5: analyzer and the actual implementation as a lexer specified with ML Lex. *)
6:
7: signature LEXER =
8: sig
9: exception LexError
10: datatype lexresult = IDENTIFIER of string | INT of string | EQ | RPAREN |
11: LPAREN | COLON | SEMICOLON | COMMA | OTHER of string | SPACE of string |
12: TREEREF of int list | EOF
13:
14: val make_lexer : instream -> (unit -> lexresult)
15: val current_line : unit -> int
16: end;
17:
18: structure Lexer : LEXER =
19: struct
20: structure ActualLexer = TwigLexer
21: open ActualLexer.UserDeclarations ActualLexer
22: fun make_lexer stream = ActualLexer.makeLexer (input stream)
23: end;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.