Official TL grammar can be found here: https://gitlab.com/telekram/telekram/-/blob/master/generator/src/commonMain/antlr/TL.g4
It looks like official grammar does not work correctly. You can check it by passing this TL file to mentioned schema: https://github.com/newton-blockchain/ton/blob/master/tl/generate/scheme/tonlib_api.tl
Some problems occur and created parsed tree is not correct.