what is the different between Grammar and syntax
在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的内部结构比如 bookkeepers
has four morphemes (类词根词缀复数)(book, keep, -er, -s) 。
what-is-the-difference-between-syntax-and-grammar-in-compiler
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".
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
It includes the syntax, but it’s not limited to that.
根据NOAD的定义,语法是“一般语言或语言的整个系统和结构,通常由语法和形态(包括变形)组成,有时也包括音韵和语义。”
answer2
As I hear them used, grammar
通常是英语或任何其他特定语言的子字段
可以是描述性的和规定性的
寻求定义使用特定语言的参数
而语法
是语言学的一个子领域
只是描述性的
旨在用语言中立的通用参数来描述语言使用
这两种语法和句法,通常都集中在单词功能于句子的水平(高于发音的水平,低于散文式的水平),但可以蔓延到这些和其他子域
Ⅲ What-is-the-difference-between-grammar-and-syntax
Ⅳ/whats-the-difference-between-syntax-and-grammar
Grammar is a very broad term that can roughly be described as
- “How can we sort out the word antidenationalization into a meaningful structure?”
- “What went wrong with the word undeadable, while we can say undead and unbreakable?”
- “Why do we find un-use-ful okay, but un-ful not?”
- “How come that it is sing-er-s and not sing-s-er? What is the difference between how a so-called derivational moprpheme -er and an inflectional morpheme like -s work?”
phonology: The structure of sounds.
Questions include: - “Why is it that we say ships, but not fishs and buss, but fishes and busses?”
- “How do we intuitively know, without ever having heard the word imby-bimby before, that it should be an imby-bimby and not a imby-bimby?” (It has something to do with vowels and consonants.)
- “Why can a word like rgafmp not exist in English?” Yes, this is actually ungrammatical. Grammar means more than “It’s we swam, not we swimmed”.
Sometimes, semantics, i.e. the study of meaning, is seen as a part of grammar: - “Why can we read the sentence Every child sings a song both as For every child it holds that it sings some song (not necessarily the same one) and There is (at least) one song which every child sings (this being one and the same song)?”
- “Why can bow mean both to lean forward and a thing that you use with arrows to shoot?”
- “In the sentence John seeks a book about Norway, how can we account for the two readings 1) John is looking for a specific book about Norway he has seen the other day vs. 2) John is looking for some book about Norway, but isn’t sure that what he wants exists at all?”
语法:短语和句子的结构 - 见上文。
形态学:单词的内部结构。
问题包括:
- “我们怎样才能将反国际化这个词理清成一个有意义的结构?”
- “ 不可言喻这个词出了什么问题,而我们可以说亡灵和牢不可破?”
- “为什么我们发现未使用-FUL不错,但非FUL不呢?”
- “怎么,这是唱-ER-S ,而不是唱-S-ER?是有什么区别怎么所谓的派生moprpheme -er和屈折语素像-s的工作?”
音韵:声音的结构。
问题包括: - “为什么我们说的船舶,但不fishs和巴斯,但鱼和公共汽车?”
- “我们怎么直觉地知道,以前没有听过imby-bimby这个词,它应该是一个imby-bimby而不是imby-bimby?” (它与元音和辅音有关。)
- “为什么英语中不存在像rgafmp这样的词?” 是的,这实际上是 不合语法的。语法是指超过“这是我们游泳,不是我们swimmed ”。
有时,语义,即意义研究,被视为语法的一部分: - “为什么我们可以读出句子每个孩子唱支歌既是对每一个孩子就认为它唱一些歌(不一定是同一个),并有(至少)一首歌曲,其每一个孩子唱歌(这是一个和同一首歌)?“
- “为什么弓箭意味着向前倾斜和用箭头射击的东西?”
- “在约翰寻求一本关于挪威的书中,我们如何解释这两本读物1)约翰正在寻找一本关于挪威的特定书籍,他前几天曾见过他们 .2)约翰正在寻找一本关于挪威的书,但是不确定他想要什么存在吗?“
- Main Difference – Grammar vs Syntax
- http://www.differencebetween.net/language/difference-between-grammar-and-syntax/
google搜索
what is the different between Grammar and syntax相关推荐
- 关于长寿_FreeCodeCamp可以帮助您更长寿
关于长寿 by Christopher Phillips 克里斯托弗·菲利普斯(Christopher Phillips) 免费代码营可能帮助您长寿 (Free Code Camp Might Hel ...
- NLP研究者必备的语言学书籍!
文 | Serena Gao@知乎 首先,做nlp不一定要很懂语言学,也不一定要跟语言学扯上关系.nlp可以仅是data mining,features engineering, 也的确有很多work ...
- cover-letter
一般向SCI投稿论文时都会写一份Cover letter,即投稿信.它是为了帮助编辑快速了解文章内容和找到合适的审稿人,一篇内容恰当的cover letter会给你的工作锦上添花,掷出投稿第一块敲门砖 ...
- 当前位置 计算机英语,计算机英语_文章
计算机英语 69 Unit 4: Computer Language and Programming (计算机语言与编程) Section A Programming Language I. Intr ...
- 计算机语言学习导论[C/C++]
作者:@幻の上帝 1 前置条件 语文其实挺重要,这个没问题,但容易被忽视.当然,如果不是经常要折腾文档,要求不高:但起码要能说清楚话. 数学重要,主要是广度,作为快速学习相关领域知识的基础.深度上面可 ...
- 自然语言处理nlp全领域综述
************************* 精华总结,时间不够只看这个部分就行了 1.书和课 Michael Collins:COMS W4705: Natural Language Proc ...
- GNU Bison 中文手册
GNU Bison 中文手册 2005年06月22日 22:31:00 阅读数:41743 20050620 GNU Bison 中文手册翻译完成 GNU Bison实际上是使用最广泛的Yacc-li ...
- 20050620 GNU Bison 中文手册翻译完成
20050620 GNU Bison 中文手册翻译完成 GNU Bison实际上是使用最广泛的Yacc-like分析器生成器,使用它可以生成解释器,编译器,协议实现等多种程序. 它不但与Yacc兼容还 ...
- linux bison 手册
20050620 GNU Bison 中文手册翻译完成 GNU Bison实际上是使用最广泛的Yacc-like分析器生成器,使用它可以生成解释器,编译器,协议实现等多种程序. 它不但与Yacc兼容还 ...
- GNU Bison 2.1 中文手册
20060121 GNU Bison 2.1中文手册翻译完成 Bison 2.1 是Bison最新版本.该版本的最大改进就是支持以C++语言做为输出,并且在分析器的本地化输出中有多项改进.Bison的 ...
最新文章
- Android Binder 分析——匿名共享内存(Ashmem)
- 矩阵迹的性质_矩阵(含逆)的迹、行列式关于矩阵自身的导数计算与Maple验证...
- Java领域的对象如何传输-了解序列化的意义
- Warning: POST Content-Length of 29328854 bytes exceeds the limit of 8388608 bytes in Unknown on line
- 深入信号和槽(Signals and Slots in Depth)
- 数据库mysql面试题 it_【模块三】数据库篇--MySQL面试题☞参考答案
- 推荐几款提升效率的神器
- Android实现异步处理 -- HTTP请求
- Eclipse创建Maven父子项目
- flask response Content-Type
- C语言和设计模式(之模板模式)
- springcloud基于ribbon的canary路由方案 1
- C#程序打包安装部署之创建快捷方式
- 在框架中用JS设置target(用于location.href)
- app用http3与服务器_mqtt服务器搭建以及客户端Paho安装使用
- C语言大小端转换问题
- Tar的详细用法(转自Linux伊甸园)_拔剑-浆糊的传说_新浪博客
- Sniffer抓包教程
- 【嵌入式开发】监测系统——用QT编写下位机
- JAVA基础编程——IO编程