public class Tokenizer extends GrammarVisitor
CodeGenerator.VALUE, or bindings to CodeGenerator.VALUE.Properties.CONSUMER property, indicating
whether they consume the input.Properties.TEXT_ONLY property.
This visitor assumes that the entire grammar is contained in a
single module and that text-only productions have been marked as
such. It may perform faster if the grammar has been annotated with
its real root.TextTester,
RootFinder| Modifier and Type | Class and Description |
|---|---|
static class |
Tokenizer.Tester
Visitor to determine which productions are lexical.
|
analyzer, isBound, isLastElement, isPredicate, isRepeatedOnce, isTopLevel, isVoided, needsSequence, runtime, transformInPlace| Constructor and Description |
|---|
Tokenizer(Runtime runtime,
Analyzer analyzer)
Create a new tokenizer.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
markToken(Production p,
boolean verbose)
Mark the specified production as token-level.
|
java.lang.Object |
visit(Module m)
Visit the specified grammar.
|
Element |
visit(NonTerminal nt)
Visit the specified nonterminal.
|
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitdispatch, equals, hashCode, iterate, map, mapInPlace, unableToVisit, visitpublic java.lang.Object visit(Module m)
visit in class GrammarVisitorpublic Element visit(NonTerminal nt)
public static void markToken(Production p, boolean verbose)
Properties.TOKEN property and
removes any Properties.TEXT_ONLY property. It does,
however, not adjust the production's type to
Token.p - The production.Copyright © 2014. All Rights Reserved.