TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Call for compiler hackers

3 pointsby smitchell2over 8 years ago
I&#x27;ve created some compiler related tasks on RosettaCode. The goal is to create a simple compiler in small pieces: Scanner, Parser, Code Generator, and Virtual Machine Interpreter tasks have been created.<p><pre><code> Scanner http:&#x2F;&#x2F;rosettacode.org&#x2F;wiki&#x2F;Compiler&#x2F;lexical_analyzer Parser http:&#x2F;&#x2F;rosettacode.org&#x2F;wiki&#x2F;Compiler&#x2F;syntax_analyzer Code Generator http:&#x2F;&#x2F;rosettacode.org&#x2F;wiki&#x2F;Compiler&#x2F;code_generator Virtual Machine Interpreter http:&#x2F;&#x2F;rosettacode.org&#x2F;wiki&#x2F;Compiler&#x2F;virtual_machine_interpreter </code></pre> In order to keep the actual solutions smallish, the language is necessarily very simple - a Tiny (mostly) subset of C, with only integer variables.<p><pre><code> &#x2F;* Simple prime number generator *&#x2F; count = 1; n = 1; limit = 100; while (n &lt; limit) { k=3; p=1; n=n+2; while ((k*k&lt;=n) &amp;&amp; (p)) { p=n&#x2F;k*k!=n; k=k+2; } if (p) { print(n, &quot; is prime\n&quot;); count = count + 1; } } print(&quot;Total primes found: &quot;, count, &quot;\n&quot;); </code></pre> There are currently implementations of all the main tasks in Algol W, AWK, C, Phix, Python and Scheme.<p>I&#x27;m especially interested in seeing implementations in other languages, including Java, C++, C#, Haskell, OCaml, Clojure, Racket, Erlang, Pascal, Nim, PHP, Javascript, Julia, F# and any others you can think of.

no comments

no comments