Open Access. Powered by Scholars. Published by Universities.®

PDF

Master's Projects

Theses/Dissertations

2022

Articles 1 - 1 of 1

Full-Text Articles in Programming Languages and Compilers

Jparsec - A Parser Combinator For Javascript, Sida Zhong Jan 2022

Jparsec - A Parser Combinator For Javascript, Sida Zhong

Master's Projects

Parser combinators have been a popular parsing approach in recent years. Compared with traditional parsers, a parser combinator has both readability and maintenance advantages.

This project aims to construct a lightweight parser construct library for Javascript called Jparsec. Based on the modular nature of a parser combinator, the implementation uses higher-order functions. JavaScript provides a friendly and simple way to use higher-order functions, so the main construction method of this project will use JavaScript's lambda functions. In practical applications, a parser combinator is mainly used as a tool, such as parsing JSON files.

In order to verify the utility of …