Pdf of an interactive website created from: http://www.cs.rit.edu/~ats/projects/jsm/paper.xml Monad is a class in Haskell which is fundamental to encapsulating side effects. A monadic type can be used, e.g., to maintain and manipulate state alongside another computation or to bypass sequential execution and recover from failure. A significant problem domain is parsing: support for monadic parsers exists for Haskell, Python, and other languages. This web page describes monadic LL(n) parsing with JavaScript, complete with a base class for monadic classes which wrap state functions, a notation to embed monadic computations in JavaScript (i.e., an equivalent to the do notation in Haskell), a preprocessor to translate the notation into JavaScript, a scanner generator based on regular expressions, a factory for classes to represent parse trees, and the implementation of a little language with exception handling as another example of a monadic computation. The preprocessor is implemented using the monadic parser which it supports.

Publication Date



Note: imported from RIT’s Digital Media Library running on DSpace to RIT Scholar Works in February 2014.

Document Type

Technical Report

Department, Program, or Center

Computer Science (GCCIS)


RIT – Main Campus