JspParser extends AbstractParser { @Override public Node parse(String fileName, Reader source) throws ParseException { AbstractTokenManager.setFileName(fileName); return new net.sourceforge.pmd.lang.jsp.ast.JspParser(new SimpleCharStream(source)).CompilationUnit(); } JspParser(ParserOptions parserOptions); @Override TokenManager createTokenManager(Reader source); @Override boolean canParse(); @Override Node parse(String fileName, Reader source); @Override Map<Integer, String> getSuppressMap();  }
@Test public void testParseDollar() { Node node = parse( "<span class=\"CostUnit\">$</span><span class=\"CostMain\">129</span><span class=\"CostFrac\">.00</span>"); Assert.assertNotNull(node); }
@Test public void testParseELAttribute() { Node node = parse( "<div ${something ? 'class=\"red\"' : ''}> Div content here.</div>"); Assert.assertNotNull(node); }
@Test public void testParseELAttributeValue() { Node node = parse( "<div class=\"${something == 0 ? 'zero_something' : something == 1 ? 'one_something' : 'other_something'}\">Div content here.</div>"); Assert.assertNotNull(node); }
@Test public void testParseBooleanAttribute() { Node node = parse( "<label><input type='checkbox' checked name=cheese disabled=''> Cheese</label>"); Assert.assertNotNull(node); }