answersLogoWhite

0

What is semantic and syntactic?

Updated: 8/10/2023
User Avatar

Wiki User

14y ago

Best Answer

Syntax refers to the set of rules that govern what sequences of symbols are valid programs or not. Semantics refers to what the various syntactic constructs actually mean, what they do, and so on.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

8y ago

A semantic describes the meaning behind program code while the syntax describes the means by which that semantic may be expressed in a specific language. That is, each programming language has its own syntax rules, but they can all be used to express the same semantic; the language syntax merely dictates how that semantic is symbolised in code.

As a simple example, most programming languages will provide some means of performing a simple loop. A loop that executes exactly 10 times is a semantic. In C++ we might express that semantic as follows:

for (int x=1; x<=10; ++x) {

// do something...

}

But this syntax does not work in BASIC, where we might write the following instead:

FOR x=1 TO 10

REM do something...

NEXT x

Another way of looking at it is that a syntax error is usually a compile time error whereas a semantic error is usually a runtime error. To use an analogy, the phrase "back-to-back they faced each other" is syntactically correct according to the grammar of the English language, but semantically it makes no sense.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Semantics deals with word meanings. Syntactic deals with word order and the way phrases and sentences are put together.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

The syntax defines the rules of a language; the semantics describe the meaning of a statement in a language.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Syntax are the grammar rules...

and semantics are method

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

hjjhjhuhjuh

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is semantic and syntactic?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are semantic and syntactic clues?

bayag \


What does syntactic structure and semantic means mean?

syntactic structure deals primarily with the way a sentence is structured


What the difference between syntactic knowledge and semantic knowledge?

Syntactic Knowledge: of or pertaining expertise to syntax/grammar.Semantic Knowledge: expertise of the full meaning of the language


What sources of information should a reader use to make inferences?

The three three sources of information are semantic, graphophonic, and syntactic.


What is meta assembler?

Meta-assembler is a program that accepts the syntactic and semantic description of an assembly language, and generates an assembler for that language.


What is a meta assembler?

Meta-assembler is a program that accepts the syntactic and semantic description of an assembly language, and generates an assembler for that language.


What has the author Kent Laver written?

Kent Laver has written: 'Semantic and syntactic properties of universal relation scheme data bases' -- subject(s): Database management


How many pages does Syntactic Structures have?

Syntactic Structures has 117 pages.


When was Syntactic Structures created?

Syntactic Structures was created in 1957-02.


What is syntactic processing in AI?

The third phase of NLP is syntactic AI document processing, sometimes known as parsing or syntax analysis. The goal of this step is to extract precise, or dictionary-like, meaning from the text. Syntactic analysis is the process of assigning a semantic structure to text. It's also known as parsing or syntax analysis. Although both phrases include the same words, only the first is syntactically valid and comprehensible. Syntactic analysis is described as the process of determining the logical meaning of sentences or sections of sentences. The structure of phrases and the relationships between words within the phrase is referred to as syntax. The set of rules, concepts, and procedures that regulate the form of sentences in a natural language is referred to as syntax.


What does semantic mean?

semantic:


What are the classification of programming languages?

Programming languages, like human languages, are defined through the use of syntactic and semantic rules, to determine structure and meaning respectively. Thousands of different programming languages have been created, and new languages are created every year.