Index

A B C E F G H I L M N O P R S T V 
All Classes and Interfaces|All Packages|Serialized Form

A

apply(char, FilePointer) - Method in interface net.diversionmc.parser.expression.PiecePredicate
Check whether a character should create a piece.
apply(char, FilePointer) - Method in interface net.diversionmc.parser.expression.PieceSupplier
Apply function to character at a position.
apply(L, R, List<ExpressionPiece>) - Method in interface net.diversionmc.parser.group.GroupSupplier
Create a group from the given pieces.
apply(T, T, O) - Method in interface net.diversionmc.parser.pattern.OperationSolver.TriOperator
Applies this function to the given arguments.
ASSERT(boolean, String) - Static method in exception class net.diversionmc.parser.util.ParserException
Make sure a condition is met, else throw an exception with a given message.
ASSERT(boolean, Supplier<FilePointer>, String) - Static method in exception class net.diversionmc.parser.util.ParserException
Make sure a condition is met, else throw an exception with a given message.
ASSERT(boolean, FilePointer, String) - Static method in exception class net.diversionmc.parser.util.ParserException
Make sure a condition is met, else throw an exception with a given message.

B

build() - Method in class net.diversionmc.parser.Parser
Convert input text into a list of usable sentences.
buildExpressions() - Method in class net.diversionmc.parser.Parser
Convert input text into a list of ExpressionPieces.
buildExpressionsGrouped() - Method in class net.diversionmc.parser.Parser
Convert input text into a list of ExpressionPieces, grouped up with registered groupers.

C

c - Variable in class net.diversionmc.parser.expression.CharPiece
 
CharPiece - Class in net.diversionmc.parser.expression
 
CharPiece(FilePointer, char) - Constructor for class net.diversionmc.parser.expression.CharPiece
 
check(char, String) - Static method in class net.diversionmc.parser.expression.NamePiece
Check whether a character can be read by a name piece with given special chars.
column() - Method in record class net.diversionmc.parser.util.FilePointer
Returns the value of the column record component.
CommentPiece - Class in net.diversionmc.parser.expression
Can be inline or multiline, reads until newline or ‘*/'.
CommentPiece(FilePointer, boolean, ExpressionPiece) - Constructor for class net.diversionmc.parser.expression.CommentPiece
Construct a comment piece.
content() - Method in class net.diversionmc.parser.expression.GroupPiece
Get all pieces that are inside the group.
content() - Method in class net.diversionmc.parser.expression.StringPiece
Get content of the string stored in this piece.
CONTINUE - Enum constant in enum class net.diversionmc.parser.expression.PieceResult
Ask for another character to consume.

E

end() - Method in record class net.diversionmc.parser.group.Grouper
Returns the value of the end record component.
end() - Method in class net.diversionmc.parser.Parser
Get file pointer pointing to the end of the file (line += 1, column = 1).
end(ExpressionPiece) - Method in record class net.diversionmc.parser.group.Grouper
Check if a piece matches the ending boundary of the group.
equals(Object) - Method in record class net.diversionmc.parser.group.Grouper
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class net.diversionmc.parser.pattern.OperationSolver
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class net.diversionmc.parser.pattern.PatternResult
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class net.diversionmc.parser.util.FilePointer
Indicates whether some other object is "equal to" this one.
escape(char) - Static method in class net.diversionmc.parser.expression.StringPiece
Escape a character (replace by an associated code with escape prefix, for example '\n' -> "\\n").
escape(CharSequence) - Static method in class net.diversionmc.parser.expression.StringPiece
Escape characters in the string.
ExpressionPiece - Class in net.diversionmc.parser.expression
Expression Pieces are the units of the text format.
ExpressionPiece(FilePointer) - Constructor for class net.diversionmc.parser.expression.ExpressionPiece
Construct a piece at a position.

F

fileName() - Method in record class net.diversionmc.parser.util.FilePointer
Returns the value of the fileName record component.
FilePointer - Record Class in net.diversionmc.parser.util
An auxiliary structure of a line/column pair in a file.
FilePointer(String, int, int) - Constructor for record class net.diversionmc.parser.util.FilePointer
Create a file pointer.

G

