Lines Matching defs:literal
50 String literal)
52 if (literal.startsWith("'\\u") ) {
53 literal = "0x" +literal.substring(3, 7);
55 int c = literal.charAt(1); // TJP
57 literal = "0x" + Integer.toHexString(c);
61 return literal;
64 /** Convert from an ANTLR string literal found in a grammar file to
65 * an equivalent string literal in the target language. For Java, this
67 * around the incoming literal. Just flip the quotes and replace
71 String literal)
73 literal = Utils.replace(literal,"\"","\\\"");
74 StringBuffer buf = new StringBuffer(literal);
76 buf.setCharAt(literal.length()-1,'"');
84 // If name is a literal, return the token type instead
97 // If name is a literal, return the token type instead