Open Access
Lazy functional parser combinators in Java
Doaitse Swierstra,Atze Dijkstra +1 more
- 01 Jun 2001
TL;DR: This paper shows how to use parser combinators in a functional language as well as Java, and shows how parser combinators can be implemented in Java.
read more
Abstract: A parser is a program that checks if a text is a sentence
of the language as described by a grammar Traditionally, the program
text of a parser is generated from a grammar description, after which it is
compiled and subsequently run The language accepted by such a parser
is, by the nature of this process, hardcoded in the program Another
approach, primarily taken in the context of functional languages, allows
parsers to be constructed at runtime, thus dynamically creating parsers
by combining elements from libraries of higher level parsing concepts; this
explanins the the name "parser combinators" Efficient implementation
of this concept relies heavily on the laziness that is available in modern
functional languages [13, 14] This paper shows how to use parser combinators
in a functional language as well as Java, and shows how parser
combinators can be implemented in Java Implementing parser combinators
is accomplished by combining two libraries The first one, written
in Haskell, defines error-correcting and analysing parser combinators [2]
The second one consists of a small Java library implementing lazy functional
behavior The combinator library is straightforwardly coded in
Java, using lazy behavior where necessary In this paper all three aspects,
the two libraries and its combination, are explained
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
Better extensibility through modular syntax
Robert Grimm
- 11 Jun 2006
TL;DR: Rats!, a parser generator for Java that supports easily extensible syntax, enables other grammar writers to realize real-world language extensions in little time and code, and generates parsers that consistently out-perform parsers created by two GLR parser generators.
Component-based LR parsing
TL;DR: Component-based LR (CLR) parsing is developed, which provides code-level compositionality for language development by producing a separate parser for each grammar component, and increases the comprehensibility, reusability, changeability and independent development ability of the language implementation.
14
Parsing of Hyperedge Replacement Grammars with Graph Parser Combinators
Steffen Mazanek,Mark Minas +1 more
TL;DR: This paper addresses the question how the process of writing correct parsers on top of the proposed graph parser combinators framework can be simplified by demonstrating the translation of hyperedge replacement grammars into graph parsers.
Component-based language implementation with object-oriented syntax and aspect-oriented semantics
Barrett R. Bryant,Xiaoqing Wu +1 more
- 01 Jan 2007
TL;DR: This thesis presents a new language implementation formalism and archetype that improves the modularity in compiler construction in a two-dimensional manner and increases the reusability, changeability, extensibility and independent development ability of both syntax and semantics specification with less development workload required from compiler designers.
References
•Book
Compilers: Principles, Techniques, and Tools
Alfred V. Aho,Ravi Sethi,Jeffrey D. Ullman +2 more
- 01 Jan 1986
TL;DR: This book discusses the design of a Code Generator, the role of the Lexical Analyzer, and other topics related to code generation and optimization.
9.7K
•Book
Introduction to Functional Programming using Haskell
Richard Bird
- 21 Apr 1998
TL;DR: In this article, the authors introduce the concepts of fundamental concepts, simple datatypes, simple numbers, and efficient trees for abstract datatype analysis, including Monads and Interaction.
455
Concurrent Clean
E. Nöcker,J.E.W. Smetsers,Marko van Eekelen,Marinus J. Plasmeijer +3 more
- 10 Jun 1991
TL;DR: The quality of the code generated by the Clean compiler has been greatly improved such that it is one of the best code generators for a lazy functional language.
111
Related Papers (5)
Jan Kurs,Jan Vraný,Mohammad Ghafari,Mircea Lungu,Oscar Nierstrasz +4 more
- 23 Aug 2016
Eric Beguet,Manohar Jonnalagedda +1 more
- 28 Jul 2014