Set up a workspace
- Download and extract the QKDT target platform
- Start up Eclipse 3.5 and create an empty workspace
- Set the QKDT target platform from preferences
- Switch to the subversion perspective and check out all projects from the trunk of https://qkdt.svn.sf.net/svnroot/qkdt
Start QKDT from workspace
For running QKDT from the workspace create and run a new Run Configuration of type Eclipse Application.
Develop the ANTLR grammar
Tweaking the grammar can be tedious and I would suggest a test driven approach:
- Run all tests from org.qkdt.parser.tests, this can be done easily from the context menu of the org.qkdt.parser.tests package
- Choose a test spec from the tests directory and add a new test
- Run all tests again and watch the new test failing
- Change the grammar file in org.qkdt.parser/grammar/QK.g
- Save the grammar, antlr will be called automatically from the build.xml script and generates the parser and lexer if the grammar is OK
- Run the tests again
There is also a simple application for calling the parser on a particular q file. It can be found at org.qkdt.parser.tests/src/org/qkdt/parser/test/ParseQK.java.
© 2007,2008 Markus Barchfeld.