Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /archive/mldist.44/lib/twig/lexer.sml
ViewVC logotype

Annotation of /archive/mldist.44/lib/twig/lexer.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4942 - (view) (download)

1 : dbm 4942
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;

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0