Exemplo n.º 1
0
 @Test
 public void basicTest() throws GrammarException, IOException {
   String[] rules = {
     //
     "<ROOT> = <a> <s> <b>", //
     "<a> = 'a'", //
     "<b> = 'b'", //
     "<s> = /\\s++/", //
   };
   Grammar g = new Grammar(rules);
   String s = "a\nb";
   Matcher m = g.find(s);
   assertNotNull("found joe", m.match());
 }