Created
July 19, 2015 21:22
-
-
Save objmagic/9f38f07c37e7088d1fe8 to your computer and use it in GitHub Desktop.
rec.ml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type t2 = A of t3 | C of char and t3 = t2 | |
| let rec t2_parser = NT (lazy ( | |
| either [(fun arr -> A arr) <*> arr_parser; | |
| ((fun c -> C c) <*> lit 'c')])) | |
| and arr_parser = NT (lazy ( | |
| (lit '[') >> t2_parser << (lit ']'))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment