際際滷

際際滷Share a Scribd company logo
Diif bw parser and interpreter
Interpreter: interpreter normally means a computer
program that executes
An interpreter may be a program that either
1. executes the source code directly
2. translates source code into some efficient
intermediate representation (code) and immediately
executes this
3. explicitly executes stored precompiled code[1] made
by a compiler which is part of the interpreter system
OR it interprets the machine while executing
Parser: Parser is a computer program usually a part of
compiler that receives input form of sequential source
program instructions, interactive online commands,
markup tags, or some other defined interface and
breaks them up into parts (for example, the nouns
(objects), verbs (methods), and their attributes or
options) that can then be managed by other
programming (for example, other components in a
compiler). A parser may also check to see that all input
has been provided that is necessary.
A parser is one of the components in an interpreter or
compiler, which checks for correct syntax and builds a
data structure (often some kind of parse tree, abstract
syntax tree or other hierarchical structure) implicit in
the input tokens. The parser often uses a separate
lexical analyser to create tokens from the sequence of
input characters. Parsers may be programmed by hand
or may be semi-automatically generated (in some
programming language) by a tool (such as Yacc) from a
grammar written in Backus-Naur form.
Diif bw parser and interpreter

More Related Content

Diif bw parser and interpreter

  • 2. Interpreter: interpreter normally means a computer program that executes An interpreter may be a program that either 1. executes the source code directly 2. translates source code into some efficient intermediate representation (code) and immediately executes this 3. explicitly executes stored precompiled code[1] made by a compiler which is part of the interpreter system OR it interprets the machine while executing
  • 3. Parser: Parser is a computer program usually a part of compiler that receives input form of sequential source program instructions, interactive online commands, markup tags, or some other defined interface and breaks them up into parts (for example, the nouns (objects), verbs (methods), and their attributes or options) that can then be managed by other programming (for example, other components in a compiler). A parser may also check to see that all input has been provided that is necessary.
  • 4. A parser is one of the components in an interpreter or compiler, which checks for correct syntax and builds a data structure (often some kind of parse tree, abstract syntax tree or other hierarchical structure) implicit in the input tokens. The parser often uses a separate lexical analyser to create tokens from the sequence of input characters. Parsers may be programmed by hand or may be semi-automatically generated (in some programming language) by a tool (such as Yacc) from a grammar written in Backus-Naur form.