Package org.antlr.v4.tool
package org.antlr.v4.tool
-
ClassDescriptionAn outermost alternative for a rule.Defines behavior of object able to handle error messages from ANTLR including both tool errors like "can't write file" and grammar ambiguity warnings.Track the names of attributes defined in arg lists, return values, scope blocks etc...Track the attributes within retval, arg lists etc...Grammars, rules, and alternatives all have symbols visible to actions.Given a grammar file, show the dependencies on .tokens etc...The DOT (part of graphviz) generation aspect.Abstracts away the definition of Message severity and the text that should display to represent that severity if there is no StringTemplate available to do it.A complex enumeration of all the error messages that the tool can issue.An
InterpreterRuleContext
that knows which alternative for a rule was matched.A heavier weightParserInterpreter
that creates parse trees that track alternative numbers for subtree roots.We want to stop and track the first error but we cannot bail out likeBailErrorStrategy
as consume() constructs trees.A problem with the symbols and/or meaning of a grammar such as rule redefinition.A problem with the syntax of your antlr grammar such as "The '{' came as a complete surprise to me at this point in your program"Handle left-recursion and block-set transformsthe various kinds of labels.A generic message from the tool such as "file not found" type errors; there is no reason to create a special object for each error unlike the grammar errors, which may be rather complex.