/usr/share/doc/happy/examples/glr/expr-monad/README is in happy 1.19.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 | Example of arithmetic expression parsing, with decoding of semantic
values (ie it gives a list of possible results of computation).
BUT: it runs the computations under a monad. In this example, certain
cases of addition fail, which are caught and shown as zeros.
"make run" to run the test case.
For Hugs, load up Hugs.lhs - it doesn't produce graphs, and has easy entry
point "test :: String -> IO ()
|