compiler.rst 1.4 KB

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