Expand description
A leaf or branch node of a token tree. Used for parsing.
Leaf tokens have the following types:
Subgoal, Comma, Semicolon, LParen, RParen
Branch tokens contain child tokens. Valid types are: Group, And, Or
The precedence of branch tokens, from highest to lowest, is:
Group
And
Or
For the goal (mother($X, $Y); father($X, $Y))
,
the corresponding token types would be:
LParen Subgoal Semicolon Subgoal RParen
Enums§
- Token
- Used for tokenizing Suiron source.
- Token
Type - Identifies tokens in the token tree and on the parse stack.
Functions§
- make_
branch_ token - Makes a branch token from a vector of child tokens.
- make_
leaf_ token - Makes a leaf token from the given string.