Options
All
  • Public
  • Public/Protected
  • All
Menu

A 100% spec. compliant EPUB CFI parser that also performs validation and error reporting. The parser is forgiving, trying to build a valid AST (Abstract Syntax Tree) from an EPUB CFI string, recovering from many types of errors.

The string is first processed by EpubCfiLexer which delivers a stream of tokens which is then consumed by this parser.

Usage: let epubCfiAst = EpubCfiParser.parse("epubcfi(/6/4[chap01ref]!/4[body01]/10[para05]/1:3[xx,y])");

Hierarchy

  • IEpubCfiParser

Implemented by

Index

Methods

Methods

parse

  • The "entry point" for starting parsing an epubcfi from the lexer. Expects the lexer to start with an 'epucfi(' token followed by a non-empty main path. The main path can optionally be followed by a rangeStart and a rangeEnd path.

    Returns IEpubCfiRootNode

Generated using TypeDoc