Effective ATS: Parsing combinators of CPS-style

115 views
Skip to first unread message

gmhwxi

unread,
Dec 25, 2015, 10:22:28 PM12/25/15
to ats-lang-users

Parsing combinators are a beautiful and convincing example showing the elegance
and power of functional programming.

I have implemented parsing combinators many times but never done them in CPS-style
until now. After giving a presentation of session combinators of CPS-style (which is done
out of necessity due to the runtime of JS being single threaded), I realized that this style
can be quite attractive for implementing parsing combinators as well. But certainly not limited
to passing combinators. Hopefully, you can use the same style to build you own libraries.

See:

http://ats-lang.sourceforge.net/EXAMPLE/EFFECTIVATS/parsing-cmbntr-cps/index.html

Cheers!
Reply all
Reply to author
Forward
0 new messages