I had no idea the main ruby implementation uses plain old bison instead of a hand written parser, but what exactly is wrong with that? If anything having all the grammar rules already spelled out means another implementation can just reuse them, there are bison-like tools for almost any language.
Over half of those lines are a hand written lexer. The grammar is basically useless without the lexer, which is very complex, full of weird corner cases, and changes version by version.
And much of it, in both the lexer and the grammar rules, is very heavily tied into MRI internals.