在English中
grammar包括Grammar deals with syntax, morphology, and semantics.其中while syntax studies sentence structures。
sentence structures 的最好的理解是word order。
the English grammar follows the structure of a subject, verb, object
ate the dog the bone, its syntax is wrong(syntax 错了 语法自然就错了。). the right order is the dog ate the bone..


syntax只关注 a sentence 是由NP(名词短语)和VP(动词短语构成)
但是syntax并不关心动词verb,名词noun等具体定义。也不关心word的内部结构比如 bookkeepershas four morphemes (类词根词缀复数)(book, keep, -er, -s) 。

what-is-the-difference-between-syntax-and-grammar-in-compiler

A grammar is a series of productions that generate the valid “words” of a language. It is a way to specify the syntax of a language. Another way to specify the syntax would be using plain English, but that would end up being very verbose for non-trivial languages if you want it to be precise enough to serve as a specification.

As an example consider the following text:

A program is a series of zero or more statements.A statement is either the keyword "var", followed by an identifier, followed by a semicolon;
an identifier  followed by "++" or "--",   followed by a semicolon; or the keyword "while",
followed by an identifier, followed by the keyword "do", followed by zero or more statements,
followed by the keyword "end".

This describes the syntax of a very simple programming language, but it is not a grammar. Here is a grammar that describes the same language:

program   ::= statement*
statement ::= "var" ID ";"| ID "++" ";"| ID "--" ";"| "while" ID "do" statement* "end"

语法是一系列产生语言的有效“单词”。这是一种指定语言语法的方法。指定语法的另一种方法是使用简单的英语,但如果你希望它足够精确以作为规范,那么对于非平凡的语言来说这将是非常冗长的。

作为示例,请考虑以下文本:

程序是一系列零个或多个语句。语句是关键字“var”,后跟标识符,后跟分号; 标识符后跟“++”或“ - ”,后跟分号; 或关键字“while”,
后跟一个标识符,后跟关键 字“do”,后跟零个或多个语句,后跟关键字“end”。

这描述了一种非常简单的编程语言的语法,但它不是语法。这是一个描述相同语言的语法:

program   ::= statement*
statement ::= "var" ID ";"| ID "++" ";"| ID "--" ";"| "while" ID "do" statement* "end"

What’s the difference between grammar and syntax? in English

answer1:

As defined from the NOAD, grammar is, “the whole system and structure of a language or of languages in general, usually taken as consisting of syntax and morphology (including inflections) and sometimes also phonology and semantics.”

It includes the syntax, but it’s not limited to that.

The syntax of a language is, “the arrangement of words and phrases to create well-formed sentences in a language.”
For example, the syntax is about which order subject, verb, and object have in a sentence to form a well-formed sentence. A sentence like “like it I” is not considered a well-formed sentence, basing on the English syntax, even if people would understand that the correct sentence is “I like it.”

根据NOAD的定义,语法是“一般语言或语言的整个系统和结构,通常由语法和形态(包括变形)组成,有时也包括音韵和语义。”

它包括语法,但不仅限于此。

语言的语法是“用一种语言创造格式良好的句子的单词和短语的排列”。
例如,语法是关于哪个顺序主语,动词和对象在句子中具有形成格式良好的句子。像“喜欢我”这样的句子不是一个基于英语语法的格式良好的句子,即使人们会理解正确的句子是“我喜欢它”

answer2
As I hear them used, grammar

is usually a subfield of English or any other specific language
can be both descriptive and prescriptive
seeks to define parameters for use of a specific language
whereas syntax

is a subfield of linguistics
is descriptive only
seeks to describe language use in terms of language-neutral universal parameters
Both grammar and syntax are usually focused at the level of words-in-sentences (a level above pronunciation, a level below prose-style) but can spill over into these and other subfields.

正如我听到他们使用的那样,语法

通常是英语或任何其他特定语言的子字段
可以是描述性的和规定性的
寻求定义使用特定语言的参数
而语法

是语言学的一个子领域
只是描述性的
旨在用语言中立的通用参数来描述语言使用
这两种语法和句法,通常都集中在单词功能于句子的水平(高于发音的水平,低于散文式的水平),但可以蔓延到这些和其他子域

