parboiled is an open-source
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
library released under an
Apache License
The Apache License is a permissive free software license written by the Apache Software Foundation (ASF). It allows users to use the software for any purpose, to distribute it, to modify it, and to distribute modified versions of the software ...
. It provides support for defining
PEG parsers directly in Java source code.
parboiled is commonly used as an alternative for
regular expressions
A regular expression (shortened as regex or regexp), sometimes referred to as rational expression, is a sequence of character (computing), characters that specifies a pattern matching, match pattern in string (computer science), text. Usually ...
or
parser generators (like
ANTLR or
JavaCC), especially for smaller and medium-size applications.
Apart from providing the constructs for grammar definition parboiled implements a complete
recursive descent parser with support for
abstract syntax tree
An abstract syntax tree (AST) is a data structure used in computer science to represent the structure of a program or code snippet. It is a tree representation of the abstract syntactic structure of text (often source code) written in a formal ...
construction, parse error reporting and parse error recovery.
References
External links
Official parboiled web siteExample of a complete Java 6 parser written with parboiled
XML software
Java (programming language) libraries
Free computer programming tools
Parser generators
{{compu-library-stub