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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4942 - (download) (annotate)
Sat Apr 6 00:29:33 2019 UTC (3 months, 1 week ago) by dbm
File size: 765 byte(s)
adding a batch of new versions from tapes
(* December 1988, Jussi Rintanen, Helsinki University of Technology *)

(* This is the interface between the abstract definition of ML Twig lexical
   analyzer and the actual implementation as a lexer specified with ML Lex. *)

signature LEXER =
  sig
    exception LexError
    datatype lexresult = IDENTIFIER of string | INT of string | EQ | RPAREN |
      LPAREN | COLON | SEMICOLON | COMMA | OTHER of string | SPACE of string |
      TREEREF of int list | EOF
      
    val make_lexer : instream -> (unit -> lexresult)
    val current_line : unit -> int
  end;
  
structure Lexer : LEXER =
  struct
    structure ActualLexer = TwigLexer
    open ActualLexer.UserDeclarations ActualLexer
    fun make_lexer stream = ActualLexer.makeLexer (input stream)
  end;

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