A syntax pattern is a tool for matching elements within a syntax object. Syntax patterns are used extensively in macros, especially for separating the input into named pieces so they can be rearranged. In that way, a syntax pattern does for a syntax object what a regular expression does for a string.
Let's first discuss complements and adverbials.
Words or phrases that describe other words in a sentence or clause are known as complements. Complements vary from other modifiers in that they are essential to a sentence's meaning and cannot be omitted.
However, not all adverbs are compliments. Adverbial complements are essential for a sentence's meaning, whereas modifier adverbials can be omitted without the sentence's meaning altering. Single adverbs (We ran swiftly), prepositional phrases (We ran in the park), or time-related noun phrases make up the majority of adverbials (We ran this morning.).
Following are the syntactic patterns-
The animal barked.
This is the typical syntactic structure, which includes the bare minimum of a subject and verb. The focus is always on the subject.
The dog carried the ball.
The direct object is usually placed after the verb when the verb is transitive and utilizes a direct object.
The dog is playful.
The verb is followed by the subject complement. Always use connecting verbs like be or appear with subject complements.
The dog ate hungrily
Adverbial complements follow the verb, just like subject complements do (if there are no objects). Single adverbs may occasionally appear before the verb; nevertheless, they are not complements, so take caution. Whether you're unsure of whether or not an adverb complements a verb, try deleting it from the phrase to see if the meaning shifts. It is an adverbial complement if you discover that eliminating it actually alters the meaning.
The dog gave me the ball
A direct object and an indirect object can both be found in some phrases. In this instance, the verb comes first, followed by the indirect object, and then the direct object. Remember that prepositional objects do not adhere to this rule; for instance, you may say, "The dog handed the ball to me."
The dog made the ball dirty.
Similar to other complements, object complements follow the direct object.
The dog perked its ears up.
The direct object comes first, followed by the adverbial complement when a sentence has both a direct object and an adverbial complement. Up is the adverbial complement in this grammar illustration since it explains how the dog perked its ears.