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

Irrigation System and Its Methods

This paper provides information of “Irrigation system and its various methods”. There are many old and new techniques are now available for irrigation, which includes modern technology and automation i.e. the use of sen...

Big Data and Cloud Computing: Challenges and Issues in Present Era

Big data is a data analysis methodology enabled by recent advances in technologies and architecture. However, big data entails a huge commitment of hardware and processing resources, making adoption costs of big data te...

slugFabrication of WS 2 Nanostructures Using Vapor Phase Deposition Method

Direct growth of atomically thin WS2 nanoplates and nanofilms on the SiO2/Si (300 nm) substrate by vapor phase deposition method without any catalyst is presented here. The WS2nanostructures were systematically characte...

slugTriple Security of File System of Cloud Computing

Large scale distributed systems such as cloud computing applications are becoming very common. These applications come with increasing challenges on how to transfer and where to store and compute data. The most prevalen...

Parametric Study of Variation in Peak Temperature for Different Tool Material in AA6061 FSW Welded Butt Joint Using Altair Hyperweld

Friction Stir Welding (FSW) is an emerging solid-state joining technology that is being developed since last two decades. In this present study, three dimensional nonlinear virtual experiments is conducted using ALTAIR...

Download PDF file
  • EP ID EP20897
  • DOI -
  • Views 265
  • 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