See Title. An answer would also satisfy: Syntax is to Sentence as ______ is to Word? Or, in more code-friendly terms Syntax is to Function Logic as ______ is to Construct Logic? (idk, I tried)
-
3I'm voting to close this question as off-topic because it's not related to programming – David Robinson Sep 09 '15 at 02:27
2 Answers
The word you're looking for is phonotactics.

- 776,304
- 153
- 1,341
- 1,358
-
A more appropriate word is phonology. The example given by the OP seems to refer to Grammar which is made up of syntax, morphology and phonology. Phonotactics is one aspect of phonology just as punctuation is one aspect of syntax. – slebetman Sep 15 '15 at 03:09
There are two possible answers to your question depending on your exact intent. If I were to guess, the word you're looking for is: morphology but it could also be phonology. However, I don't think "phonology" fits your second example.
The thing you seem to be describing are various parts of grammar. Grammar is the study of syntax, phonology and morphology.
Syntax describes the general structure of the language. How words fit together.
Phonology describes how sounds fit together in the language. How many vowels there are, the consonants, the types of consonants etc.
Morphology describes how words are formed in the language. Does the language modify words with tenses? Does the language modify words with gender? Does the language not modify words at all but instead use other words? etc.

- 109,858
- 19
- 140
- 171