Parsing is not the problem, putting it into a data structure that can be used by both is the problem. Then you need to 'parsers' to interpret the resulting data structure, one suitable for the compiler, one suitable for code tools.
BTW: there is third parser in the fpc\packages\fcl-passrc directory, you might wonder why the fpc team wrote yet another parser for reading the pascal files to produce the fpdoc documentation.