ISyntaxService

public interface ISyntaxService<I extends IInputUnit, P extends IParseUnit>

Interface for context-free syntactical services, including parsing and information about lexical characters.

Parameters:
  • <I> – Type of input units.
  • <P> – Type of parse units.

Methods

available

boolean available(ILanguageImpl langImpl)

Checks if syntactical services are available for given language implementation.

Parameters:
  • langImpl – Language implementation to check.
Returns:

True if syntactical services are available, false if not.

fenceCharacters

Iterable<FenceCharacters> fenceCharacters(ILanguageImpl langImpl)
Returns:Fence (brackets, parentheses, etc.) open and close characters for given language.

multiLineCommentCharacters

Iterable<MultiLineCommentCharacters> multiLineCommentCharacters(ILanguageImpl langImpl)
Returns:Multi line comment prefix and postfix characters for given language.

parse

P parse(I input, IProgress progress, ICancel cancel)

Parses given input unit into a parse unit.

Parameters:
  • input – Input unit to parse.
  • progress – Progress reporter.
  • cancel – Cancellation token.
Throws:
Returns:

Parse unit.

parse

P parse(I input)

Parses given input unit into a parse unit.

Parameters:
  • input – Input unit to parse.
Throws:
Returns:

Parse unit.

parseAll

Collection<P> parseAll(Iterable<I> inputs, IProgress progress, ICancel cancel)

Parses all given input units into a parse units.

Parameters:
  • inputs – Input units to parse.
  • progress – Progress reporter.
  • cancel – Cancellation token.
Throws:
Returns:

Parse units.

parseAll

Collection<P> parseAll(Iterable<I> inputs)

Parses all given input units into a parse units.

Parameters:
  • inputs – Input units to parse.
Throws:
Returns:

Parse units.

singleLineCommentPrefixes

Iterable<String> singleLineCommentPrefixes(ILanguageImpl langImpl)
Returns:Single line comment prefix characters for given language.