group(Predicate<ExpressionPiece>, Predicate<ExpressionPiece>, GroupSupplier<L, R>) - Method in class net.diversionmc.parser.Parser
Create a grouper for specific pieces.
group(List<ExpressionPiece>) - Method in class net.diversionmc.parser.Parser
Group up ExpressionPieces in the given list into ExpressionPieces which represent such groups.
group(ExpressionPiece, ExpressionPiece, List<ExpressionPiece>) - Method in record class net.diversionmc.parser.group.Grouper
Create a group from the given pieces.
Grouper<L extends ExpressionPiece,R extends ExpressionPiece> - Record Class in net.diversionmc.parser.group
When all characters are converted successfully into Expression Pieces, some of the pieces are allowed to be converted again using a second pass.
Grouper(Predicate<ExpressionPiece>, Predicate<ExpressionPiece>, GroupSupplier<L, R>) - Constructor for record class net.diversionmc.parser.group.Grouper
Construct a grouper for specific pieces.
GroupPiece - Class in net.diversionmc.parser.expression
List of pieces (called group content).
GroupPiece(FilePointer, List<ExpressionPiece>) - Constructor for class net.diversionmc.parser.expression.GroupPiece
Construct a group piece.
GroupSupplier<L extends ExpressionPiece,R extends ExpressionPiece> - Interface in net.diversionmc.parser.group
Function that creates a group from the given boundaries.

H

hashCode() - Method in record class net.diversionmc.parser.group.Grouper
Returns a hash code value for this object.
hashCode() - Method in record class net.diversionmc.parser.pattern.OperationSolver
Returns a hash code value for this object.
hashCode() - Method in record class net.diversionmc.parser.pattern.PatternResult
Returns a hash code value for this object.
hashCode() - Method in record class net.diversionmc.parser.util.FilePointer
Returns a hash code value for this object.

I

isStatement() - Method in record class net.diversionmc.parser.pattern.PatternResult
Check if resulting sentence is a statement.
isStatement() - Method in class net.diversionmc.parser.pattern.Sentence
Useful built-in operation to check whether a given sentence represents an action that does not return value.

L

LEAVE - Enum constant in enum class net.diversionmc.parser.expression.PieceResult
Stop reading and leave the supplied character.
length() - Method in record class net.diversionmc.parser.pattern.PatternResult
Returns the value of the length record component.
line() - Method in record class net.diversionmc.parser.util.FilePointer
Returns the value of the line record component.

M

match(List<ExpressionPiece>, ParsePattern<T>...) - Static method in interface net.diversionmc.parser.pattern.ParsePattern
Match all the given patterns or fail.
matchOne(List<ExpressionPiece>, ParsePattern<T>...) - Static method in interface net.diversionmc.parser.pattern.ParsePattern
Try to match at least one pattern from the given patterns.

N

name() - Method in class net.diversionmc.parser.expression.NamePiece
Get parsed value of the name piece.
name() - Method in class net.diversionmc.parser.Parser
Get title used on creation of this parser.
NamePiece - Class in net.diversionmc.parser.expression
Reads letters, digits, and some predefined characters.
NamePiece(FilePointer, String) - Constructor for class net.diversionmc.parser.expression.NamePiece
Construct a name piece at a position.
net.diversionmc.parser - package net.diversionmc.parser
 
net.diversionmc.parser.expression - package net.diversionmc.parser.expression
 
net.diversionmc.parser.group - package net.diversionmc.parser.group
 
net.diversionmc.parser.pattern - package net.diversionmc.parser.pattern
 
net.diversionmc.parser.util - package net.diversionmc.parser.util
 
number() - Method in class net.diversionmc.parser.expression.NumberPiece
Get parsed number value.
NumberPiece - Class in net.diversionmc.parser.expression
Reads until it is no longer able to parse a number.
NumberPiece(FilePointer) - Constructor for class net.diversionmc.parser.expression.NumberPiece
Construct a number piece at a position.

O

opCheck() - Method in record class net.diversionmc.parser.pattern.OperationSolver
Returns the value of the opCheck record component.
OperationSolver<V extends Pointable,O extends Pointable> - Record Class in net.diversionmc.parser.pattern
When confronted with a pattern of kind <value>[<operator><value>]..., you do not need to completely rewrite a custom pattern, as Parser comes with a tool specifically made for that.
OperationSolver(boolean, Predicate<O>, OperationSolver.TriOperator<V, O>) - Constructor for record class net.diversionmc.parser.pattern.OperationSolver
Creates an instance of a OperationSolver record class.
OperationSolver.TriOperator<T,O> - Interface in net.diversionmc.parser.pattern
Operation between two values and an operator.
operator() - Method in record class net.diversionmc.parser.pattern.OperationSolver
Returns the value of the operator record component.

