Package gnu.javax.swing.text.html.parser.support.low

Examples of gnu.javax.swing.text.html.parser.support.low.pattern


  public void testComplexToken()
                        throws Exception
  {
    String x = "< style  >x";

    pattern a =
      new pattern(new node[]
                  {
                    new node(Constants.BEGIN), new node(Constants.NUMTOKEN),
                    new node(Constants.END), new node(Constants.NUMTOKEN)
                  }
                 );

    pattern b =
      new pattern(new node[]
                  {
                    new node(Constants.BEGIN), new node(Constants.STYLE),
                    new node(Constants.END), new node(Constants.NUMTOKEN)
                  }
                 );

    pattern c =
      new pattern(new node[]
                  {
                    new node(Constants.BEGIN), new node(Constants.WS, true),
                    new node(Constants.STYLE), new node(Constants.WS, true),
                    new node(Constants.END), new node(Constants.NUMTOKEN)
                  }
                 );

    pattern d =
      new pattern(new node[]
                  {
                    new node(Constants.BEGIN), new node(Constants.WS, true),
                    new node(Constants.STYLE), new node(Constants.WS, true),
                    new node(Constants.END), new node(Constants.BEGIN)
                  }
                 );

    ReaderTokenizer rt = new ReaderTokenizer();
    rt.reset(new StringReader(x));

    assertFalse(a.matches(rt));
    assertFalse(b.matches(rt));
    assertTrue(c.matches(rt));
    assertFalse(d.matches(rt));
  }
View Full Code Here

TOP

Related Classes of gnu.javax.swing.text.html.parser.support.low.pattern

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.