@faubulous/mentor-rdf-parsers
    Preparing search index...

    Interface IParser

    A common interface for all syntax parsers in the Mentor RDF Parsers library.

    interface IParser {
        errors: IRecognitionException[];
        input: IToken[];
        parse(inputTokens: IToken[], throwOnErrors?: boolean): CstNode;
        semanticErrors: IRecognitionException[];
    }

    Implemented by

    Index

    Properties

    Methods

    Properties

    An array of recognition exceptions that occurred during parsing. This can be used to identify and handle any syntax errors in the input document.

    input: IToken[]

    An array of tokens that were created by the lexer and used as input for the parser. This can be used to inspect the tokens that were processed during parsing, and to identify any issues with the tokenization process.

    semanticErrors: IRecognitionException[]

    An array of recognition exceptions that occurred during semantic analysis. This can be used to identify and handle any semantic errors in the input document, such as undefined prefixes or invalid IRIs.

    Methods

    • Parses a set of tokens created by the lexer into a concrete syntax tree (CST) representing the parsed document.

      Parameters

      • inputTokens: IToken[]
      • OptionalthrowOnErrors: boolean

        Whether to throw an error if any parsing errors are detected. Defaults to true.

      Returns CstNode

      A concrete syntax tree (CST) object.