Package | Description |
---|---|
jfun.parsec |
Provides classes and interfaces for parser combinator logic and basic parsers.
|
Modifier and Type | Interface and Description |
---|---|
interface |
Binary<T>
This interface represents a binary operation on the same type.
|
Modifier and Type | Method and Description |
---|---|
static <A,B> Map2<A,B,Pair<A,B>> |
Maps.id2()
Create a Map2 object that stores the two objects into a Pair object.
|
Modifier and Type | Method and Description |
---|---|
<T,R> Parser<R> |
Parser.and(Parser<T> p,
Map2<? super Type,? super T,R> m)
it sequentially run this and p, and then transforms the two return values with m to a new return value.
|
<T,R> Parser<R> |
Parser.and(java.lang.String name,
Parser<T> p,
Map2<? super Type,? super T,R> m)
it sequentially run this and p, and then transforms the two return values with m to a new return value.
|
static <A,B,R> Parser<R> |
Parsers.map2(Parser<A> p1,
Parser<B> p2,
Map2<? super A,? super B,R> m2)
Run 2 Parsers sequentially and transform the return values to a new value.
|
static <A,B,R> Parser<R> |
Parsers.map2(java.lang.String name,
Parser<A> p1,
Parser<B> p2,
Map2<? super A,? super B,R> m2)
Run 2 Parsers sequentially and transform the return values to a new value.
|
Modifier and Type | Method and Description |
---|---|
OperatorTable<E> |
OperatorTable.infixl(Parser<? extends Map2<? super E,? super E,? extends E>> p,
int precedence)
Adds a infix left-associative binary operator.
|
static <T> Parser<T> |
Parsers.infixl(Parser<? extends Map2<? super T,? super T,T>> op,
Parser<? extends T> p)
Left associative infix operator.
|
static <T> Parser<T> |
Parsers.infixl(java.lang.String name,
Parser<? extends Map2<? super T,? super T,T>> op,
Parser<? extends T> p)
Left associative infix operator.
|
OperatorTable<E> |
OperatorTable.infixn(Parser<? extends Map2<? super E,? super E,? extends E>> p,
int precedence)
Adds a infix non-associative binary operator.
|
static <T> Parser<T> |
Parsers.infixn(Parser<? extends Map2<? super T,? super T,T>> op,
Parser<? extends T> operand)
Non-associative infix operator.
|
static <T> Parser<T> |
Parsers.infixn(java.lang.String name,
Parser<? extends Map2<? super T,? super T,T>> op,
Parser<? extends T> operand)
Non-associative infix operator.
|
OperatorTable<E> |
OperatorTable.infixr(Parser<? extends Map2<? super E,? super E,? extends E>> p,
int precedence)
Adds a infix right-associative binary operator.
|
static <T> Parser<T> |
Parsers.infixr(Parser<? extends Map2<? super T,? super T,T>> op,
Parser<? extends T> p)
Right associative infix operator.
|
static <T> Parser<T> |
Parsers.infixr(java.lang.String name,
Parser<? extends Map2<? super T,? super T,T>> op,
Parser<? extends T> p)
Right associative infix operator.
|