ASDParseTest - a simple Java
program for running an ASDParser to test parsing with example
grammars.
This is an older, simpler program than ASDTester.java.
It is entirely command-line based, rather than having a graphical user
interface.
-
ASDParseTest.java - the Java source
code for a program to test an ASD grammar with the ASDParser.
-
ASDParseTest.class - the compiled
version of ASDParseTest.java. It will prompt for the name
of the file containing the grammar to be tested, the name(s) of the phrase
type(s) which are expected to result from a parse, a string to parse, and
the maximum number of parse steps to try. See the source file for
more details.
ASDParseTest can be run with one of the following commands:
In an MS-Windows command window: java -cp asddigraphs.jar;.
ASDParseTest
In a Unix command window: java -cp asddigraphs.jar:.
ASDParseTest
Alternatively, if you add the asddigraphs.jar file to your
system's CLASSPATH, then you can simply use
java ASDParseTest
If you want to see the parse trees for each step of the parse, run
ASDParseTest
with the option step at the end of the command:
In an MS-Windows command window: java -cp asddigraphs.jar;.
ASDParseTest step
In a Unix command window: java -cp asddigraphs.jar:.
ASDParseTest step
If asddigraphs.jar is in the system classpath:
java
ASDParseTest step
end of page