@Test public void testFormattingInfo() throws Exception { { Parser<Object> p = new Parser<>("%45x"); Node t = p.parse(); FormattingNode witness = new SimpleKeywordNode("x"); witness.setFormatInfo(new FormatInfo(45, Integer.MAX_VALUE)); assertEquals(witness, t); } { Parser<Object> p = new Parser<>("%4.5x"); Node t = p.parse(); FormattingNode witness = new SimpleKeywordNode("x"); witness.setFormatInfo(new FormatInfo(4, 5)); assertEquals(witness, t); } { Parser<Object> p = new Parser<>("%-4.5x"); Node t = p.parse(); FormattingNode witness = new SimpleKeywordNode("x"); witness.setFormatInfo(new FormatInfo(4, 5, false, true)); assertEquals(witness, t); } { Parser<Object> p = new Parser<>("%-4.-5x"); Node t = p.parse(); FormattingNode witness = new SimpleKeywordNode("x"); witness.setFormatInfo(new FormatInfo(4, 5, false, false)); assertEquals(witness, t); } { Parser<Object> p = new Parser<>("%-4.5x %12y"); Node t = p.parse(); FormattingNode witness = new SimpleKeywordNode("x"); witness.setFormatInfo(new FormatInfo(4, 5, false, true)); Node n = witness.next = new Node(Node.LITERAL, " "); n = n.next = new SimpleKeywordNode("y"); ((FormattingNode) n).setFormatInfo(new FormatInfo(12, Integer.MAX_VALUE)); assertEquals(witness, t); } }
public Node parse() throws ScanException { return E(); }
Parser extends ContextAwareBase { public Node parse() throws ScanException { return E(); } }
Parser extends ContextAwareBase { public Node parse() throws ScanException { return E(); } Parser(TokenStream ts);  Parser(String pattern);  Parser(String pattern, IEscapeUtil escapeUtil); }
Parser extends ContextAwareBase { public Node parse() throws ScanException { return E(); } Parser(TokenStream ts);  Parser(String pattern);  Parser(String pattern, IEscapeUtil escapeUtil); Converter<E> compile(final Node top, Map<String, String> converterMap); Node parse(); }
Parser extends ContextAwareBase { public Node parse() throws ScanException { return E(); } Parser(TokenStream ts);  Parser(String pattern);  Parser(String pattern, IEscapeUtil escapeUtil); Converter<E> compile(final Node top, Map<String, String> converterMap); Node parse(); final static String MISSING_RIGHT_PARENTHESIS; final static Map<String, String> DEFAULT_COMPOSITE_CONVERTER_MAP; final static String REPLACE_CONVERTER_WORD; }