| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private boolean | |
| private final boolean | |
| private final List | |
| private final List | |
| private final ClassifyingBlockTracker | |
| private int | column
current column of input line (tab causes column to go to next 4-space tab stop) (0-based) |
| private boolean | columnIsInTab
if the current column is within a tab character (partially consumed tab) |
| private static final HashMap | |
| private static final HashMap | |
| private ParserPhase | |
| private final DocumentBlockParser | |
| private int | |
| private int | index
current index (offset) in input line (0-based) |
| public static final InlineParserFactory | |
| private final InlineParser | |
| private boolean | |
| private final Map | |
| private BasedSequence | |
| private int | lineEndIndex
current end of line offset in the input including EOL |
| private int | lineEOLIndex
current lines EOL sequence |
| private int | lineNumber
current line number in the input |
| private final List | |
| private int | lineStart
current start of line offset in the input |
| private BasedSequence | |
| private final Parsing | |
| private int | |
| private int | |
| private final DataHolder | |
| private final List | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | DocumentParser(DataHolder options, List<CustomBlockParserFactory> customBlockParserFactories, List<List<ParagraphPreProcessorFactory>> paragraphPreProcessorDependencies, List<List<BlockPreProcessorFactory>> blockPreProcessorDependencies, InlineParser inlineParser)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private < block parser type T extends BlockParser> T | Returns: block parser instance added as a child.new block parser to add as a child blockParser)Add block parser of type T as a child of the currently active parsers. |
| private void | |
| private void | |
| public void | |
| public void | |
| public void | |
| public void | blockParserAdded(BlockParser blockParser)
Implements com.
|
| public void | blockParserRemoved(BlockParser blockParser)
Implements com.
|
| public void | |
| public void | |
| public void | |
| private void | breakOutOfLists(List<BlockParser>
list of block parsers to break out on double blank line blockParsers)Break out of all containing lists, resetting the tip of the document to the parent of the highest list, and finalizing all the lists. |
| public static List | calculateBlockParserFactories(DataHolder options, List<CustomBlockParserFactory> customBlockParserFactories)
|
| public static List | |
| public static List | calculateParagraphPreProcessors(DataHolder options, List<ParagraphPreProcessorFactory> blockPreProcessors, InlineParserFactory inlineParserFactory)
|
| private void | |
| public boolean | endsWithBlankLine(Node
block to be tested block)Implements com. Test the block to see if it ends in a blank line. |
| private void | |
| private Document | |
| private boolean | |
| private BlockStartImpl | |
| private void | |
| public BlockParser | |
| public BlockParser | getActiveBlockParser(Block
block node for which to get the active block parser node)Implements com.
|
| public List | |
| public int | getColumn()
Implements com. The column is the position within the line after tab characters have been processed as 4-space tab stops. |
| public int | |
| public int | |
| public InlineParser | |
| public BasedSequence | |
| public int | |
| public int | |
| public int | |
| public List | getLineSegments()
Implements com. Returns a list of document lines encountered this far in the parsing process |
| public int | |
| public BasedSequence | |
| public int | |
| public ParserPhase | getParserPhase()
Implements com. Get the current parser phase |
| public Parsing | |
| public MutableDataHolder | |
| private void | incorporateLine(BasedSequence
sequence of the current line ln)Analyze a line of text and update the document appropriately. |
| public boolean | |
| public boolean | |
| public boolean | isLastLineBlank(Node
block instance to test node)Implements com. Test a block to see if the last line of the block is blank. |
| public Document | Returns: Document node of the resulting ASTsource sequence to parse source)The main parsing function. |
| public Document | |
| private void | |
| private void | preProcessParagraph(Paragraph
paragraph block to pre-process block, List<ParagraphPreProcessorFactory> paragraph pre-processor dependency stage stage, DocumentParser.paragraph pre-processor cache processorMappre-process a paragraph block |
| private void | |
| private void | processInlines()
Walk through a block & children recursively, parsing string content into inline content where appropriate. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void |
| activeBlockParsers | back to summary |
|---|---|
| private final List<BlockParser> activeBlockParsers | |
| blank | back to summary |
|---|---|
| private boolean blank | |
| blankLinesInAst | back to summary |
|---|---|
| private final boolean blankLinesInAst | |
| blockParserFactories | back to summary |
|---|---|
| private final List<BlockParserFactory> blockParserFactories | |
| blockPreProcessorDependencies | back to summary |
|---|---|
| private final List<List<BlockPreProcessorFactory>> blockPreProcessorDependencies | |
| blockTracker | back to summary |
|---|---|
| private final ClassifyingBlockTracker blockTracker | |
| column | back to summary |
|---|---|
| private int column current column of input line (tab causes column to go to next 4-space tab stop) (0-based) | |
| columnIsInTab | back to summary |
|---|---|
| private boolean columnIsInTab if the current column is within a tab character (partially consumed tab) | |
| CORE_FACTORIES_DATA_KEYS | back to summary |
|---|---|
| private static final HashMap<CustomBlockParserFactory, DataKey<Boolean>> CORE_FACTORIES_DATA_KEYS | |
| CORE_PARAGRAPH_PRE_PROCESSORS | back to summary |
|---|---|
| private static final HashMap<DataKey<Boolean>, ParagraphPreProcessorFactory> CORE_PARAGRAPH_PRE_PROCESSORS | |
| currentPhase | back to summary |
|---|---|
| private ParserPhase currentPhase | |
| documentBlockParser | back to summary |
|---|---|
| private final DocumentBlockParser documentBlockParser | |
| indent | back to summary |
|---|---|
| private int indent | |
| index | back to summary |
|---|---|
| private int index current index (offset) in input line (0-based) | |
| INLINE_PARSER_FACTORY | back to summary |
|---|---|
| public static final InlineParserFactory INLINE_PARSER_FACTORY | |
| inlineParser | back to summary |
|---|---|
| private final InlineParser inlineParser | |
| isBlankLine | back to summary |
|---|---|
| private boolean isBlankLine | |
| lastLineBlank | back to summary |
|---|---|
| private final Map<Node, Boolean> lastLineBlank | |
| line | back to summary |
|---|---|
| private BasedSequence line | |
| lineEndIndex | back to summary |
|---|---|
| private int lineEndIndex current end of line offset in the input including EOL | |
| lineEOLIndex | back to summary |
|---|---|
| private int lineEOLIndex current lines EOL sequence | |
| lineNumber | back to summary |
|---|---|
| private int lineNumber current line number in the input | |
| lineSegments | back to summary |
|---|---|
| private final List<BasedSequence> lineSegments | |
| lineStart | back to summary |
|---|---|
| private int lineStart current start of line offset in the input | |
| lineWithEOL | back to summary |
|---|---|
| private BasedSequence lineWithEOL | |
| myParsing | back to summary |
|---|---|
| private final Parsing myParsing | |
| nextNonSpace | back to summary |
|---|---|
| private int nextNonSpace | |
| nextNonSpaceColumn | back to summary |
|---|---|
| private int nextNonSpaceColumn | |
| options | back to summary |
|---|---|
| private final DataHolder options | |
| paragraphPreProcessorDependencies | back to summary |
|---|---|
| private final List<List<ParagraphPreProcessorFactory>> paragraphPreProcessorDependencies | |
| trackDocumentLines | back to summary |
|---|---|
| private final boolean trackDocumentLines | |
| DocumentParser | back to summary |
|---|---|
| public DocumentParser(DataHolder options, List<CustomBlockParserFactory> customBlockParserFactories, List<List<ParagraphPreProcessorFactory>> paragraphPreProcessorDependencies, List<List<BlockPreProcessorFactory>> blockPreProcessorDependencies, InlineParser inlineParser) | |
| activateBlockParser | back to summary |
|---|---|
| private void activateBlockParser(BlockParser blockParser) | |
| addChild | back to summary |
|---|---|
| private <T extends BlockParser> T addChild(T blockParser) Add block parser of type T as a child of the currently active parsers. If the tip can't accept children, close and finalize it and try its parent, and so on til we find a block that can accept children.
| |
| addLine | back to summary |
|---|---|
| private void addLine() Add line content to the active block parser. We assume it can accept lines -- that check should be done before calling this. | |
| advance | back to summary |
|---|---|
| private void advance() | |
| blockAdded | back to summary |
|---|---|
| public void blockAdded(@NotNull Block node) | |
| blockAddedWithChildren | back to summary |
|---|---|
| public void blockAddedWithChildren(@NotNull Block node) | |
| blockAddedWithDescendants | back to summary |
|---|---|
| public void blockAddedWithDescendants(@NotNull Block node) | |
| blockParserAdded | back to summary |
|---|---|
| public void blockParserAdded(BlockParser blockParser) Implements com. | |
| blockParserRemoved | back to summary |
|---|---|
| public void blockParserRemoved(BlockParser blockParser) Implements com. | |
| blockRemoved | back to summary |
|---|---|
| public void blockRemoved(@NotNull Block node) | |
| blockRemovedWithChildren | back to summary |
|---|---|
| public void blockRemovedWithChildren(@NotNull Block node) | |
| blockRemovedWithDescendants | back to summary |
|---|---|
| public void blockRemovedWithDescendants(@NotNull Block node) | |
| breakOutOfLists | back to summary |
|---|---|
| private void breakOutOfLists(List<BlockParser> blockParsers) Break out of all containing lists, resetting the tip of the document to the parent of the highest list, and finalizing all the lists. (This is used to implement the "two blank lines break of of all lists" feature.)
| |
| calculateBlockParserFactories | back to summary |
|---|---|
| public static List | |
| calculateBlockPreProcessors | back to summary |
|---|---|
| public static List | |
| calculateParagraphPreProcessors | back to summary |
|---|---|
| public static List | |
| deactivateBlockParser | back to summary |
|---|---|
| private void deactivateBlockParser() | |
| endsWithBlankLine | back to summary |
|---|---|
| public boolean endsWithBlankLine(Node block) Implements com. Doc from com. Test the block to see if it ends in a blank line. The blank line can be in the block or its last child. | |
| finalize | back to summary |
|---|---|
| private void finalize(BlockParser blockParser) Finalize a block. Close it and do any necessary postprocessing, e.g. creating string_content from strings, setting the 'tight' or 'loose' status of a list, and parsing the beginnings of paragraphs for reference definitions.
| |
| finalizeAndProcess | back to summary |
|---|---|
| private Document finalizeAndProcess() | |
| finalizeBlocks | back to summary |
|---|---|
| private boolean finalizeBlocks(List<BlockParser> blockParsers) Finalize blocks of previous line.
| |
| findBlockStart | back to summary |
|---|---|
| private BlockStartImpl findBlockStart(BlockParser blockParser) | |
| findNextNonSpace | back to summary |
|---|---|
| private void findNextNonSpace() | |
| getActiveBlockParser | back to summary |
|---|---|
| public BlockParser getActiveBlockParser() Implements com.
| |
| getActiveBlockParser | back to summary |
|---|---|
| public BlockParser getActiveBlockParser(Block node) Implements com.
| |
| getActiveBlockParsers | back to summary |
|---|---|
| public List Implements com.
| |
| getColumn | back to summary |
|---|---|
| public int getColumn() Implements com. Doc from com. The column is the position within the line after tab characters have been processed as 4-space tab stops.
If the line doesn't contain any tabs, it's the same as the
| |
| getIndent | back to summary |
|---|---|
| public int getIndent() Implements com.
| |
| getIndex | back to summary |
|---|---|
| public int getIndex() Implements com.
| |
| getInlineParser | back to summary |
|---|---|
| public InlineParser getInlineParser() Implements com.
| |
| getLine | back to summary |
|---|---|
| public BasedSequence getLine() Implements com.
| |
| getLineEndIndex | back to summary |
|---|---|
| public int getLineEndIndex() Implements com.
| |
| getLineEolLength | back to summary |
|---|---|
| public int getLineEolLength() Implements com.
| |
| getLineNumber | back to summary |
|---|---|
| public int getLineNumber() Implements com.
| |
| getLineSegments | back to summary |
|---|---|
| public List Implements com. Doc from com. Returns a list of document lines encountered this far in the parsing process
| |
| getLineStart | back to summary |
|---|---|
| public int getLineStart() Implements com.
| |
| getLineWithEOL | back to summary |
|---|---|
| public BasedSequence getLineWithEOL() Implements com.
| |
| getNextNonSpaceIndex | back to summary |
|---|---|
| public int getNextNonSpaceIndex() Implements com.
| |
| getParserPhase | back to summary |
|---|---|
| public ParserPhase getParserPhase() Implements com. Doc from com. Get the current parser phase
| |
| getParsing | back to summary |
|---|---|
| public Parsing getParsing() Implements com.
| |
| getProperties | back to summary |
|---|---|
| public MutableDataHolder getProperties() Implements com.
| |
| incorporateLine | back to summary |
|---|---|
| private void incorporateLine(BasedSequence ln) Analyze a line of text and update the document appropriately. We parse markdown text by calling this on each line of input, then finalizing the document.
| |
| isBlank | back to summary |
|---|---|
| public boolean isBlank() Implements com.
| |
| isBlankLine | back to summary |
|---|---|
| public boolean isBlankLine() Implements com.
| |
| isLastLineBlank | back to summary |
|---|---|
| public boolean isLastLineBlank(Node node) Implements com. Doc from com. Test a block to see if the last line of the block is blank. Children not tested. | |
| parse | back to summary |
|---|---|
| public Document parse(CharSequence source) The main parsing function. Returns a parsed document AST.
| |
| parse | back to summary |
|---|---|
| public Document parse(Reader input) throws IOException | |
| preProcessBlocks | back to summary |
|---|---|
| private void preProcessBlocks() | |
| preProcessParagraph | back to summary |
|---|---|
| private void preProcessParagraph(Paragraph block, List<ParagraphPreProcessorFactory> stage, DocumentParser. pre-process a paragraph block
| |
| preProcessParagraphs | back to summary |
|---|---|
| private void preProcessParagraphs() | |
| processInlines | back to summary |
|---|---|
| private void processInlines() Walk through a block & children recursively, parsing string content into inline content where appropriate. | |
| propagateLastLineBlank | back to summary |
|---|---|
| private void propagateLastLineBlank(BlockParser blockParser, BlockParser lastMatchedBlockParser) | |
| removeActiveBlockParser | back to summary |
|---|---|
| private void removeActiveBlockParser() | |
| setLastLineBlank | back to summary |
|---|---|
| private void setLastLineBlank(Node node, boolean value) | |
| setNewColumn | back to summary |
|---|---|
| private void setNewColumn(int newColumn) | |
| setNewIndex | back to summary |
|---|---|
| private void setNewIndex(int newIndex) | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| ParagraphPreProcessorCache | back to summary |
|---|---|
| pack-priv ParagraphPreProcessorCache(ParserState param) | |