...
In this case, HexDigit
is not a token in its own right; it can only be called from HexLiteral
.
Warning: T__ is considered a reserved token name and token name prefix. please don't use it as one of your rule names.
Tree grammar rules
Rules in tree grammars are identical to parser grammars except that they can specify a tree element to match. The syntax is ^( root child1 child2 ... childn )
. For example:
...