Where can I find formal grammars? By 'formal grammar' I mean 'a mathematically precise set of rules that generate all (or at least a significant portion of) the grammatical sentences of a language.' It would really help me in my language learning to locate some of these formal grammars in a form that I can read (i.e. not in computer code). I'm looking for Latin and Greek specifically.
A true complete and formal grammar would only hinder your desire to learn a language, so your motivation for asking for such a thing is ill-placed. You also make a false assumption about the nature of "grammar" in linguistics, that a "grammar" is only about enumerating allowed word orders. A complete grammar must include all aspects of the computation, ranging over semantics, syntax, phonology, morphology and phonetics. Also note that no grammar can be self-defining, that is, you must have some knowledge of a theory-external metatheory of the formalization, which means you need a pairing of a grammar and a meta-grammar.
You can find specific formal accounts of fragments of Greek and Latin, such as Sommerstein's book on Greek phonology, Lightfoot's work on Greek semantics and morphology, Robin Lakoff's dissertation on Latin Complementation, Redenbarger's work on Latin phonology and morphology. These works do not all use the same metatheory. If you were interested in Sanskrit, I would point you to the one extant albeit nigh impossible to use complete formal grammar of a language, the Aṣṭādhyāyī.