Package net.sourceforge.chaperon.process

Examples of net.sourceforge.chaperon.process.GeneralParserProcessor


  }

  public void testTest01() throws Exception
  {
    Grammar grammar = getGrammar("net/sourceforge/chaperon/test/parser/test1.xgrm");
    GeneralParserProcessor processor = getGeneralParserProcessor(grammar);
    Document result = process(processor, "net/sourceforge/chaperon/test/parser/test1.in");
    Document expected = getDocument("net/sourceforge/chaperon/test/parser/test1.out");

    assertEqual(expected, result);
  }
View Full Code Here


    assertEqual(expected, result);
  }*/
  public void testTest03() throws Exception
  {
    Grammar grammar = getGrammar("net/sourceforge/chaperon/test/parser/test3.xgrm");
    GeneralParserProcessor processor = getGeneralParserProcessor(grammar);
    Document result = process(processor, "net/sourceforge/chaperon/test/parser/test3.in");
    Document expected = getDocument("net/sourceforge/chaperon/test/parser/test3.out");

    assertEqual(expected, result);
  }
View Full Code Here

  }

  public void testTest04() throws Exception
  {
    Grammar grammar = getGrammar("net/sourceforge/chaperon/test/parser/test4.xgrm");
    GeneralParserProcessor processor = getGeneralParserProcessor(grammar);
    Document result = process(processor, "net/sourceforge/chaperon/test/parser/test4.in");
    Document expected = getDocument("net/sourceforge/chaperon/test/parser/test4.out");

    assertEqual(expected, result);
  }
View Full Code Here

  }

  public void testTest04_2() throws Exception
  {
    Grammar grammar = getGrammar("net/sourceforge/chaperon/test/parser/test15.xgrm");
    GeneralParserProcessor processor = getGeneralParserProcessor(grammar);
    Document result = process(processor, "net/sourceforge/chaperon/test/parser/test15.in");
    Document expected = getDocument("net/sourceforge/chaperon/test/parser/test15.out");

    assertEqual(expected, result);
  }
View Full Code Here

  }*/
/* Endless loop*/
  public void testTest13() throws Exception
  {
    Grammar grammar = getGrammar("net/sourceforge/chaperon/test/parser/test13.xgrm");
    GeneralParserProcessor processor = getGeneralParserProcessor(grammar);
    Document result = process(processor, "net/sourceforge/chaperon/test/parser/test13.in");
    Document expected = getDocument("net/sourceforge/chaperon/test/parser/test13.out");

    assertEqual(expected, result);
  }
View Full Code Here

  }

  public void testTest14() throws Exception
  {
    Grammar grammar = getGrammar("net/sourceforge/chaperon/test/parser/test14.xgrm");
    GeneralParserProcessor processor = getGeneralParserProcessor(grammar);
    Document result = process(processor, "net/sourceforge/chaperon/test/parser/test14.in");
    Document expected = getDocument("net/sourceforge/chaperon/test/parser/test14.out");

    assertEqual(expected, result);
  }
View Full Code Here

  }

  public void testTest16() throws Exception
  {
    Grammar grammar = getGrammar("net/sourceforge/chaperon/test/parser/test16.xgrm");
    GeneralParserProcessor processor = getGeneralParserProcessor(grammar);
    Document result = process(processor, "net/sourceforge/chaperon/test/parser/test16.in");
    Document expected = getDocument("net/sourceforge/chaperon/test/parser/test16.out");

    assertEqual(expected, result);
  }
View Full Code Here

  }

  public void testTest17() throws Exception
  {
    Grammar grammar = getGrammar("net/sourceforge/chaperon/test/parser/test17.xgrm");
    GeneralParserProcessor processor = getGeneralParserProcessor(grammar);
    Document result = process(processor, "net/sourceforge/chaperon/test/parser/test17.in");
    Document expected = getDocument("net/sourceforge/chaperon/test/parser/test17.out");

    assertEqual(expected, result);
  }
View Full Code Here

  }

  public void testTest18() throws Exception
  {
    Grammar grammar = getGrammar("net/sourceforge/chaperon/test/parser/test18.xgrm");
    GeneralParserProcessor processor = getGeneralParserProcessor(grammar);
    Document result = process(processor, "net/sourceforge/chaperon/test/parser/test18.in");
    Document expected = getDocument("net/sourceforge/chaperon/test/parser/test18.out");

    assertEqual(expected, result);
  }
View Full Code Here

    assertEqual(expected, result);
  }

  private GeneralParserProcessor getGeneralParserProcessor(Grammar grammar)
  {
    GeneralParserProcessor processor = new GeneralParserProcessor();
    processor.setLog(new ConsoleLog());

    /*Automaton automaton =
      (new AutomatonBuilder(grammar, new ConsoleLog())).getParserAutomaton();*/

    //  (new AutomatonBuilder(grammar)).getParserAutomaton();
    Automaton automaton = new Automaton(grammar, new ConsoleLog());

    assertNotNull("Test if automaton is generated", automaton);

    processor.setParserAutomaton(automaton);

    return processor;
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.chaperon.process.GeneralParserProcessor

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.