Version

Ignored Content (Syntax Parsing Engine)

Topic Overview

Purpose

This topic explains how to access the ignored content produced during syntax analysis.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic provides an overview of the Syntax Parsing Engine.

This topic provides an overview of the Syntax Parsing Engine’s Grammar.

This topic explains the lexical analysis performed by the Syntax Parsing Engine.

This topic explains the syntax analysis performed by the Syntax Parsing Engine.

This topic explains when the syntax tree is created and how to access it.

Ignored Content

Overview

Even though the syntax analyzer ignores insignificant tokens and skips unexpected tokens, they are still stored in the syntax tree because the syntax tree must represent the full content of the document. When the syntax analyzer comes across content which it can ignore, it gathers it up and stores it as “ignored content” on the next token node which is not ignored. This content is then accessible with the GetLeadingIgnoredContent method on the token node and all its ancestor nodes for which it is the first token node. This method returns an IgnoredContentList class, which is a collection with the following key members:

Property Description

The number of pieces of ignored content in the collection.

Indexer Description

The piece of ignored content at the specified zero-based index in the collection.

Method Description

Returns a string containing the text of all ignored content in the collection.

The indexer of the IgnoredContentList collection returns IgnoredContent values, which represent a single piece of ignored content.

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic explains the syntax tree pruning types performed by the Syntax Parsing Engine.

This topic explains how to attach and obtain additional data to and from the syntax tree.