What-is-the-difference-between-grammar-and-syntax

Syntax pertains only to the arrangement of words in sentences. Grammar deals with syntax, morphology, and semantics.

Syntax: the grammatical arrangement of words in sentences
Grammar: the branch of linguistics that deals with syntax and morphology (and sometimes also deals with semantics)
Morphology: studies of the rules for forming admissible words, and sounds in words
Semantics: the meaning of a word, phrase, sentence, or text
Phonology: the relationships among the speech sounds that constitute the fundamental components of a language

语法仅适用于句子中单词的排列。语法处理语法,形态和语义。

句法:句子中单词的语法排列
语法:处理语法和形态学的语言学分支(有时也涉及语义学)
形态学:研究形成可接受的单词和单词中的声音的规则
语义:单词,短语,句子或文本的含义
音韵学:构成语言基本组成部分的语音之间的关系

/whats-the-difference-between-syntax-and-grammar

Grammar is a very broad term that can roughly be described as

the implicit rules by which speakers intuitively judge which strings are well-formed in a given language.

This includes

syntax: The structure of phrases and sentences - see above.
morphology: The internal structure of words.
Questions include:

语法是一个非常广泛的术语,大致可以描述为

说话者直观地判断哪些字符串在给定语言中格式良好的隐含规则。

这包括

语法:短语和句子的结构 - 见上文。
形态学:单词的内部结构。
问题包括:

  1. Main Difference – Grammar vs Syntax
  2. http://www.differencebetween.net/language/difference-between-grammar-and-syntax/

wike
Syntax refers to the linguistic structure above the word level (e.g. how sentences are formed) – though without taking into account intonation, which is the domain of phonology. Morphology, by contrast, refers to structure at and below the word level (e.g. how compound words are formed), but above the level of individual sounds, which, like intonation, are in the domain of phonology.[13] No clear line can be drawn, however, between syntax and morphology. Analytic languages use syntax to convey information that is encoded via inflection in synthetic languages. In other words, word order is not significant and morphology is highly significant in a purely synthetic language, whereas morphology is not significant and syntax is highly significant in an analytic language. Chinese and Afrikaans, for example, are highly analytic, and meaning is therefore very context-dependent. (Both do have some inflections, and have had more in the past; thus, they are becoming even less synthetic and more “purely” analytic over time.) Latin, which is highly synthetic, uses affixes and inflections to convey the same information that Chinese does with syntax. Because Latin words are quite (though not completely) self-contained, an intelligible Latin sentence can be made from elements that are placed in a largely arbitrary order. Latin has a complex affixation and simple syntax, while Chinese has the opposite.

语法是指单词级别之上的语言结构(例如句子是如何形成的) - 尽管没有考虑语调,这是音韵学的领域。相比之下,形态学指的是在单词水平上和下面的结构(例如复合词是如何形成的),但高于单个声音的水平,这与声音一样,在音韵学领域。[13]然而,在语法和形态之间没有明确的界线。分析语使用的语法来传达经由编码信息拐点在综合语。换句话说,词序不重要,形态在纯合成语言中非常重要,而形态学并不重要,语法在分析语言中非常重要。例如,中国人和南非荷兰人是高度分析性的,因此意义非常依赖于语境。(两者都有一些变形,并且在过去有更多的变化;因此,随着时间的推移,它们变得更加合成并且更“纯粹”分析。)拉丁语,高度合成,使用词缀和变形来传达相同的信息,中文用语法做。因为拉丁语单词是完全(虽然不是完全)自足,是一个可理解的拉丁语句子可以由以很大的任意顺序放置的元素构成。拉丁语有复杂的词缀和简单的语法,而中文则相反。

google搜索

