Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!rjh From: rjh@cs.purdue.EDU (Bob Hathaway) Newsgroups: comp.lang.misc Subject: Re: Syntax vs Semantics (silliness!) Message-ID: <6532@medusa.cs.purdue.edu> Date: 12 Apr 89 23:42:19 GMT References: <7708@batcomputer.tn.cornell.edu> <5160016@hpfcdc.HP.COM> Sender: news@cs.purdue.EDU Reply-To: rjh@cs.purdue.edu (Bob Hathaway) Organization: Department of Computer Science, Purdue University Lines: 36 In article <5160016@hpfcdc.HP.COM> marc@hpfcdc.HP.COM (Marc `Play Ball!' Sabatella) writes: >>I'm not even real sure of the *informal* English distinction between >>"syntax" and "semantics". >> >>How do you linguistics people use these words? > >One of my pet peeves is when two people are arguing over some fine distinction >is the the exact meaning of a word, and one will exclaim, "That's just >semantics". I always wondered what it is that this person thinks is more >high-level than semantics, and what he would call it. I can remember an interesting set of linguistic definitions: Syntax Specifies the correct form for objects Semantics Specifies what the objects mean Pragmatics Specifies relationships among the objects I've also seen pragmatics defined as the use, history, and style of programming. Syntax is specified by grammars and semantics specify the meanings of syntactic entities but I've found a common confusion exists between syntax directed translation and semantics. English can be specified by a grammar but a grammar alone cannot recognize valid English sentences; semantics must be used to understand the syntactic entities. In other words, I can build parse trees for the correct translation of valid English sentences but the translation process resulting in these parse trees should not be performed through simple syntax directed translation, semantics and pragmatics are used to distinguish syntactic entities. In classical synthetic languages, syntax directed translation is sufficient to parse correct programs but they also recognize syntactically correct but semantically incorrect programs such as the inconsistent declaration and use of definitional objects and the incorrect use of context sensitive constructs such as break statements not contained within loops. So, my understanding of these terms are: syntax specifies correct forms, semantics specifies their meanings and pragmatics can specify additional information for understanding the context of usage. Bob Hathaway rjh@purdue.edu