The Info Tree

The Info Tree is another representation of a successful parse that can be generated by the parsers in the system. An info tree is similar to a parse tree in that it closely resembles how the grammar matched the input string. In contrast to a parse tree, an info tree is aimed to provide information about syntax highlighting and indentation. As such, there are a few differences between a parse tree and an info tree:

The info tree representation is implemented by the classes lang.bnf.InfoNode, lang.bnf.InfoInternal, and lang.bnf.InfoLeaf. This representation is used by the language server to provide syntax highlighting and indentation of source code.