compiler.rst 1.4 KB

12345678910111213141516171819202122232425262728
  1. Compiler
  2. ========
  3. To compile a conforming SCCDXML file, the provided Python compiler can be used. The compiler can compile conforming SCCD models to two languages: Python and Javascript. Three platforms are supported, for more information see :ref:`runtime_platforms`.
  4. The compiler can be used from the command line as follows::
  5. $python -m sccd.compiler.sccdc --help
  6. usage: python -m sccd.compiler.sccdc [-h] [-o OUTPUT] [-v VERBOSE]
  7. [-p PLATFORM] [-l LANGUAGE]
  8. input
  9. positional arguments:
  10. input The path to the XML file to be compiled.
  11. optional arguments:
  12. -h, --help show this help message and exit
  13. -o OUTPUT, --output OUTPUT
  14. The path to the generated code. Defaults to the same
  15. name as the input file but with matching extension.
  16. -v VERBOSE, --verbose VERBOSE
  17. 2 = all output; 1 = only warnings and errors; 0 = only
  18. errors; -1 = no output. Defaults to 2.
  19. -p PLATFORM, --platform PLATFORM
  20. Let the compiled code run on top of threads, gameloop
  21. or eventloop. The default is eventloop.
  22. -l LANGUAGE, --language LANGUAGE
  23. Target language, either "javascript" or "python".
  24. Defaults to the latter.