Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you're looking into writing stand-alone DSLs, then you're looking into building compilers--no way around it. Compiler construction <em>is</em> essential programming knowledge, and it's really not as difficult as commonly thought. Steve Yegge's <a href="http://steve-yegge.blogspot.com/2007/06/rich-programmer-food.html" rel="noreferrer">Righ Programmer Food</a> summarizes the value of knowing how to build compilers quite nicely.</p> <p>There are plenty of ways to get started. I recommend checking out the 2 papers mentioned in the article: <a href="http://prog21.dadgum.com/30.html" rel="noreferrer">Want to write a compiler? Just read these Two papers</a>. The first one, <a href="http://compilers.iecc.com/crenshaw/" rel="noreferrer">Let's build a compiler</a>, is very accessible. It uses Turbo Pascal as an implementation language, but you can easily implement it in any other language--the source code is very clear. Pascal is a simple language.</p> <p>Once you get a good feel for how things work and the terminology involved, I recommend delving into something like <a href="http://www.antlr.org" rel="noreferrer">ANTLR</a>. ANTLR has a nice IDE, <a href="http://www.antlr.org/works/index.html" rel="noreferrer">ANTLRWorks</a>, that comes with an interpreter and a debugger. It also produces really really good visualizations of your grammars on the fly. I found it invaluable in learning.</p> <p>ANTLR has several good tutorials, although they might be a bit overwhelming at first. <a href="http://javadude.com/articles/antlrtut/" rel="noreferrer">This one</a> is nice, although it's against ANTLR 2.0, so you might run into incompatibilities with a more recent version (currently the latest is 3.1).</p> <p>Finally, there's another approach to DSLs: The Lisp approach. Given Lisp's syntax-less nature (your code is basically abstract syntax trees), you can shape endless languages out of it, provided you get used to the parentheses :).</p> <p>If you do go with that approach, you want to use an embeddable Lisp. Under Java, you have <a href="http://clojure.org/" rel="noreferrer">Clojure</a>, a Lisp dialect that interoperates flawlessly with JVM and its libraries. I haven't used it personally, but it looks good. For Scheme, there's GNU <a href="http://www.gnu.org/software/guile/" rel="noreferrer">Guile</a>, which is <a href="http://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Guile-License.html" rel="noreferrer">licensed under LGPL</a>. For Common Lisp, there's <a href="http://ecls.sourceforge.net/" rel="noreferrer">ECL</a>, also under the LGPL. Both use a C interface for interoperability, so you can pretty much embed them into any other language. ECL is unique among Lisps in that each Lisp function is implemented as a C function, so you can write Lisp code in C if you want to (say, inside your own extensions methods--you can create C functions that operate on Lisp objects, and then call them from Lisp). I've been using ECL for a side-project of mine for a while, and I like it. The maintainer is quite active and responsive.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload