SML/NJ Library Manual


The RegExpSyntax structure


Synopsis

signature REGEXP_SYNTAX
structure RegExpSyntax : REGEXP_SYNTAX

This structure implements the abstract syntax for regular expressions to which the concrete syntax translates and that is recognized by matching engines.


Interface

exception CannotParse
exception CannotCompile
structure CharSet : ORD_SET
datatype syntax
  = Group of syntax
  | Alt of syntax list
  | Concat of syntax list
  | Interval of (syntax * int * int option)
  | Option of syntax
  | Star of syntax
  | Plus of syntax
  | MatchSet of CharSet.set
  | NonmatchSet of CharSet.set
  | Char of char
  | Begin
  | End
val addRange : (CharSet.set * char * char) -> CharSet.set
val allChars : CharSet.set

Description

exception CannotParse

exception CannotCompile

datatype syntax

addRange (s, c1, c2)
adds the range of characters from c1 to c2 to the character set s.

allChars
is a character set containing all the characters.



[ Top | Parent | Contents | Index | Root ]

Last Modified June 3, 1998
Comments to John Reppy
Copyright © 1998 Bell Labs, Lucent Technologies