I wrote an EDI parser from scratch some years ago (2 to 5, really don't remember). Almost until the end I kept second-guessing myself. It all looked so flimsy.
Eventually I made a second parser that utilized a parser-combinator library (the first one was hand-rolled) and devised extremely detailed property tests that I ran against both parsers. Only then did I feel confident.
Naturally, in production the code crashed on the second day because OF COURSE the senders didn't obey the EDI[FACT] spec and had quirky deviations from it.
Shit like that makes people retire to the mountains and never touch a computer again, man.
Implementing EDI is not for the faint of heart. For the variations I worked with, there was little useful documentation, I learned mostly be reading existing code. I would hate to have to start from scratch.