answersLogoWhite

0


Best Answer

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"

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between interpreter and parser and compiler?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are structured grammars and languages generated by a grammar?

Structured or formal grammars are a method of describing a computer language in another meta-language, that if the grammar. For example, you could use EBNF to describe the grammar for the language Pascal. The meta-language, the language in which the grammar is expressed, varies with the tools in use.Structured grammars are typically used to implement programming languages, but are also commonly used to create parsers for meta-languages such as HTML or XML, for command oriented streams, or for complex protocols (such as HTTP).This formal grammar definition acts as input to a parser generator. Parser generators are also compiler generators or compiler compilers, but these tools never generate a compiler. Instead, they generate lexical analyzers and parser tools, typically resulting in an abstract syntax tree (semantic node tree) in some form.A lexical analyzer is the tool that digests the input in the final language (e.g. Pascal), and decides on each fragment (token) what it is: a keyword, a number, etc. The parser generator folds the stream of tokens into semantic nodes (an expression, a variable definition, etc).At that point, the input (the Pascal program in this example) is known to be syntactically correct. The next stages include semantic analysis (does it make sense and what does it mean?), code generation and code optimization.The most famous (and infamous) representative is the pair of lex and yacc. Lex generates a lexical analyzer, yacc (short for Yet Another Compiler Compiler) generates a parser. Lex and Yacc's more modern successors are Flex and Bison, other popular tools include ANTLR. Other tools are available.


What are the function of compiler and an interpreter?

Interpreters translate source code into machine while it is executing. The machine code is not saved, thus the code must be translated on every execution. As a result, the code is larger and very much slower than an equivalent machine code executable would be. However, the source code is highly portable. Compilers translate the whole program at once to produce a machine code executable that requires no further translation. However, the machine code is non-portable and must be recompiled for each supported platform. Some language compile to byte code rather than machine code. Byte code is best thought of as being the native language of a virtual machine rather than a physical one. The virtual machine then interprets the byte code to produce the machine code. Like all interpreted languages, the byte code is highly portable, and while quicker to interpret than source code, is still very much larger and slower than compiled native machine code.


What is the output of the parser from a compiler?

The output of an assembler is a part or all of a product. An assembler can work in a variety of manufacturing operations with the right training.


How do you parse XML using JavaScript?

To manipulate an XML document in javascript, you need an XML parser. Today all browsers come with in-built parsers that can parse the XML document. The parser loads the document into your computer's memory. Once the document is loaded, its data can be manipulated using the DOM(Document Object Model). There is significant differences in implementation of Microsoft Browser based XML parser and the Mozilla browsers based XML parser.


Can you use yacc to generate a parser for HTML parsing?

Yes.

Related questions

What is difference between Lex and Yacc?

lex is lexical analyser whereas yacc is a parser generator


What is a PHP parser?

PHP is a programming language, and parser specifically is part that reads human-readable representation of code to generate parse tree and later opcode representation of code that can be interpreted by php interpreter.


How do you build a programming language?

This is a very large topic indeed and I fully recommend the book "Compilers: Principles, Techniques, and Tools" by Aho, Sethi, and Ullman. But the general process first involves first defining regular expressions that will be used to break up an input program into a series of tokens. The part of the compiler/interpreter that performs this function is called a scanner. From there a parser should be created based on the context free grammar of the language. Parsing produces a representation of the input program in memory called an abstract syntax tree. From that point a compiler can be created by generating assembly language for the program. Or an interpreter can be created by executing the abstract syntax tree directly.


Where can you find an assembly program compiler and editor for the TI 84 calculator?

There is a TI asm manual with links on ticalc.org. But before you try that, Google "Axe Parser". Its not as good as it looks-- its better!


What type of interpreter is used in HTML?

HTML is generally interpreted using a "parser." The parser reads the text, and puts it together using a series of "tokens" or in the case of an HTML document, "tags" or "elements." Parsing (also call syntactical analysis) is used frequently in Computer Science. The individual browser's use various parsers, changing from vendor to vendor and sometimes from one version to the next. This difference is precisely why different browsers will render the same HTML different way.


What is a parser?

Parser is a portion of the computer progam which carry out parsing process.


What are the applications of the computer program Yacc?

YACC, which stands for Yet Another Compiler Compiler, is considered a parser generator. This family of computer programs is used to decipher source code in programming. This type of program is used with almost all computer programs, but YACC has mostly been replaced by more recent programs.


When was Pdf-parser created?

Pdf-parser was created on 2008-05-02.


A top down parser generates?

a top down parser generates a leftmost derivation


How to design a Compiler?

This is a fairly complex answer, but it basically boils down to a few oversimplified steps. First, design a language, or find the specifications for a language you would like to use. Second, design a lexical parser that can interpret the "tokens" that you designed in your language. Third, design a compiler/linker that will assemble the tokens into binary code, and link them with the appropriate libraries. Your exact steps will vary depending on the operating system you are using, the compiler you have available, etc.


What is compiler pass?

When a compiler, or a parser for that matter, parses a text written in a formal language called "programming language" (describing algorithms in an imperative way, see wikipedia for "imperative programming"), it constructs a so-called "parse tree". A multi pass compiler iterates this recursive tree of tokens (terminals and non terminals) several times, thus being able to optimize the code or find common mistakes, eventually fixing them.


What are the uses of compiler besides translation?

compiler is complex software compounding of scanner,parser,intermediate code generator , object code generator etc. Actually its tasks is to convert one language to another target language. then it may be possible that source language may be c# ,java , C source code and target language one of them or assembly language code.