answersLogoWhite

0


Best Answer
  1. Simplicity-Techniques for lexical analysis are less complex than those required for syntax analysis, so the lexical-analysis process can be sim- pler if it is separate. Also, removing the low-level details of lexical analy- sis from the syntax analyzer makes the syntax analyzer both smaller and less complex.

  2. Efficiency-Although it pays to optimize the lexical analyzer, because lexical analysis requires a significant portion of total compilation time, it is not fruitful to optimize the syntax analyzer. Separation facilitates this selective optimization.

  3. Portability-Because the lexical analyzer reads input program files and often includes buffering of that input, it is somewhat platform dependent. However, the syntax analyzer can be platform independent. It is always good to isolate machine-dependent parts of any software system.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: 1. What are three reasons why syntax analyzers are based on grammars?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What syntax-based language integrates into HTML pages?

JavaScript


Will the java compiler translate a source file that contains syntax errors?

No it will not. Any java source file that has syntax errors will not be translated fully. The compiler will spit out errors based on the syntax problems in your code.


Java syntax are based on which language?

Java's syntax is primarily based on the syntax of the C and C++ programming languages. James Gosling and his team, the creators of Java, aimed to make Java familiar to programmers who were already proficient in C and C++. This approach facilitated the adoption of Java among developers with prior experience in these languages. At AchieversIT, our Java training courses cover not only the syntax but also the core concepts and principles of Java programming, enabling students to become proficient Java developers.


Why is syntax analysis is based on grammar?

Syntax analysis (parsing) is to determine a text is conform to a predefined rule. A rule is the format, the sequence, to compose an element or abstraction (words, fields, tokens, nodes in xml, area code in a sequence of digits, etc.). Grammar is a collection of these predefined rules.


How do you adapt Sanskrit as a programming language?

You don't. A programming language and a spoken language have quite different structures; you don't use one for the other. Most programming languages are based on English, but that's usually just a few keywords, and perhaps class names, and similar stuff, that's English; the syntax of the programming language has nothing to do with English syntax.

Related questions

Functions are based on rules called?

syntax


What syntax-based language integrates into HTML pages?

JavaScript


Is this sentence correct- Are you based in Canada?

The syntax is correct - it may or may not be true.


Is ASL Ungrammatical?

No, American Sign Language (ASL) is a grammatical language with its own rules and structure. It is not based on English grammar but has its own syntax, morphology, and syntax that is unique to ASL.


Will the java compiler translate a source file that contains syntax errors?

No it will not. Any java source file that has syntax errors will not be translated fully. The compiler will spit out errors based on the syntax problems in your code.


Java syntax are based on which language?

Java's syntax is primarily based on the syntax of the C and C++ programming languages. James Gosling and his team, the creators of Java, aimed to make Java familiar to programmers who were already proficient in C and C++. This approach facilitated the adoption of Java among developers with prior experience in these languages. At AchieversIT, our Java training courses cover not only the syntax but also the core concepts and principles of Java programming, enabling students to become proficient Java developers.


What is difference between linear syntax and relational algebra?

They are not alternative solutions so that we can compare them. Relational database (which is based on relational algebra) demands (atleast the founder of relational database Codd suggests) that the query language follow linear syntax. The linear syntax languages don't rely up on newline characters as terminators of expressions or statements -- instead they rely on other tokens such as semicolon or comma and so on.


Why is syntax analysis is based on grammar?

Syntax analysis (parsing) is to determine a text is conform to a predefined rule. A rule is the format, the sequence, to compose an element or abstraction (words, fields, tokens, nodes in xml, area code in a sequence of digits, etc.). Grammar is a collection of these predefined rules.


Are most men are homophobic because they worry that they will be placed in a lower status position if they associated with gay men?

No, not necessarily. Homophobes are homophobic for a large variety of reasons. Most of it is fear-based and religion-based.No, not necessarily. Homophobes are homophobic for a large variety of reasons. Most of it is fear-based and religion-based.


What are the different types of database languages?

Two main types: Relational Calculus based Language Relational Algebra based Language. These languages provide similar set of operations but with different syntax. Calculus based is more kind of procedural and near to English, while Algebra based uses a set of symbols for queries.


What form of argument presents a conclusion based on reasons or proof?

induction


Is rules a true story?

there are no reasons to believe that the storyline was based on real events.