1 15 package org.apache.hivemind.conditional; 16 17 import org.apache.hivemind.impl.MessageFormatter; 18 19 23 class ConditionalMessages 24 { 25 protected static MessageFormatter _formatter = new MessageFormatter(ConditionalMessages.class); 26 27 public static String unexpectedCharacter(int position, char[] input) 28 { 29 return _formatter.format( 30 "unexpected-character", 31 new Character (input[position]), 32 new Integer (position + 1), 33 new String (input)); 34 } 35 36 public static String unexpectedEndOfInput(String input) 37 { 38 return _formatter.format("unexpected-end-of-input", input); 39 } 40 41 public static String unexpectedToken(TokenType expected, TokenType actual, String input) 42 { 43 return _formatter.format("unexpected-token", expected, actual, input); 44 } 45 46 public static String unparsedToken(Token token, String input) 47 { 48 return _formatter.format("unparsed-token", token, input); 49 } 50 } | Popular Tags |