Conclusion

In this post, I used minilexer to turn a scrabble game file in gcg format into R data.

This parsing code is a very simple recursive descent parser where the parsing of the whole text (parse_gcg()) is broken into calls to another function to parse smaller parts of the text (parse_event()).

The parsing of scrabble games has been added as a vignette to the minilexer package, and I plan to write a few more simple parsers over the next few days.