Package net.sourceforge.chaperon.build

Examples of net.sourceforge.chaperon.build.FollowSetCollection


  }

  public void testFollowSet()
  {
    FirstSetCollection firstsets = new FirstSetCollection(grammar)/*, new ConsoleLogger());*/
    FollowSetCollection followsets = new FollowSetCollection(grammar, firstsets);

    SymbolSet result = new SymbolSet();
    result.addSymbol(bclose);
    result.addSymbol(eof);
    assertEquals("Test if sets are equal", result, followsets.getFollowSet(E));
    assertEquals("Test if sets are equal", result, followsets.getFollowSet(Eprime));

    result = new SymbolSet();
    result.addSymbol(plus);
    result.addSymbol(bclose);
    result.addSymbol(eof);
    assertEquals("Test if sets are equal", result, followsets.getFollowSet(T));
    assertEquals("Test if sets are equal", result, followsets.getFollowSet(Tprime));

    result = new SymbolSet();
    result.addSymbol(mult);
    result.addSymbol(plus);
    result.addSymbol(bclose);
    result.addSymbol(eof);
    assertEquals("Test if sets are equal", result, followsets.getFollowSet(F));
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.chaperon.build.FollowSetCollection

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.