Package antlr
Class DefaultToolErrorHandler
- java.lang.Object
-
- antlr.DefaultToolErrorHandler
-
- All Implemented Interfaces:
ToolErrorHandler
class DefaultToolErrorHandler extends java.lang.Object implements ToolErrorHandler
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CharFormatter
javaCharFormatter
-
Constructor Summary
Constructors Constructor Description DefaultToolErrorHandler(Tool tool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
warnAltAmbiguity(Grammar grammar, AlternativeBlock blk, boolean lexicalAnalysis, int depth, Lookahead[] sets, int altIdx1, int altIdx2)
Issue a warning about ambiguity between a alternatesvoid
warnAltExitAmbiguity(Grammar grammar, BlockWithImpliedExitPath blk, boolean lexicalAnalysis, int depth, Lookahead[] sets, int altIdx)
Issue a warning about ambiguity between an alternate and exit path.
-
-
-
Field Detail
-
javaCharFormatter
CharFormatter javaCharFormatter
-
-
Constructor Detail
-
DefaultToolErrorHandler
DefaultToolErrorHandler(Tool tool)
-
-
Method Detail
-
warnAltAmbiguity
public void warnAltAmbiguity(Grammar grammar, AlternativeBlock blk, boolean lexicalAnalysis, int depth, Lookahead[] sets, int altIdx1, int altIdx2)
Issue a warning about ambiguity between a alternates- Specified by:
warnAltAmbiguity
in interfaceToolErrorHandler
- Parameters:
blk
- The block being analyzedlexicalAnalysis
- true for lexical ruledepth
- The depth of the ambiguitysets
- An array of bitsets containing the ambiguitiesaltIdx1
- The zero-based index of the first ambiguous alternativealtIdx2
- The zero-based index of the second ambiguous alternative
-
warnAltExitAmbiguity
public void warnAltExitAmbiguity(Grammar grammar, BlockWithImpliedExitPath blk, boolean lexicalAnalysis, int depth, Lookahead[] sets, int altIdx)
Issue a warning about ambiguity between an alternate and exit path.- Specified by:
warnAltExitAmbiguity
in interfaceToolErrorHandler
- Parameters:
blk
- The block being analyzedlexicalAnalysis
- true for lexical ruledepth
- The depth of the ambiguitysets
- An array of bitsets containing the ambiguitiesaltIdx
- The zero-based index of the ambiguous alternative
-
-