Package eu.bandm.tools.lexic.lib
Class JavaLike
java.lang.Object
eu.bandm.tools.lexic.lib.JavaLike
Contains parsing rules for selected definitions which appear
ubiquituously in Java-like computer languages.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <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«.static TokenFragment
singlelineComment
(TokenFragment newline)
-
Field Details
-
multilineComment
-
stringLiteral
-
-
Method Details
-
singlelineComment
-
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.
-