APIdia Launch Partner
Top Inners Fields Methods
jdk.internal.org.jline.reader

public Interface Parser

Known Direct Implementers
jdk.internal.org.jline.reader.impl.DefaultParser
Imports
java.util.regex.Matcher, .Pattern

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
public static final String
public static final String

Method Summary

Modifier and TypeMethod and Description
public default String
getCommand(final String line)

public default String
getVariable(final String line)

public default boolean
isEscapeChar(char ch)

public ParsedLine
parse(String line, int cursor, Parser.ParseContext context)

public default ParsedLine
parse(String line, int cursor)

public default boolean
public default boolean

Field Detail

REGEX_COMMANDback to summary
public static final String REGEX_COMMAND
REGEX_VARIABLEback to summary
public static final String REGEX_VARIABLE

Method Detail

getCommandback to summary
public default String getCommand(final String line)
getVariableback to summary
public default String getVariable(final String line)
isEscapeCharback to summary
public default boolean isEscapeChar(char ch)
parseback to summary
public ParsedLine parse(String line, int cursor, Parser.ParseContext context) throws SyntaxError
parseback to summary
public default ParsedLine parse(String line, int cursor) throws SyntaxError
validCommandNameback to summary
public default boolean validCommandName(String name)
validVariableNameback to summary
public default boolean validVariableName(String name)
jdk.internal.org.jline.reader back to summary

public final Enum Parser.ParseContext

extends Enum<Parser.ParseContext>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final Parser.ParseContext
ACCEPT_LINE

Try a real "final" parse.

public static final Parser.ParseContext
COMPLETE

Parse to find completions (typically after a Tab).

public static final Parser.ParseContext
SECONDARY_PROMPT

Called when we need to update the secondary prompts.

public static final Parser.ParseContext
SPLIT_LINE

Parsed words will have all characters present in input line including quotes and escape chars.

public static final Parser.ParseContext

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Parser.ParseContext
public static Parser.ParseContext[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ACCEPT_LINEback to summary
public static final Parser.ParseContext ACCEPT_LINE

Try a real "final" parse. May throw EOFError in which case we have incomplete input.

COMPLETEback to summary
public static final Parser.ParseContext COMPLETE

Parse to find completions (typically after a Tab). We should tolerate and ignore errors.

SECONDARY_PROMPTback to summary
public static final Parser.ParseContext SECONDARY_PROMPT

Called when we need to update the secondary prompts. Specifically, when we need the 'missing' field from EOFError, which is used by a "%M" in a prompt pattern.

SPLIT_LINEback to summary
public static final Parser.ParseContext SPLIT_LINE

Parsed words will have all characters present in input line including quotes and escape chars. We should tolerate and ignore errors.

UNSPECIFIEDback to summary
public static final Parser.ParseContext UNSPECIFIED

Constructor Detail

ParseContextback to summary
private ParseContext()

Method Detail

valueOfback to summary
public static Parser.ParseContext valueOf(String name)
valuesback to summary
public static Parser.ParseContext[] values()