read: use r5js.parse.Terminals enum instead of string literals where possible.
scan+read: introduce interfaces for the scanner and reader.