Interface PreprocessorConstants

All Known Implementing Classes:
InvalidToken, ParseException, PreprocessorLexer, PreprocessorParser, Token

public interface PreprocessorConstants
Token literal values and constants.
  • Field Details

  • Method Details

    • displayChar

      static String displayChar(int ch)
    • addEscapes

      static String addEscapes(String str)
    • readToEnd

      static String readToEnd(Reader reader)
    • readFully

      static String readFully(Reader reader) throws IOException
      Throws:
      IOException
    • stringFromBytes

      static String stringFromBytes(byte[] bytes)
      Rather bloody-minded way of converting a byte array into a string taking into account the initial byte order mark (used by Microsoft a lot seemingly) See: https://docs.microsoft.com/es-es/globalization/encoding/byte-order-markc
      Parameters:
      bytes - the raw byte array
      Returns:
      A String taking into account the encoding in the byte order mark (if it was present). If no byte-order mark was present, it assumes the raw input is in UTF-8.