Package | Description |
---|---|
org.stekikun.dolmen.debug |
This package contains generic utility functions to help debug
Dolmen-generated lexical analyzers and parsers.
|
Modifier and Type | Method and Description |
---|---|
static <L extends LexBuffer,T,Cat> |
TokenVisualizer.LexerInterface.of(BiFunction<String,Reader,L> makeLexer,
Function<L,T> entry,
Function<T,Cat> categorizer,
T eofToken)
Typical usage of this method when
MyLexer has been generated
by Dolmen with a main entry point and uses some Token.EOF
token for the end-of-input:
LexerInterface.of(MyLexer::new, MyLexer::main, Token::getClass, Token.EOF)
|
Modifier and Type | Method and Description |
---|---|
static <L extends LexBuffer,T,Cat> |
TokenVisualizer.file(TokenVisualizer.LexerInterface<L,T,Cat> lexer,
String input,
String output)
Outputs to the given
output file a stand-alone HTML page which
displays the tokenization of the given input file contents. |
static <L extends LexBuffer,T,Cat> |
TokenVisualizer.string(TokenVisualizer.LexerInterface<L,T,Cat> lexer,
String input,
Writer output)
Outputs to the given writer a stand-alone HTML page which
displays the tokenization of the given
input string's contents. |
static <L extends LexBuffer,T,Cat> |
TokenVisualizer.visualize(TokenVisualizer.LexerInterface<L,T,Cat> lexer,
String inputName,
Reader input,
Writer output)
Outputs to the given writer a stand-alone HTML page which
displays the tokenization of the given
input contents. |