syntax

syntax — noun

1. the set of rules in a language that control how words are arranged to form corre

1.名詞B2
釋義

the set of rules in a language that control how words are arranged to form correct phrases, clauses, and sentences

例句

The syntax of Japanese sentences differs greatly from that of English.

comparative syntax across languages

Sari's English teacher helped her understand basic syntax through simple sentence diagrams.

同義詞
  • grammar

    broader term that includes syntax, morphology, and punctuation rules

  • word order

    one aspect of syntax, specifically the sequence of words in a sentence

  • sentence structure

    more general term that overlaps with syntax but can also refer to length and complexity

用法筆記

Syntax is usually studied as an uncountable noun. In language education, it focuses on word order and sentence patterns — distinct from morphology, which deals with word forms like prefixes and suffixes.

常見錯誤

The syntax of this sentence are confusing.
The syntax of this sentence is confusing.
💡syntax is an uncountable noun and takes a singular verb.
Syntaxes vary across languages.
Syntax varies across languages.
💡do not pluralise syntax when referring to grammatical rules in general.

2. the rules that determine how commands, symbols, and punctuation must be written

2.名詞B2
釋義

the rules that determine how commands, symbols, and punctuation must be written in a programming language so that a computer can understand them

例句

Hao fixed the bug by checking the syntax of his Python code line by line.

A single missing semicolon can break the syntax of an entire JavaScript program.

syntax error: missing punctuation

同義詞
  • coding rules

    informal term for the format requirements of a programming language

  • language structure

    focuses on the overall organisation of commands and expressions

  • format rules

    emphasises punctuation and indentation requirements

用法筆記

In computing, syntax can be countable (e.g. 'this language has two different syntaxes for loops') or uncountable. A syntax error means the code does not follow the language's required format and cannot be compiled or run.

常見錯誤

I need to fix the grammar of my code.
I need to fix the syntax of my code.
💡in programming, syntax refers to code structure; grammar describes natural language.

3. an organised structure in which the parts of something — such as music, art, or

3.名詞C1
釋義

an organised structure in which the parts of something — such as music, art, or a system — are arranged in a clear, logical order

例句

The syntax of a musical composition can be as important as its melody.

syntax + music composition

Art historians studied the syntax of the cathedral's architectural elements.

同義詞
  • structure

    simpler, more general term for how parts fit together

  • arrangement

    emphasises the order of elements rather than the rules behind the order

  • organisation

    focuses on how components are grouped or categorised

  • logic

    suggests an internal reasoning or principle behind the arrangement

反義詞
  • chaos

    complete lack of structure or order

用法筆記

This sense is used in formal, academic, or abstract contexts outside of language and computing. It often appears in discussions of music theory, art criticism, logic, or systems theory.

常見錯誤

The syntax of the painting was colourful.
The syntax of the painting followed a clear structure.
💡syntax refers to arrangement, not sensory qualities like colour.