I am trying to use the <better-parse> library to p...
# announcements
k
I am trying to use the better-parse library to parse a file. The file has the following structure:
Copy code
Header
LineItem
LineItem
Footer
I have written a
Grammar<T>
to parse each line of each "type" so far, e.g.
Grammar<Header>
. How can I compose these grammars together? The lines are split by newline.
k
Looking at the docs, I'd assume
header and skip(newline) and separatedTerms(lineItem, newLine) and newLine and footer
wait that's for parsers gimme a sec
I'm assuming that is still correct?
k
Hmmm, let me check
That doesn't quite work. Weird.
k
Huh
k
I'm thinking of breaking it down into a smaller problem
A file that looks like this:
Copy code
Header
Footer