ParseTree

The basic parse tree, as used throughout the project. You can define your own parse tree node, but respect the basic layout.

Members

Functions

toString
string toString(string tabs = "")

Basic toString for easy pretty-printing.

Variables

children
ParseTree[] children;

The sub-trees created by sub-rules parsing.

end
size_t end;

Indices for the matched part (from the very beginning of the first match to the last char of the last match.

input
string input;

The input string that generated the parse tree. Stored here for the parse tree to be passed to other expressions, as input.

matches
string[] matches;

The matched input's parts. Some expressions match at more than one place, hence matches is an array.

name
string name;

The node name

successful
bool successful;

Indicates whether a parsing was successful or not

Meta