Class Parser

java.lang.Object
de.bottlecaps.markup.blitz.Parser

public class Parser extends Object
  • Field Details

    • IXML_NAMESPACE

      public static final String IXML_NAMESPACE
      See Also:
    • STALL_THRESHOLD

      private static final int STALL_THRESHOLD
      See Also:
    • defaultOptions

      private final Set<Blitz.Option> defaultOptions
    • asciiMap

      private final int[] asciiMap
    • bmpMap

      private final CompressedMap bmpMap
    • smpMap

      private final int[] smpMap
    • terminalTransitions

      private final CompressedMap terminalTransitions
    • numberOfTokens

      private final int numberOfTokens
    • nonterminalTransitions

      private final CompressedMap nonterminalTransitions
    • numberOfNonterminals

      private final int numberOfNonterminals
    • reduceArguments

      private final ReduceArgument[] reduceArguments
    • nonterminal

      private final String[] nonterminal
    • terminal

      private final RangeSet[] terminal
    • forks

      private final int[] forks
    • expectedTokens

      private final BitSet[] expectedTokens
    • isVersionMismatch

      private final boolean isVersionMismatch
    • normalizeEol

      private final boolean normalizeEol
    • err

      private Writer err
  • Constructor Details

  • Method Details

    • parse

      public String parse(String input, Blitz.Option... options)
      Parse the given input, returning the resulting XML as a string.
      Parameters:
      input - the input string
      options - options for use at parsing time. If absent, any options passed at generation time will be in effect
      Returns:
      the resulting XML
    • parse

      public void parse(String input, ResultHandler resultHandler, Blitz.Option... options)
      Parse the given input, reporting the result to the given handler.
      Parameters:
      input - the input string
      resultHandler - the handler that receives the parse result
      options - options for use at parsing time. If absent, any options passed at generation time will be in effect
    • setTraceWriter

      public void setTraceWriter(Writer w)
    • writeTrace

      private void writeTrace(String content)
    • getExpectedTokenSet

      private String[] getExpectedTokenSet(Parser.ParseException e)
    • printRange

      private static boolean printRange(int chr)
    • xmlEscape

      private static String xmlEscape(String s)