what is the different between Grammar and syntax相关推荐

  1. 关于长寿_FreeCodeCamp可以帮助您更长寿

    关于长寿 by Christopher Phillips 克里斯托弗·菲利普斯(Christopher Phillips) 免费代码营可能帮助您长寿 (Free Code Camp Might Hel ...

  2. NLP研究者必备的语言学书籍!

    文 | Serena Gao@知乎 首先,做nlp不一定要很懂语言学,也不一定要跟语言学扯上关系.nlp可以仅是data mining,features engineering, 也的确有很多work ...

  3. cover-letter

    一般向SCI投稿论文时都会写一份Cover letter,即投稿信.它是为了帮助编辑快速了解文章内容和找到合适的审稿人,一篇内容恰当的cover letter会给你的工作锦上添花,掷出投稿第一块敲门砖 ...

  4. 当前位置 计算机英语,计算机英语_文章

    计算机英语 69 Unit 4: Computer Language and Programming (计算机语言与编程) Section A Programming Language I. Intr ...

  5. 计算机语言学习导论[C/C++]

    作者:@幻の上帝 1 前置条件 语文其实挺重要,这个没问题,但容易被忽视.当然,如果不是经常要折腾文档,要求不高:但起码要能说清楚话. 数学重要,主要是广度,作为快速学习相关领域知识的基础.深度上面可 ...

  6. 自然语言处理nlp全领域综述

    ************************* 精华总结,时间不够只看这个部分就行了 1.书和课 Michael Collins:COMS W4705: Natural Language Proc ...

  7. GNU Bison 中文手册

    GNU Bison 中文手册 2005年06月22日 22:31:00 阅读数:41743 20050620 GNU Bison 中文手册翻译完成 GNU Bison实际上是使用最广泛的Yacc-li ...

  8. 20050620 GNU Bison 中文手册翻译完成

    20050620 GNU Bison 中文手册翻译完成 GNU Bison实际上是使用最广泛的Yacc-like分析器生成器,使用它可以生成解释器,编译器,协议实现等多种程序. 它不但与Yacc兼容还 ...

  9. linux bison 手册

    20050620 GNU Bison 中文手册翻译完成 GNU Bison实际上是使用最广泛的Yacc-like分析器生成器,使用它可以生成解释器,编译器,协议实现等多种程序. 它不但与Yacc兼容还 ...

  10. GNU Bison 2.1 中文手册

    20060121 GNU Bison 2.1中文手册翻译完成 Bison 2.1 是Bison最新版本.该版本的最大改进就是支持以C++语言做为输出,并且在分析器的本地化输出中有多项改进.Bison的 ...

最新文章

  1. Android Binder 分析——匿名共享内存(Ashmem)
  2. 矩阵迹的性质_矩阵(含逆)的迹、行列式关于矩阵自身的导数计算与Maple验证...
  3. Java领域的对象如何传输-了解序列化的意义
  4. Warning: POST Content-Length of 29328854 bytes exceeds the limit of 8388608 bytes in Unknown on line
  5. 深入信号和槽(Signals and Slots in Depth)
  6. 数据库mysql面试题 it_【模块三】数据库篇--MySQL面试题☞参考答案
  7. 推荐几款提升效率的神器
  8. Android实现异步处理 -- HTTP请求
  9. Eclipse创建Maven父子项目
  10. flask response Content-Type
  11. C语言和设计模式(之模板模式)
  12. springcloud基于ribbon的canary路由方案 1
  13. C#程序打包安装部署之创建快捷方式
  14. 在框架中用JS设置target(用于location.href)
  15. app用http3与服务器_mqtt服务器搭建以及客户端Paho安装使用
  16. C语言大小端转换问题
  17. Tar的详细用法(转自Linux伊甸园)_拔剑-浆糊的传说_新浪博客
  18. Sniffer抓包教程
  19. 【嵌入式开发】监测系统——用QT编写下位机
  20. JAVA基础编程——IO编程

热门文章

  1. css实现烟雾效果(css制作汽车尾气排放效果)
  2. 动手学数据分析(五)- 模型建立和评估
  3. 【得物技术】机器学习在图形验证码识别上的应用
  4. 前端开发之抽屉热搜榜
  5. 小感之绝知此事要躬行
  6. 安利 : プログラミングで彼女をつくる 全攻略~
  7. Scheme 语言概要(下)
  8. usemvc永远不会被使用_你永远不会离开
  9. JAVA接口签名(Signature)实现方案
  10. 域名虚拟主机_域名和虚拟主机之间有什么区别(解释)