syntax
syntax — 名詞
1. the set of rules in a language that control how words are arranged to form corre
句法
詞語排列成句的規則
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.
Sari 的英語老師用簡單的句法圖解幫助她理解基本句法。
In Mr. Chen's class, Eri learned to change the syntax of "you like coffee" to form a question.
在陳老師的課堂上,Eri 學會了改變「you like coffee」的句法來形成問句。
Chidi found that learning German syntax was harder than memorising new vocabulary.
Chidi 發現學習德語的句法比背新單字更難。
The syntax of the old poem was so unusual that students needed help to follow it.
那首古詩的句法非常特殊,學生需要協助才能理解。
- 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.
常見錯誤
2. the rules that determine how commands, symbols, and punctuation must be written
語法
程式語言中指令的組合規則
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.
Hao 逐行檢查他的 Python 程式碼的語法,修正了錯誤。
A single missing semicolon can break the syntax of an entire JavaScript program.
只要少一個分號,就可能破壞整段 JavaScript 程式的語法。
syntax error: missing punctuation
The professor explained that every programming language has its own syntax for writing functions.
教授解釋說,每一種程式語言都有自己撰寫函式的語法規則。
Camille's program failed to run because of a syntax error on line twelve.
Camille 的程式因為第十二行出現語法錯誤而無法執行。
Modern code editors highlight syntax errors in real time to help beginners learn faster.
現代的程式碼編輯器會即時標示語法錯誤,幫助初學者更快學會。
- 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.
常見錯誤
3. an organised structure in which the parts of something — such as music, art, or
結構
各部分有條理的編排方式
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.
藝術史學者研究了大教堂建築元素的結構編排。
The syntax of legal documents follows a strict internal logic that lawyers must learn.
法律文件的結構遵循嚴謹的內在邏輯,律師必須學習。
During his guitar lesson, Dario learned the syntax of chord progressions in a twelve-bar blues.
在吉他課上,Dario 學會了十二小節藍調的和弦進行的結構編排。
- 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.