Generic Parser

Abstract

This paper shows how to implement generic parsers as a family of streams. This allows for very readable, maintainable and flexible parsers. The method is illustrated with a parser for simple arithmetic expressions, but can easily be extended to a parser for a full-fledged programming language. Moreover, the same technique can be applied to the entire process from lexing to execution, since actions can be associated with each sub-parser. The parsing of input is a very important problem appearing in many different parts of software development - parsing user input in the form of command-line options, the parsing of arithmetic expressions in a calculator, parsing values in a user-defined configuration file or compiling some programming language. This makes it important to have different approaches. What we will present here in this project, is a method of parsing inspired by what is done in functional programming (FP). The paper is not about functional programming in C++. Moreover, the presence of too many parentheses makes the code harder to read and is hence also more error prone, rather it is about how to implement a particularly elegant idea from FP in an object oriented context.

Authors and Affiliations

Ms. Shrunkhala Satish Wankhede, Mr. Shubham Itankar, Mr. Sumit Borse

Keywords

Related Articles

Internet of Things based Hazardous Gas detection in Power Plants

As most of the power production in today’s world mainly relies on power plants,it becomes more considerate for its safety. It is necessary that good safety systems are to be implemented in places of education and work....

Data Hiding Using Blind Algorithm of Steganography

The process of hiding messages or information within other non-secret text or data is called steganography. Steganography may be text, image, audio or video steganography. Digital image Steganography is popular because...

A Survey on Security in Software Defined Vehicular Cloud

vehicular cloud computing is a hybrid technology embedded system. Cloud vehicles carry the information of traffic and road conditions and infotainment. It is foundation of internet based vehicular technology and intelli...

Determination of Strength Analysis of Bus Body Carline through FEA

Buses are the foremost mode of road transportation. The design of the bus body depends mainly leading the performance constraint under various types of loading and operating circumstances besides those of the road condi...

Design and Interfacing Induction Cooker with GSM

After a review of the present-day advancements in wireless automation systems, the paper introduces an efficient and economical automation system based on GSM technology. The recommended system uses as a central microco...

Download PDF file
  • EP ID EP20897
  • DOI -
  • Views 240
  • Downloads 4

How To Cite

Ms. Shrunkhala Satish Wankhede, Mr. Shubham Itankar, Mr. Sumit Borse (2015). Generic Parser. International Journal for Research in Applied Science and Engineering Technology (IJRASET), 3(6), -. https://europub.co.uk/articles/-A-20897