Package net.sf.lapg.gen

Examples of net.sf.lapg.gen.ProcessingStatusAdapter


      new TestLexem(1, 0, "number", "[0-9]+"),
      new TestLexem(2, 0, "empty", "()"),
  };

  public void testGenerator() {
    LexerTables lt = LexicalBuilder.compile(INPUT1, new ProcessingStatusAdapter(new TestNotifier(), 0));
    for(TestLexem tl : INPUT1) {
      for(String s : tl.getSamples()) {
        int res = nextToken(lt, s);
        Assert.assertEquals("For "+s+" Expected " + tl.getRegexp()+ ";",tl.index, res);
      }
View Full Code Here


  public void testLexGeneratorReporting() {
    TestNotifier notifier = new TestNotifier(
        "",
        "lexemtest,3: empty: lexem is empty\n" +
        "lexemtest,1: two lexems are identical: string and number\n");
    LexicalBuilder.compile(ERRINPUT, new ProcessingStatusAdapter(notifier, 0));
    notifier.assertDone();

  }
View Full Code Here

import net.sf.lapg.test.oldparser.SyntaxUtilOld;

public class InputTest extends LapgTestCase {

  private void checkGenTables(Grammar g, String outputId, TestNotifier er) {
    LexerTables lt = LexicalBuilder.compile(g.getLexems(), new ProcessingStatusAdapter(er, 0));
    ParserTables pt = Builder.compile(g, new ProcessingStatusAdapter(er, 0));

    StringBuffer sb = new StringBuffer();

    OutputUtils.printTables(sb, lt);
    OutputUtils.printTables(sb, pt);
View Full Code Here

TOP

Related Classes of net.sf.lapg.gen.ProcessingStatusAdapter

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.