Class JavaLike

java.lang.Object
eu.bandm.tools.lexic.lib.JavaLike

public class JavaLike extends Object
Contains parsing rules for selected definitions which appear ubiquituously in Java-like computer languages.
  • Field Details

    • multilineComment

      public static final TokenFragment multilineComment
    • stringLiteral

      public static final TokenFragment stringLiteral
  • Method Details

    • singlelineComment

      public static TokenFragment singlelineComment(TokenFragment newline)
    • expandStringLiteral

      public static <D> String expandStringLiteral(MessageReceiver<SimpleMessage<D>> msg, Location<D> loc, String s)
      The Java language specification defines more with its rule »3.10.7 Escape sequences«, namely »b/s/t/n/f/r/line terminator/'/"/octalEscape«. (As of 20240208) The method javs.lang.String.translateEscapes expands these all. But this method here gives more error information and additionally rejects control characters. The very first and last character of the input are ignored because they are the string constant delimiters.