What I'm trying to do seems pretty simple, but since I am a Haskell newb parsec, the solution eludes me.
I have two parsers, say foo1and foo2, where foo1can analyze the intermediate term and foo2analyze the final term. Terms are separated by a symbol ".".
The sentences I need to analyze
foo2foo1.foo2foo1.foo1.foo2
etc.
My initial thought was to make
do k <- sepBy foo1 (char'.')
j <- foo2
but it will not catch the case foo2-only.
Chris source
share