Package | Description |
---|---|
jfun.parsec |
Provides classes and interfaces for parser combinator logic and basic parsers.
|
Modifier and Type | Interface and Description |
---|---|
interface |
Unary<T>
This interface represents a unary operation on the same type.
|
Modifier and Type | Method and Description |
---|---|
static <x,V> Map<x,V> |
Maps.cnst(V v)
Creates a map that maps any object to the same object.
|
static <From,To> Map<From,To> |
Maps.jmap(java.util.Map<From,To> m)
Adapts a java.util.Map to jfun.util.Map.
|
static <T> Map<Tok,T> |
Maps.toToken()
Transform a Tok object to the wrapped token object.
|
Modifier and Type | Method and Description |
---|---|
<R> Parser<R> |
Parser.map(Map<? super Type,R> m)
if this succeeds, the returned value is transformed with m to a new return value.
|
<R> Parser<R> |
Parser.map(java.lang.String name,
Map<? super Type,R> m)
if this succeeds, the returned value is transformed with m to a new return value.
|
static <R,From> Parser<R> |
Parsers.map(java.lang.String name,
Parser<From> p,
Map<? super From,R> m)
Transform the return value of Parser p to a different value.
|
static <State> Parser<State> |
Parsers.transformState(Map<State,?> m)
Deprecated.
as of version 0.6
|
static <State> Parser<State> |
Parsers.transformState(java.lang.String name,
Map<State,?> m)
Deprecated.
as of version 0.6
|
Modifier and Type | Method and Description |
---|---|
OperatorTable<E> |
OperatorTable.postfix(Parser<? extends Map<? super E,? extends E>> p,
int precedence)
Adds a postfix unary operator.
|
static <T> Parser<T> |
Parsers.postfix(Parser<? extends Map<? super T,T>> op,
Parser<? extends T> p)
Runs Parser p and then run Parser op for 0 or more times greedily.
|
static <T> Parser<T> |
Parsers.postfix(java.lang.String name,
Parser<? extends Map<? super T,T>> op,
Parser<? extends T> p)
Runs Parser p and then run Parser op for 0 or more times greedily.
|
OperatorTable<E> |
OperatorTable.prefix(Parser<? extends Map<? super E,? extends E>> p,
int precedence)
Adds a prefix unary operator.
|
static <T> Parser<T> |
Parsers.prefix(Parser<? extends Map<? super T,T>> op,
Parser<? extends T> p)
Runs Parser op for 0 or more times greedily.
|
static <T> Parser<T> |
Parsers.prefix(java.lang.String name,
Parser<? extends Map<? super T,T>> op,
Parser<? extends T> p)
Runs Parser op for 0 or more times greedily.
|