BNF is a notation for giving a precise definition of the syntax of a programming language, as well how programs in that language are structured.

BNF does not tell everything about which programs are acceptable because it ignores issues such as type checking and whether variables that are used have been declared. It also does not say what programs mean, or what they do when you run them.

Noam Chomsky famously wrote, in one book, that "Colorless green ideas sleep furiously" is a syntactically valid English sentence. In a later book, he changed his mind and said that it is not syntactically valid because it applies adjectives and adverbs to nouns and verbs to which they cannot apply. For programming languages, we take Chomsky's first view. Syntax does not include such issues as whether it makes sense to add two strings or to concatenate two integers.