Skip to content

Commit 5026c4e

Browse files
committed
added comments
1 parent 0c75461 commit 5026c4e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/main/java/com/igormaznitsa/prologparser/ParserContext.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,45 @@ public interface ParserContext {
6060
*/
6161
int FLAG_CURLY_BRACKETS = 16;
6262

63+
/**
64+
* Check that the context contains an operator starts with some string
65+
* @param source source prolog parser making request, must not be null
66+
* @param namePrefix string to be used to look for operator starts with it, must not be null
67+
* @return true if there is such operator, false otherwise
68+
*/
6369
boolean hasOpStartsWith(PrologParser source, String namePrefix);
6470

71+
/**
72+
* Find operators for their name.
73+
* @param source source prolog parser making request, must not be null
74+
* @param name name of operators, must not be null
75+
* @return operator container if such one is found, null otherwise
76+
*/
6577
OpContainer findOpForName(PrologParser source, String name);
6678

79+
/**
80+
* Find all operators registered in context.
81+
* @return map of operators to their names registered in the context, must not be null
82+
*/
6783
Map<String, OpContainer> findAllOperators();
6884

85+
/**
86+
* Get maximum allowed length value for internal parser text buffers.
87+
* @return maximum allowed text parser buffers length in chars
88+
*/
6989
default int getMaxTokenizerBufferLength() {
7090
return Integer.MAX_VALUE;
7191
}
7292

93+
/**
94+
* get parser flags for the parser context.
95+
* @return flags as bit field
96+
* @see ParserContext#FLAG_NONE
97+
* @see ParserContext#FLAG_VAR_AS_FUNCTOR
98+
* @see ParserContext#FLAG_BLOCK_COMMENTS
99+
* @see ParserContext#FLAG_CURLY_BRACKETS
100+
* @see ParserContext#FLAG_ZERO_QUOTATION_CHARCODE
101+
* @see ParserContext#FLAG_ZERO_STRUCT
102+
*/
73103
int getFlags();
74104
}

0 commit comments

Comments
 (0)