File:  [Research Unix] / researchv10no / cmd / sml / lib / twig / lexer.sml
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman


(* 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;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.