compiler.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Compiler &#8212; SCCD 0.9 documentation</title>
  7. <link rel="stylesheet" href="_static/classic.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <link rel="stylesheet" href="_static/mystyle.css" type="text/css" />
  10. <script type="text/javascript">
  11. var DOCUMENTATION_OPTIONS = {
  12. URL_ROOT: './',
  13. VERSION: '0.9',
  14. COLLAPSE_INDEX: false,
  15. FILE_SUFFIX: '.html',
  16. HAS_SOURCE: true
  17. };
  18. </script>
  19. <script type="text/javascript" src="_static/jquery.js"></script>
  20. <script type="text/javascript" src="_static/underscore.js"></script>
  21. <script type="text/javascript" src="_static/doctools.js"></script>
  22. <link rel="top" title="SCCD 0.9 documentation" href="index.html" />
  23. <link rel="next" title="Runtime Platforms" href="runtime_platforms.html" />
  24. <link rel="prev" title="Language Features" href="language_features.html" />
  25. </head>
  26. <body role="document">
  27. <div class="related" role="navigation" aria-label="related navigation">
  28. <h3>Navigation</h3>
  29. <ul>
  30. <li class="right" style="margin-right: 10px">
  31. <a href="genindex.html" title="General Index"
  32. accesskey="I">index</a></li>
  33. <li class="right" >
  34. <a href="py-modindex.html" title="Python Module Index"
  35. >modules</a> |</li>
  36. <li class="right" >
  37. <a href="runtime_platforms.html" title="Runtime Platforms"
  38. accesskey="N">next</a> |</li>
  39. <li class="right" >
  40. <a href="language_features.html" title="Language Features"
  41. accesskey="P">previous</a> |</li>
  42. <li class="nav-item nav-item-0"><a href="index.html">SCCD 0.9 documentation</a> &#187;</li>
  43. </ul>
  44. </div>
  45. <div class="document">
  46. <div class="documentwrapper">
  47. <div class="bodywrapper">
  48. <div class="body" role="main">
  49. <div class="section" id="compiler">
  50. <h1>Compiler<a class="headerlink" href="#compiler" title="Permalink to this headline">¶</a></h1>
  51. <p>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 <a class="reference internal" href="runtime_platforms.html#runtime-platforms"><span class="std std-ref">Runtime Platforms</span></a>.</p>
  52. <p>The compiler can be used from the command line as follows:</p>
  53. <div class="highlight-default"><div class="highlight"><pre>$python -m sccd.compiler.sccdc --help
  54. usage: python -m sccd.compiler.sccdc [-h] [-o OUTPUT] [-v VERBOSE]
  55. [-p PLATFORM] [-l LANGUAGE]
  56. input
  57. positional arguments:
  58. input The path to the XML file to be compiled.
  59. optional arguments:
  60. -h, --help show this help message and exit
  61. -o OUTPUT, --output OUTPUT
  62. The path to the generated code. Defaults to the same
  63. name as the input file but with matching extension.
  64. -v VERBOSE, --verbose VERBOSE
  65. 2 = all output; 1 = only warnings and errors; 0 = only
  66. errors; -1 = no output. Defaults to 2.
  67. -p PLATFORM, --platform PLATFORM
  68. Let the compiled code run on top of threads, gameloop
  69. or eventloop. The default is eventloop.
  70. -l LANGUAGE, --language LANGUAGE
  71. Target language, either &quot;javascript&quot; or &quot;python&quot;.
  72. Defaults to the latter.
  73. </pre></div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  80. <div class="sphinxsidebarwrapper">
  81. <h4>Previous topic</h4>
  82. <p class="topless"><a href="language_features.html"
  83. title="previous chapter">Language Features</a></p>
  84. <h4>Next topic</h4>
  85. <p class="topless"><a href="runtime_platforms.html"
  86. title="next chapter">Runtime Platforms</a></p>
  87. <div role="note" aria-label="source link">
  88. <h3>This Page</h3>
  89. <ul class="this-page-menu">
  90. <li><a href="_sources/compiler.txt"
  91. rel="nofollow">Show Source</a></li>
  92. </ul>
  93. </div>
  94. <div id="searchbox" style="display: none" role="search">
  95. <h3>Quick search</h3>
  96. <form class="search" action="search.html" method="get">
  97. <div><input type="text" name="q" /></div>
  98. <div><input type="submit" value="Go" /></div>
  99. <input type="hidden" name="check_keywords" value="yes" />
  100. <input type="hidden" name="area" value="default" />
  101. </form>
  102. </div>
  103. <script type="text/javascript">$('#searchbox').show(0);</script>
  104. </div>
  105. </div>
  106. <div class="clearer"></div>
  107. </div>
  108. <div class="related" role="navigation" aria-label="related navigation">
  109. <h3>Navigation</h3>
  110. <ul>
  111. <li class="right" style="margin-right: 10px">
  112. <a href="genindex.html" title="General Index"
  113. >index</a></li>
  114. <li class="right" >
  115. <a href="py-modindex.html" title="Python Module Index"
  116. >modules</a> |</li>
  117. <li class="right" >
  118. <a href="runtime_platforms.html" title="Runtime Platforms"
  119. >next</a> |</li>
  120. <li class="right" >
  121. <a href="language_features.html" title="Language Features"
  122. >previous</a> |</li>
  123. <li class="nav-item nav-item-0"><a href="index.html">SCCD 0.9 documentation</a> &#187;</li>
  124. </ul>
  125. </div>
  126. <div class="footer" role="contentinfo">
  127. &#169; Copyright 2016, Simon Van Mierlo.
  128. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.6.
  129. </div>
  130. </body>
  131. </html>