public class ParserUtilities extends Object
Title: Parser Utilities
Description: Static utility methods and fields used by the ANTLR generated parser sources. This code is in a separate Java file rather than in the ANTLR sources to make it easier to maintain with comfortable Java tools (e.g., Eclipse).
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Constructor and Description |
|---|
ParserUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static String |
dropFirstAndLast(String s)
Trim first and last character from
s. |
static String |
dropFirstAndLast3(String s)
Trim first and last character from
s. |
static String |
sparqlUnescape(String s)
Reverse character escaping in a string literal consistent with SPARQL
A.7, A.8[91]
|
public static String dropFirstAndLast(String s)
s. Used when the parser
matches STRING_LITERAL1 or STRING_LITERAL2 (SPARQL A.8[87]-[88])s - The string to be trimmedpublic static String dropFirstAndLast3(String s)
s. Used when the parser
matches STRING_LITERAL_LONG1 or STRING_LITERAL_LONG2 (SPARQL
A.8[89]-[90])s - The string to be trimmedCopyright © 2019. All rights reserved.