Compile an MLM:
arden2bytecode -c hello_world.mlm
Compile and run an MLM:
arden2bytecode -r hello_world.mlm
To compile Arden2ByteCode, you first need to generate the parser using the SableCC parser generator:
- To build the parser with Eclipse, import the project and choose Project ⇒ Build project from the menu. On the first build you need to refresh the Project (F5), so Eclipse finds the downloaded dependencies.
- To build with Apache Ant,
cdinto the project root and type
antat the command line.
Both will automatically call the "sableCC" target in the build.xml and generate the .java files for the parser. This can take some time, but will only happen if the parser does not exist or is out-of-date.
Check out the wiki for detailed instructions.
The dependencies are downloaded automatically if you use Ant or Eclipse to build the project. See the "dependencies" target in build.xml for download links.
- SableCC: A "compiler-compiler" which is used to generate the arden parser from a grammar file. Usage:
java -jar tools/sablecc.jar -d src/ src/arden.scc src/ardenConstants.scc
- JewelCli: A command line arguments parser.
- JUnit: A testing framework to test the correct implementation and standard compliance.
- Hamcrest-core: Used with JUnit to create short and concise tests.
This project contains two test suites:
- An implementation test suite to test Arden2ByteCode specific features (databases, loading MLMs from bytecode, etc.).
- A compiler independent specification test suite to check for Arden Syntax standard conformance. Have a look at the suites README file for more information.
To run the test suites you can use Eclipse or Ant:
- To test in Eclipse, right-click on a test suite and select Run As ⇒ JUnit Test.
- To test with Ant,
cdto the project root and type
ant test. A report will be generated into the report directory.
This compiler implements Arden Syntax 2.5 with the following exceptions:
Languages features not implemented:
- Include Statement
- Citation/links slots are not syntax checked.
- The compiler does not check that no languages features newer than the specified 'Arden Version' are used.
Copyright and license
- Copyright 2004: University of British Columbia
- Copyright 2009-2010: Daniel Grunwald
- Copyright 2011-2012: Hannes Flicka Portions (arden.scc)
See LICENSE.md for licensing information.