The REGEXP_PARSER signature

The REGEXP_PARSER signature defines the interface to a parser for a concrete regular-expression syntax.

Synopsis

signature REGEXP_PARSER

structure AwkSyntax : REGEXP_PARSER

Interface

val scan : (char, 'a) StringCvt.reader -> (RegExpSyntax.syntax, 'a) StringCvt.reader

Description

val scan : (char, 'a) StringCvt.reader -> (RegExpSyntax.syntax, 'a) StringCvt.reader

scan getc strm parses a regular expression from the input stream strm using the character reader getc. If successful, it returns SOME(re, strm'), where re is the abstract syntax of the regular expression and strm' is the residual input stream. It returns NONE if there is a syntax error in the input.

Instances

structure AwkSyntax

A parser for the regular-expression syntax defined by the AWK language.