P

parse(List<ExpressionPiece>) - Method in interface net.diversionmc.parser.pattern.ParsePattern
Apply this pattern piece conversion from a given piece list.
ParsePattern<T extends Sentence> - Interface in net.diversionmc.parser.pattern
Pattern is a function which consumes Expression Pieces and converts them into a Sentence list.
parser() - Static method in class net.diversionmc.parser.Parser
Create Parser without any input attached and automatically set name.
parser(File) - Static method in class net.diversionmc.parser.Parser
Create Parser from a file.
parser(String) - Static method in class net.diversionmc.parser.Parser
Create Parser of a text with a title.
parser(String, InputStream) - Static method in class net.diversionmc.parser.Parser
Create Parser from an input stream with a title.
parser(String, String) - Static method in class net.diversionmc.parser.Parser
Create Parser of a text with a title.
Parser<T extends Sentence> - Class in net.diversionmc.parser
Parser - convert any written language into custom format
Parser() - Constructor for class net.diversionmc.parser.Parser
Create Parser without any input attached and automatically set name.
Parser(File) - Constructor for class net.diversionmc.parser.Parser
Create Parser from a file.
Parser(String) - Constructor for class net.diversionmc.parser.Parser
Create Parser with a title.
Parser(String, InputStream) - Constructor for class net.diversionmc.parser.Parser
Create Parser from an input stream with a title.
Parser(String, String) - Constructor for class net.diversionmc.parser.Parser
Create Parser of a text with a title.
ParserException - Exception Class in net.diversionmc.parser.util
Whenever any issue in Parser occurs.
ParserException(String) - Constructor for exception class net.diversionmc.parser.util.ParserException
Construct a Parser Exception without a file pointer.
ParserException(String, FilePointer) - Constructor for exception class net.diversionmc.parser.util.ParserException
Construct a Parser Exception with a file pointer.
pattern(String) - Method in class net.diversionmc.parser.Parser
Get a pattern that was already added to this parser.
pattern(String, ParsePattern<T>) - Method in class net.diversionmc.parser.Parser
Add a piece to sentence converter.
PatternResult<T extends Sentence> - Record Class in net.diversionmc.parser.pattern
Represents a result of a sentence parse.
PatternResult(int, T) - Constructor for record class net.diversionmc.parser.pattern.PatternResult
Creates an instance of a PatternResult record class.
patterns() - Method in class net.diversionmc.parser.Parser
Get all patterns that were added to this parser.
piece(PiecePredicate, PieceSupplier) - Method in class net.diversionmc.parser.Parser
Add a parse piece.
piece(PieceSupplier) - Method in class net.diversionmc.parser.Parser
Add a parse piece that is always accepted.
pieceFinish(Consumer<ExpressionPiece>) - Method in class net.diversionmc.parser.Parser
Add an action to run after a piece is completed.
PiecePredicate - Interface in net.diversionmc.parser.expression
Function that checks whether a piece is supposed to be created by a given character.
PieceResult - Enum Class in net.diversionmc.parser.expression
Piece result shows whether a piece should stop consuming characters or continue.
PieceSupplier - Interface in net.diversionmc.parser.expression
Function that converts a character into a matching piece.
Pointable - Class in net.diversionmc.parser.util
An object that has a file pointer associated with it.
Pointable(FilePointer) - Constructor for class net.diversionmc.parser.util.Pointable
Create a Pointable from a given file position.
pointer() - Method in class net.diversionmc.parser.util.Pointable
Position in a file where this object was created.
pre(Runnable) - Method in class net.diversionmc.parser.Parser
Set the first action to perform on Parser.build() before starting to parse text.

R

read(char, FilePointer) - Method in class net.diversionmc.parser.expression.CharPiece
 
read(char, FilePointer) - Method in class net.diversionmc.parser.expression.CommentPiece
 
