ppRegExp
functor
signature PPREGEXP
functor ppRegExp
(NAMES) : PPREGEXP
This functor generates printing functions for regular expressions, using the printnames for constants and variables provided by the argument structure.
include REGEXP_WEAK
eqtype alph
val printExp : alph re -> unit
eqtype alph
printExp r
NAMES
Note: Printing long expressions does not introduce line breaks or indenting, so it's not a very `pretty' printing.
Example:
- structure ppE = ppRegExp(StandardNames); open ppE; printExp (Times [Atom "ab",Atom "cd",Plus[Atom "a",Plus[]],Star (Atom "ef"),Times[]]); ab;cd;(a + 0);(ef)*;1 - printExp (Powers (Atom "a") 3); (a;a;a + a;a + a + 1)