Class PrologParser
java.lang.Object
com.igormaznitsa.prologparser.PrologParser
- All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<PrologTerm>
- Direct Known Subclasses:
GenericPrologParser
Abstract base Prolog parser.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprotected final ParserContextstatic final PrologTerm[]protected static final Koi7CharOpMapprivate static final OpContainerprivate static final OpContainerprivate static final OpContainerprivate static final OpContainerprivate static final OpContainerprivate static final OpContainerprivate static final OpContainerprivate static final OpContainerprivate static final Koi7CharOpMapprivate static final Koi7CharOpMapprivate static final Koi7CharOpMapprivate static final Koi7CharOpMapprivate static final Koi7CharOpMapprivate static final Koi7CharOpMapprotected final intprivate final Tokenizer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckForNull(Object obj, String message, TokenizerResult startTerm) voidclose()static OpfindBaseMetaOperator(String text, OpAssoc type) static Koi7CharOpMapprivate static intgetOnlyCharCode(String text) booleanhasNext()private booleanisEndOperator(PrologTerm operator, Koi7CharOpMap endOperators) iterator()next()private PrologTermreadBlock(Koi7CharOpMap endOperators) private PrologTermreadList(TokenizerResult openingBracket) private PrologStructreadStruct(PrologTerm functor) stream()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
EMPTY_TERM_ARRAY
-
META_OP_MAP
-
OPERATOR_COMMA
-
OPERATOR_LEFTBRACKET
-
OPERATOR_LEFTCURLYBRACKET
-
OPERATOR_RIGHTBRACKET
-
OPERATOR_RIGHTCURLYBRACKET
-
OPERATOR_RIGHTSQUAREBRACKET
-
OPERATOR_DOT
-
OPERATOR_VERTICALBAR
-
OPERATORS_PHRASE
-
OPERATORS_INSIDE_LIST
-
OPERATORS_END_LIST
-
OPERATORS_INSIDE_STRUCT
-
OPERATORS_SUBBLOCK
-
OPERATORS_SUBBLOCK_CURLY
-
autoCloseReaderFlag
private volatile boolean autoCloseReaderFlag -
context
-
parserFlags
protected final int parserFlags -
tokenizer
-
-
Constructor Details
-
PrologParser
-
-
Method Details
-
autoCloseReader
-
findBaseMetaOperator
-
getOnlyCharCode
-
findMetaOps
-
getInternalTokenizer
-
isEndOperator
-
getContext
-
hasNext
public boolean hasNext() -
next
-
readStruct
-
readList
-
checkForNull
-
readBlock
-
iterator
- Specified by:
iteratorin interfaceIterable<PrologTerm>
-
stream
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-