You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is a placeholder for a task that still needs to be completed for chapter 9 on parser combinator library design. The chapter focuses heavily on algebraic design with deferred implementation of the algebra.
All code samples and exercises for the chapter compile, although the focal point of the chapter is to implement a working JSON parser. Due to time constraints in delivering subsequent chapters, this implementation was deferred.
The correct way to get this parser operational is by using tests to prove the implementation of all primitives and combinators. It would be best to start with the primitives, then build up towards increasingly complex combinators. Finally, tests should be put in place that test the parser in its entirety.
Also worth mentioning that this is a port of the original parser that appears in the solutions of the original FP in Scala red book. The Scala implementation is fully operational and can be used as a reference for the Kotlin version.
The text was updated successfully, but these errors were encountered:
I get the point of figuring out the algebra before doing an actual implementation but I still feel that an algebra is only useful if I'm able to implement it. Therefore I felt like I didn't get as much out of this chapter as I could have if it had had tests and a working implementation for the json parser.
A complete implementation of the json parser seems to be available but it does not work. Running the main function at
produces a StringIndexOutOfBoundsException. The fix at firstNonMatchingIndex is quite obvious but after that I still get StringIndexOutOfBoundsException but from another place.
This issue is a placeholder for a task that still needs to be completed for chapter 9 on parser combinator library design. The chapter focuses heavily on algebraic design with deferred implementation of the algebra.
All code samples and exercises for the chapter compile, although the focal point of the chapter is to implement a working JSON parser. Due to time constraints in delivering subsequent chapters, this implementation was deferred.
The correct way to get this parser operational is by using tests to prove the implementation of all primitives and combinators. It would be best to start with the primitives, then build up towards increasingly complex combinators. Finally, tests should be put in place that test the parser in its entirety.
Also worth mentioning that this is a port of the original parser that appears in the solutions of the original FP in Scala red book. The Scala implementation is fully operational and can be used as a reference for the Kotlin version.
The text was updated successfully, but these errors were encountered: