Gender agreement between adjectives of one termination and nouns, in attributive sentences in Spanish, is a phenomenon that can be determined and explained by the Government Theory, where the noun of the subject regulates the gender of the rest of the elements in the sentence. This work presents a formal description approach of this linguistic fact using the formalism of Attribute Grammars that allows the understanding of the legacy in the concordance. This proposal not only corroborates the theoretical approximation used, but also provides a solution to deal with the automatic analysis of gender agreement in Spanish attributive sentences and the applicability of this method to other linguistic cases.