Interface ParserContext

    • Field Detail

      • FLAG_NONE

        static final int FLAG_NONE
        Empty flags, no any flag defined.
        See Also:
        Constant Field Values
      • FLAG_BLOCK_COMMENTS

        static final int FLAG_BLOCK_COMMENTS
        Flag allows block comments.
        See Also:
        Constant Field Values
      • FLAG_ZERO_QUOTATION_CHARCODE

        static final int FLAG_ZERO_QUOTATION_CHARCODE
        Flag allows construction 0'{char} to get char code. Example: 0'a, 0'\r
        See Also:
        Constant Field Values
      • FLAG_VAR_AS_FUNCTOR

        static final int FLAG_VAR_AS_FUNCTOR
        Flag allows variable as structure functor. Example: Var(a,b,c).
        See Also:
        Constant Field Values
      • FLAG_ZERO_STRUCT

        static final int FLAG_ZERO_STRUCT
        Flag allows zero-arity structures. Example: a().
        See Also:
        Constant Field Values
      • FLAG_CURLY_BRACKETS

        static final int FLAG_CURLY_BRACKETS
        Flag allows blocks bounded by curly brackets. Example: {a,{b,!,c}}
        See Also:
        Constant Field Values
      • FLAG_DOT2_AS_LIST

        static final int FLAG_DOT2_AS_LIST
        Recognize '.'(_,_) as a list term.
        See Also:
        Constant Field Values
      • FLAG_ZERO_QUOTATION_ALLOWS_WHITESPACE_CHAR

        static final int FLAG_ZERO_QUOTATION_ALLOWS_WHITESPACE_CHAR
        White-space char is allowed in zero quotation mode.
        Since:
        2.0.2
        See Also:
        Constant Field Values
    • Method Detail

      • hasOpStartsWith

        boolean hasOpStartsWith​(PrologParser source,
                                java.lang.String namePrefix)
        Check that the context contains an operator starts with some string
        Parameters:
        source - source prolog parser making request, must not be null
        namePrefix - string to be used to look for operator starts with it, must not be null
        Returns:
        true if there is such operator, false otherwise
      • findOpForName

        OpContainer findOpForName​(PrologParser source,
                                  java.lang.String name)
        Find operators for their name.
        Parameters:
        source - source prolog parser making request, must not be null
        name - name of operators, must not be null
        Returns:
        operator container if such one is found, null otherwise
      • getMaxTokenizerBufferLength

        default int getMaxTokenizerBufferLength()
        Get maximum allowed length value for internal parser text buffers.
        Returns:
        maximum allowed text parser buffers length in chars