read(char, FilePointer) - Method in class net.diversionmc.parser.expression.ExpressionPiece
Parse a character by this piece.
read(char, FilePointer) - Method in class net.diversionmc.parser.expression.GroupPiece
 
read(char, FilePointer) - Method in class net.diversionmc.parser.expression.NamePiece
 
read(char, FilePointer) - Method in class net.diversionmc.parser.expression.NumberPiece
 
read(char, FilePointer) - Method in class net.diversionmc.parser.expression.StringPiece
 
readFrom(File) - Method in class net.diversionmc.parser.Parser
Set text to parse from a file, as well as text title.
readFrom(InputStream) - Method in class net.diversionmc.parser.Parser
Set text to parse from a stream.
replace(FilePointer) - Method in class net.diversionmc.parser.expression.CommentPiece
 
replace(FilePointer) - Method in class net.diversionmc.parser.expression.ExpressionPiece
REPLACE_LEAVE - Enum constant in enum class net.diversionmc.parser.expression.PieceResult
Stop reading and leave the supplied character, call ExpressionPiece.replace(FilePointer) and proceed to read that character in the new piece.
REPLACE_TAKE - Enum constant in enum class net.diversionmc.parser.expression.PieceResult
Stop reading and consume the supplied character, call ExpressionPiece.replace(FilePointer) and proceed to read next characters in the new piece.
result() - Method in record class net.diversionmc.parser.pattern.PatternResult
Returns the value of the result record component.
rightToLeft() - Method in record class net.diversionmc.parser.pattern.OperationSolver
Returns the value of the rightToLeft record component.

S

Sentence - Class in net.diversionmc.parser.pattern
Sentence is a real data structure,which can be directly used by an application and no longer belong to the parser (but Sentence knows where in the file it was defined).
Sentence(FilePointer) - Constructor for class net.diversionmc.parser.pattern.Sentence
Construct a sentence at a position.
solve(List<Pointable>) - Method in record class net.diversionmc.parser.pattern.OperationSolver
 
start() - Method in record class net.diversionmc.parser.group.Grouper
Returns the value of the start record component.
start(ExpressionPiece) - Method in record class net.diversionmc.parser.group.Grouper
Check if a piece matches the starting boundary of the group.
StringPiece - Class in net.diversionmc.parser.expression
Reads a string with escape sequences until it meets an end character (typically double or single quote).
StringPiece(FilePointer, char) - Constructor for class net.diversionmc.parser.expression.StringPiece
Construct a String Piece.
supplier() - Method in record class net.diversionmc.parser.group.Grouper
Returns the value of the supplier record component.

T

TAKE - Enum constant in enum class net.diversionmc.parser.expression.PieceResult
Stop reading and consume the supplied character.
text() - Method in class net.diversionmc.parser.Parser
Get text that was inputted into this Parser.
text(String) - Method in class net.diversionmc.parser.Parser
Set text to parse.
toString() - Method in class net.diversionmc.parser.expression.CharPiece
 
toString() - Method in class net.diversionmc.parser.expression.GroupPiece
 
toString() - Method in class net.diversionmc.parser.expression.NamePiece
Get parsed value of the name piece.
toString() - Method in class net.diversionmc.parser.expression.StringPiece
Content wrapped with start and end characters.
toString() - Method in record class net.diversionmc.parser.group.Grouper
Returns a string representation of this record class.
toString() - Method in record class net.diversionmc.parser.pattern.OperationSolver
Returns a string representation of this record class.
toString() - Method in record class net.diversionmc.parser.pattern.PatternResult
Returns a string representation of this record class.
toString() - Method in record class net.diversionmc.parser.util.FilePointer
Display file pointer to a fileName line:column format.
tryBoolean(String) - Static method in class net.diversionmc.parser.expression.NumberPiece
Try to parse string as a number and compare to 0 or compare it to string of value "true".
tryNumber(String) - Static method in class net.diversionmc.parser.expression.NumberPiece
Try to decode a double-type number.

V

valueOf(String) - Static method in enum class net.diversionmc.parser.expression.PieceResult
Returns the enum constant of this class with the specified name.
values() - Static method in enum class net.diversionmc.parser.expression.PieceResult
Returns an array containing the constants of this enum class, in the order they are declared.
A B C E F G H I L M N O P R S T V 
All Classes and Interfaces|All Packages|Serialized Form