We explain what syntax is, what it is for, some examples and its relationship with semantics. Also, what is syntax in computing.

The words are arranged in phrases within the sentence.

What is the syntax?

The syntax is a branch of the grammar that studies the principles of ordering and combining words and the sets that they form within the prayer, called phrases. In turn, the phrases are endowed with a specific meaning and a function within it.

Words do not operate individually and in isolation, but rather in a chain or string, some before others, since their own meaning can be altered from the place they occupy in the sentence. In fact, the Spanish syntax establishes a default order in which the sentences are formulated, which we know as SVP: Subject-Verb-Predicate.

  • Subject. It's what the noun phrase, that is, to set of words that fulfill the role within the sentence of indicating on whom the action of the verb falls. The subject has a nucleus, which is generally a noun or pronoun that indicates who or whom we speak specifically.
  • Verb. It is the word that indicates the action in the sentence, and therefore it is always in agreement with the nucleus of the subject.
  • Predicate. It's what we call verb phrase, that is, to everything that is neither subject nor verb, and that would become everything that is said about the subject, its core always being the verb itself.

Similarly, when syntax is also combined with morphology (that is, the study of word formation), we have a discipline combined: the morphosyntax.

What is the syntax for?

Syntax is of central importance in grammar, since it teaches us the possible orders of the language, that is, it indicates the allowed and not allowed combinations of words to obtain recognizable meanings.

A good command of the syntax not only allows us to distinguish acceptable from unacceptable formulations, but at the same time to vary the way we construct our sentences, thus being able to take better advantage of the limits of the language in terms of creativity, eloquence, poetry, etc.

Syntax and semantics

If syntax is the study of order within grammar, then semantics is the study of meaning. That is, those referents that we associate with each word, which, far from being unique and fixed, actually operate as a cloud, that is, a set of possible associations, from which only one must be chosen.

We can realize this if we look up the meaning of a word in the dictionary, and we notice that there will be some more central, that is, closer to the proper meaning of the word, but that there will be others further away, that is, more figurative, metaphorical. or remote. For example:


  1. F. Flamenco stick with a happy rhythm.
  2. F. Dance that is performed to the sound of the rumba.
  3. F. Afro-Cuban popular dance that is performed accompanied by percussion instruments.
  4. F. Music that accompanies the Afro-Cuban rumba.
  5. F. Ant., Bol., Ec., El Salv., Hond., Nic., Pan., Peru and Ven. Party or party.

(Taken from the Dictionary of the Language of the Royal Spanish Academy)

As will be seen, there are many similar meanings, but only one can be used at a time, so that when using the language we are forced to choose each meaning, just as we choose each place to place it (syntax).

Syntax examples

In a sentence like "Maria's sisters buy a movie ticket", we will roughly have two main phrases:

  • Subject: "The sisters of Mary" endowed with a nucleus "sisters".
  • Predicate: "buy a movie ticket", endowed with a core "buy".

This is known as analysis syntactic.

It is possible, following the previous example, that the same terms are presented in the sentence according to a different order, but the order used in the syntax will have some impact on how easy it is or not to understand the message.

Thus, for example: "A movie ticket is bought by the sisters of Mary" retains its meaning, although it reverses the general order of the parts (PVS, that is, Predicate-Verb-Subject); But “A Maria of the Sisters is buying a movie ticket” has changed the order of the words so much that the meaning of the sentence is completely destroyed.

Syntax in computing

The syntax of each programming language allows its correct execution.

In the world of computing and the programming languagesSyntax is often talked about, too. And, similarly, the syntax in this area has to do with the order of the terms and instructions that allow the correct execution of a computer program, when they are fed into the system.

In this sense, syntax errors also occur and also sabotage the understanding of the message or, in this case, of the instructions, thus preventing them from being carried out and the software run as it should.

!-- GDPR -->