chickadee » lexgen » lex

lex MATCHER ERROR STRINGprocedure

lex takes a pattern and a string, turns the string into a list of streams (containing one stream), applies the pattern, and returns the first possible match. Argument ERROR is a single-argument procedure called when the pattern does not match anything.