A treebank stores syntactic trees. Treebanks provide corpora consisting of syntactically annotated sentences. The Pann Treebank has annotated the Brown, Switchboard, ATIS, and WSJ corpora and some Arabic and Chinese. More treebanks exist for other languages.
The Penn treebank uses bracketing to mark constituents. Some phrases come with annotations about their grammatical function and semantic function.
You can derive the grammar of a language with a treebank. However, natural languages are infinite.