ALERT

[WEBINAR] See the Whole Story: The Case for a Visualization Platform

Parser

Definition - What does Parser mean?

A parser is a compiler or interpreter component that breaks data into smaller elements for easy translation into another language. A parser takes input in the form of a sequence of tokens or program instructions and usually builds a data structure in the form of a parse tree or an abstract syntax tree.

Techopedia explains Parser

A parser is commonly used as a component of an interpreter or a compiler. The overall process of parsing involves three stages:

  1. Lexical Analysis: A lexical analyzer is used to produce tokens from a stream of input string characters, which are broken into small components to form meaningful expressions.
  2. Syntactic Analysis: Checks whether the generated tokens form a meaningful expression. This makes use of a context-free grammar that defines algorithmic procedures for components. These work to form an expression and define the particular order in which tokens must be placed.
  3. Semantic Parsing: The final parsing stage in which the meaning and implications of the validated expression are determined and necessary actions are taken.

A parser's main purpose is to determine if input data may be derived from the start symbol of the grammar. If yes, then in what ways can this input data be derived? This is achieved as follows:

  • Top-Down Parsing: Involves searching a parse tree to find the left most derivations of an input stream by using a top-down expansion. Examples include LL parsers and recursive-descent parsers.
  • Bottom-Up Parsing: Involves rewriting the input back to the start symbol. This type of parsing is also known as shift-reduce parsing. One example is a LR parser.

    Parsers are widely used in the following technologies:

    • Java and other programming languages
    • HTML and XML
    • Interactive data language and object definition language
    • Database languages, such as SQL
    • Modeling languages, such as virtual reality modeling language
    • Scripting languages
    • Protocols, such as HTTP and Internet remote function calls

    Connect with us

    Techopedia on Linkedin
    Techopedia on Linkedin
    Tweat cdn.techopedia.com
    "Techopedia" on Twitter


    '@Techopedia'
    Sign up for Techopedia's Free Newsletter!

    Email Newsletter

    Join thousands of others with our weekly newsletter

    Resources
    Free Whitepaper: The Path to Hybrid Cloud
    Free Whitepaper: The Path to Hybrid Cloud:
    The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
    Free E-Book: Public Cloud Guide
    Free E-Book: Public Cloud Guide:
    This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
    Free Tool: Virtual Health Monitor
    Free Tool: Virtual Health Monitor:
    Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
    Free 30 Day Trial – Turbonomic
    Free 30 Day Trial – Turbonomic:
    Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.