Only an addendum: although not famous as LEX & YACC, FLEX & BISON or ANTLR, GOLD (
http://www.goldparser.org/) is a good parser generator and, feature very important for our community, the only that supports object pascal as output language (as far as I know).
Moreover in the above website is available a formal grammar (in BNF form) for object-pascal. It should be adapted to embrace the latest language evolutions of FreePascal, in FPC 3.0.0 particolar, but is a good start point. It should not be too difficult to update the formal grammar provided by GOLD website using syntax diagram depicted in the language user guide of FPC.
I do not know if someone else has already write a BNF / EBNF for FreePascal. Indeed it seems to me that the compiler FPC uses an ad hoc parser, not one automatically built by a generator (for efficiency reasons, I presume).