プロジェクト
概要
Javaでパーサーを構築できます。
その他のプロジェクトできること
- Operator precedence grammar,
- Accurate error location and customizable error message,
- Rich set of pre-defined reusable combinator functions,
- Declarative API that resembles BNF.
計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルjparsec
Builds mini parsers in pure Java.
Latest version: 3.0 (requires Java 8+)
News
2025-10-23
- If you are on Java 21+, prefer using Google Mug Dot Parse — a re-imagined parser combinator library:
- The API uses static type to completely eliminate infinite loops or left recursions caused by zero-consumption parser — traditionally painful to debug in current jparsec or similar combinator or PEG libraries.
- It's substantially faster than jparsec, ANTLRv4 and is on par with the Scala macro-enhanced fastparse.
- Stack overflow protection for stable production environment.
- It supports lazy, streaming parsing through the
parseToStream()andprobe()methods. - Significantly lower boilerplate. For example to parse by tokens, just use
.parseSkipping(Character::isWhitespace, input). - Compact footprint.
- Modern Java (
Stream, pattern matching). - Offers a regex and a email address parser out-of-the-box.
2016-12-05
- Removed references to Codehaus in copyright and package layout
- Support for Java 8 now complete
- Support for OSGi is merged in master, thanks to Alex Michael Berry and this PR
How to Use?
jparsec is available in maven-central. Snapshot Javadoc
Maven
Add the following fragment to your <dependencies> section:
If using Java 7-:
<dependency>
<groupId>org.jparsec</groupId>
<artifactId>jparsec</artifactId>
<version>2.3</version>
</dependency>
If using Java 8+:
<dependency>
<groupId>org.jparsec</groupId>
<artifactId>jparsec</artifactId>
<version>3.1</version>
</dependency>
Tell me more
Jparsec is a recursive-descent parser combinator framework written for Java. It's an implementation of Haskell Parsec on the Java platform.
Feature highlights
- Operator precedence grammar,
- Accurate error location and customizable error message,
- Rich set of pre-defined reusable combinator functions,
- Declarative API that resembles BNF.
Documentation
Look at the wiki for documentation on implementing parsers with jparsec.
Talking about jparsec
- 2014-01-16 - Nantes JUG: Quickie on jparsec for local JUG
- 2013-09-23 - JUGSummerCamp 2013: Directory
parsing-made-easycontains material for the talk (slides + sample code)
関連プロジェクトを探す
読み込み中…