Next | Functional Programming in Perl | 22 |
But now you end up with horrors like this:
val statement = alternate(concat(concat(concat(identifier, token "="), expression), token ";"), concat(concat(token "PRINT", expression), token ";"), token ";");
So Paulson uses ML's operator overloading to add some syntactic sugar:
val statement = identifier - token("=") - expression - token(";") | token("PRINT") - expression - token(";") | token(";");
This makes the difference between a usable and an unusable system
Next | Copyright 2005 M. J. Dominus |