This is a group project for the 3info from the INSA-Rennes.
Our goal is to provide a tool chain for the Orbiter Space Flight Simulator, allowing us to write basic automata without technical knowledge.
Currently, the compiler is made for and support only one ship, the ShuttleA.
-
Tool to automagically paste the generated code into the vessel
-
More api functions
-
Compiler errors management
- Type verification for expression and function call
- Void does not have returns statements.
- No state has been defined.
-
And some warning
- When two or more state got the START/FINAL token
- Trying to gotogoto when in the FINAL state.
-
Refactor
- Extrn declaration at the beginning of file, to use function in the vessel code, not in the api
- It would allow us to change more easily the ship
- Use of a beautifier third party script
- This way, we will not have to manage the code indentation, etc.
- Extrn declaration at the beginning of file, to use function in the vessel code, not in the api
-
Suppress the visual studio requirement
-
Generate a nice Mittelwerk.jar
TODO See the example.mw
- Jdk (7 or later)
- Javacc 5.0
- Ant
- Ant plug-in for doxygen (only required if you want to generate the documentation with ant).
- Python 3 or later
- Visual Studio (we use the 2013 pro version)
- Orbiter 2010 sdk (currently in the git repository)
- Mv into the grammar directory
-
ant grammar
-
ant compile
- Write your automata in a file, for example, t800.mw
-
java -cp class Core.Mittelwerk t800.mw <optional_output.cpp> <optional_output.h>
- <optional_output.cpp> contains the code of the automata, in a separate file.
- <optional_output.h> contains the code that must be pasted in the vessel header.
We suppose the code is generated in Otto.cpp and header.h.
- Open the ship project with Visual Studio
- Add the Otto.cpp file into it
- Find the clbkPostStep function into the ship code (ShuttleA.cpp)
- Add the following line at the beginning of it
- postStep(simt, simdt, mjd);
- Go into the ship header (ShuttleA.h), into the private section.
- Paste the content of header.h into it.