answersLogoWhite

0


Best Answer

Each individual interpreter is free to react however the creators see fit. Typically they will stop executing and display a descriptive message to the user.

Some will make a "best guess" at what it thinks the programmer was trying to write, though this approach tends to be more frustrating than useful.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How would an interpreter react to a syntax error?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is syntax error a compilation error?

Not entirely. A compilation error can contain a syntax error, but what a syntax error actually is, is an error in how the coding is spelled. For example, say you are trying to program a router. You type in the code, of which you know it's the correct code, but receive an error. You proofread the code and notice that one or more of the words are not spelled correctly. This would be a syntax error. They can also take the form of misplacing the words in the code's syntax.


What Errors are relatively easy to locate and correct because the compiler or interpreter you use highlights every error?

Run time errors or syntax errors are most easy to locate, since the compiler will show you where the errors are. A logic error would be more difficult to locate, since the program runs but does not compute the desired result.


Difference between semantic error and logical errors?

Syntax Error: error due to missing colon, semicolon, parenthesis, etc. Syntax is the way in which we construct sentences by following principles and rules. Example: In C++, it would be a syntax error to say int x = "five"; This will not compile because it does not follow the syntax of the language and does not make any sense to the compiler. Semantic Error: it is a logical error. it is due to wrong logical statements. Semantics is the interpretations of and meanings derived from the sentence transmission and understanding of the message. Semantics errors are Logical, while Syntax errors are code errors. Example: A semantic error would compile, but be incorrect logically: const int pi = 12345; Your program will likely compile and run without error but your results will be incorrect. (Note that these types of errors are usually much harder to debug)


What are Mistakes that cause a running program to produce incorrect results?

You could call it a bug in general but more specifically code with no syntax errors (i.e. it compiles and runs) but doesn't produce the output you expect would be called a semantic error.


What is the difference between interpreter and parser and compiler?

in my personal point of view i would say a parser is more like "one-directional" "automatic" vs. an interpreter, the interpreter has more "intelligence"

Related questions

Is syntax error a compilation error?

Not entirely. A compilation error can contain a syntax error, but what a syntax error actually is, is an error in how the coding is spelled. For example, say you are trying to program a router. You type in the code, of which you know it's the correct code, but receive an error. You proofread the code and notice that one or more of the words are not spelled correctly. This would be a syntax error. They can also take the form of misplacing the words in the code's syntax.


What Errors are relatively easy to locate and correct because the compiler or interpreter you use highlights every error?

Run time errors or syntax errors are most easy to locate, since the compiler will show you where the errors are. A logic error would be more difficult to locate, since the program runs but does not compute the desired result.


Can you write plus at end of c statement?

No. That would be a syntax error. Only a right semicolon (;) can go at the end of a statement.


What is syntactic error?

A syntax error is an error raised by a system when it can not understand the input provided by the user. Typically, this means that a developer is writing software, and the system can not understand some of the code that was written by the developer. Some languages require a semi-colon at the end of each line of code; missing a semi-colon would be a syntactical error. Syntax errors may also be created by users, such as an unbalanced parenthesis in a formula. In any event, most systems will not allow the code to compile, be evaluated, or run (depending on the specific use case) until the syntactical error is corrected.


What does experimental error mean?

The experimental error is an error in a science experiment. Eg.If you had two chemicals that were suposed to react if you put water in them and they did nothing that would be an experimental error. jasper attard


When do you think a cultural interpreter would be more apptopriate to use a language intrepreter cultural interpreter would be moreappropriate than a language interpreter?

to have a better unde3rstanding of the patient culture and beliefs.


Is community interpreter need to ponctal?

i would like to know if a community interpreter need to be punctual?


Difference between semantic error and logical errors?

Syntax Error: error due to missing colon, semicolon, parenthesis, etc. Syntax is the way in which we construct sentences by following principles and rules. Example: In C++, it would be a syntax error to say int x = "five"; This will not compile because it does not follow the syntax of the language and does not make any sense to the compiler. Semantic Error: it is a logical error. it is due to wrong logical statements. Semantics is the interpretations of and meanings derived from the sentence transmission and understanding of the message. Semantics errors are Logical, while Syntax errors are code errors. Example: A semantic error would compile, but be incorrect logically: const int pi = 12345; Your program will likely compile and run without error but your results will be incorrect. (Note that these types of errors are usually much harder to debug)


What are Mistakes that cause a running program to produce incorrect results?

You could call it a bug in general but more specifically code with no syntax errors (i.e. it compiles and runs) but doesn't produce the output you expect would be called a semantic error.


How do you use react in a sentence?

To use React, you would typically create components that represent different parts of your user interface and then compose them together to build a complete application. You would also manage the application state and handle user interactions using React's lifecycle methods and event handling. Finally, you would render the components by defining the layout and structure of your application using JSX syntax and import necessary libraries and modules to run your React application.


What would you expect the outcome of the syntax?

no it is not


What would you expect this syntax to do and c type config sys?

What 'this syntax' is, and forget about config.sys (outdated by 15 years).