anewbie 写了:果然是纯代码男(女)啊。不用 ignore,那里面应该没有 syntax error,只有 grammar error. 相反,那句 "syntax error" 看起来才像是 "syntax error".
呃,貌似歪楼了,我悔过。没有恶意哈,你们继续。
*Off-topic warning: not about VIM and Emacs*
Anewbie, Haha, I don't have English syntax/grammar checker on hand.
Anyway, what's the main difference between syntax and grammar? I googled and find
Grammar consists of set rules regarding language and sentence structure, such as no splitting infinitives and no hanging prepositions.
Syntax is how a sentence is worded and structured. It consists of the type of sentence (Declarative, Interrogative, Exclamatory, Imperative) and word order (passive vs. active voice) It also refers to length of sentences (short vs. long).
Syntax can be used as a literary device to add extra meaning to your sentences, whereas grammar adds no greater meaning to your sentences.
So, the sentence of "syntax error" is "word error", but not "syntax error" or "grammar error". And compiler show "syntax error" should be "grammar error". Just my 2 cents.