Astronavigator
Astronavigator

Reputation: 2051

ANTLRWorks standard tree

When debugging grammar in ANTLRWorks, ANTLRWorks builds a nice tree without any "^", "!" operators inside rules. Is it possible to access this tree whithout adding "^", "!" operators to grammar source?

Upvotes: 0

Views: 103

Answers (1)

Bart Kiers
Bart Kiers

Reputation: 170148

Since you didn't define ^ and ! operators (or rewrite rules), you must mean the parse tree (not the AST). But, the answer is: no, that's not possible. They are created internally in ANTLRWorks, there's no (public) API to access this structure.

Upvotes: 1

Related Questions