antlr.preprocessor

Class Preprocessor

public class Preprocessor extends LLkParser implements PreprocessorTokenTypes

Field Summary
static String[]_tokenNames
static BitSet_tokenSet_0
static BitSet_tokenSet_1
static BitSet_tokenSet_2
static BitSet_tokenSet_3
static BitSet_tokenSet_4
static BitSet_tokenSet_5
static BitSet_tokenSet_6
static BitSet_tokenSet_7
static BitSet_tokenSet_8
Constructor Summary
protected Preprocessor(TokenBuffer tokenBuf, int k)
Preprocessor(TokenBuffer tokenBuf)
protected Preprocessor(TokenStream lexer, int k)
Preprocessor(TokenStream lexer)
Preprocessor(ParserSharedInputState state)
Method Summary
Grammarclass_def(String file, Hierarchy hier)
StringexceptionGroup()
StringexceptionHandler()
StringexceptionSpec()
protected ToolgetTool()
voidgrammarFile(Hierarchy hier, String file)
IndexedVectoroptionSpec(Grammar gr)
voidreportError(String s)
Delegates the error message to the tool if any was registered via {@link #initTool(antlr.Tool)}
voidreportError(RecognitionException e)
Delegates the error message to the tool if any was registered via {@link #initTool(antlr.Tool)}
voidreportWarning(String s)
Delegates the warning message to the tool if any was registered via {@link #initTool(antlr.Tool)}
voidrule(Grammar gr)
voidsetTool(Tool tool)
In order to make it so existing subclasses don't break, we won't require that the antlr.Tool instance be passed as a constructor element.
StringsuperClass()
StringthrowsSpec()

Field Detail

_tokenNames

public static final String[] _tokenNames

_tokenSet_0

public static final BitSet _tokenSet_0

_tokenSet_1

public static final BitSet _tokenSet_1

_tokenSet_2

public static final BitSet _tokenSet_2

_tokenSet_3

public static final BitSet _tokenSet_3

_tokenSet_4

public static final BitSet _tokenSet_4

_tokenSet_5

public static final BitSet _tokenSet_5

_tokenSet_6

public static final BitSet _tokenSet_6

_tokenSet_7

public static final BitSet _tokenSet_7

_tokenSet_8

public static final BitSet _tokenSet_8

Constructor Detail

Preprocessor

protected Preprocessor(TokenBuffer tokenBuf, int k)

Preprocessor

public Preprocessor(TokenBuffer tokenBuf)

Preprocessor

protected Preprocessor(TokenStream lexer, int k)

Preprocessor

public Preprocessor(TokenStream lexer)

Preprocessor

public Preprocessor(ParserSharedInputState state)

Method Detail

class_def

public final Grammar class_def(String file, Hierarchy hier)

exceptionGroup

public final String exceptionGroup()

exceptionHandler

public final String exceptionHandler()

exceptionSpec

public final String exceptionSpec()

getTool

protected Tool getTool()

Since: 2.7.2

grammarFile

public final void grammarFile(Hierarchy hier, String file)

optionSpec

public final IndexedVector optionSpec(Grammar gr)

reportError

public void reportError(String s)
Delegates the error message to the tool if any was registered via {@link #initTool(antlr.Tool)}

Since: 2.7.2

reportError

public void reportError(RecognitionException e)
Delegates the error message to the tool if any was registered via {@link #initTool(antlr.Tool)}

Since: 2.7.2

reportWarning

public void reportWarning(String s)
Delegates the warning message to the tool if any was registered via {@link #initTool(antlr.Tool)}

Since: 2.7.2

rule

public final void rule(Grammar gr)

setTool

public void setTool(Tool tool)
In order to make it so existing subclasses don't break, we won't require that the antlr.Tool instance be passed as a constructor element. Instead, the antlr.Tool instance should register itself via {@link #initTool(antlr.Tool)}

Throws: IllegalStateException if a tool has already been registered

Since: 2.7.2

superClass

public final String superClass()

throwsSpec

public final String throwsSpec()