Relationship between formal system and formal languages
Generally speaking, a formal system is comprised of


a language distinguishing its well-formed formulas from those strings over that are not well-formed
some kind of semantics that says which formulas are true and which are not
axioms and inference rules which attempt to generate, computationally, exactly those formulas which are true given the semantics.


We can specify the language of well-formed formulas using a grammar, but a grammar is not itself a formal system.