Class Parser
java.lang.Object
de.bottlecaps.markup.blitz.Parser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static classprivate static classprivate static classprivate static classprivate classprivate classprivate static classprivate static enumprivate static classprivate static classprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int[]private final CompressedMapprivate final Set<Blitz.Option> private Writerprivate final BitSet[]private final int[]private final booleanstatic final Stringprivate final String[]private final CompressedMapprivate final booleanprivate final intprivate final intprivate final ReduceArgument[]private final int[]private static final intprivate final RangeSet[]private final CompressedMap -
Constructor Summary
ConstructorsConstructorDescriptionParser(Set<Blitz.Option> defaultOptions, int[] asciiMap, CompressedMap bmpMap, int[] smpMap, CompressedMap terminalTransitions, int numberOfTokens, CompressedMap nonterminalTransitions, int numberOfNonterminals, ReduceArgument[] reduceArguments, String[] nonterminal, RangeSet[] terminal, int[] forks, BitSet[] expectedTokens, boolean isVersionMismatch, boolean normalizeEol) -
Method Summary
Modifier and TypeMethodDescriptionprivate String[]parse(String input, Blitz.Option... options) Parse the given input, returning the resulting XML as a string.voidparse(String input, ResultHandler resultHandler, Blitz.Option... options) Parse the given input, reporting the result to the given handler.private static booleanprintRange(int chr) voidprivate voidwriteTrace(String content) private static String
-
Field Details
-
IXML_NAMESPACE
- See Also:
-
STALL_THRESHOLD
private static final int STALL_THRESHOLD- See Also:
-
defaultOptions
-
asciiMap
private final int[] asciiMap -
bmpMap
-
smpMap
private final int[] smpMap -
terminalTransitions
-
numberOfTokens
private final int numberOfTokens -
nonterminalTransitions
-
numberOfNonterminals
private final int numberOfNonterminals -
reduceArguments
-
nonterminal
-
terminal
-
forks
private final int[] forks -
expectedTokens
-
isVersionMismatch
private final boolean isVersionMismatch -
normalizeEol
private final boolean normalizeEol -
err
-
-
Constructor Details
-
Parser
public Parser(Set<Blitz.Option> defaultOptions, int[] asciiMap, CompressedMap bmpMap, int[] smpMap, CompressedMap terminalTransitions, int numberOfTokens, CompressedMap nonterminalTransitions, int numberOfNonterminals, ReduceArgument[] reduceArguments, String[] nonterminal, RangeSet[] terminal, int[] forks, BitSet[] expectedTokens, boolean isVersionMismatch, boolean normalizeEol)
-
-
Method Details
-
parse
Parse the given input, returning the resulting XML as a string.- Parameters:
input- the input stringoptions- options for use at parsing time. If absent, any options passed at generation time will be in effect- Returns:
- the resulting XML
-
parse
Parse the given input, reporting the result to the given handler.- Parameters:
input- the input stringresultHandler- the handler that receives the parse resultoptions- options for use at parsing time. If absent, any options passed at generation time will be in effect
-
setTraceWriter
-
writeTrace
-
getExpectedTokenSet
-
printRange
private static boolean printRange(int chr) -
xmlEscape
-