01: /*
02: * Copyright (C) Chaperon. All rights reserved.
03: * -------------------------------------------------------------------------
04: * This software is published under the terms of the Apache Software License
05: * version 1.1, a copy of which has been included with this distribution in
06: * the LICENSE file.
07: */
08:
09: package net.sourceforge.chaperon.test;
10:
11: import junit.framework.Test;
12: import junit.framework.TestCase;
13: import junit.framework.TestSuite;
14:
15: import net.sourceforge.chaperon.common.SimpleParser;
16:
17: import java.io.File;
18:
19: public class SimpleParserTestCase extends TestCase {
20: public SimpleParserTestCase(String name) {
21: super (name);
22: }
23:
24: public void testSimpleParser() throws Exception {
25: File lexicon = new File("src/resources/grammars/grm.xlex");
26: File grammar = new File("src/resources/grammars/grm.xgrm");
27: File in = new File("src/resources/grammars/java.grm");
28: File out = new File("build/chaperon/simpleparser.test");
29:
30: //out.deleteOnExit();
31: SimpleParser.process(lexicon, grammar, in, out);
32: }
33:
34: public static Test suite() {
35: return new TestSuite(SimpleParserTestCase.class);
36: }
37: }
|