Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>My take on this is that the simpler approach is not to mess with the hardcore tools intended to automate creation of lexers and parsers but rather to embark on creating a simple <em>interpreter</em> of a reasonably simple syntax, for which the parser could be written by hand &mdash; involving a simple state machine.</p> <p>I'd say an almost ideal interpreted language for the task is <a href="http://www.tcl.tk" rel="nofollow">Tcl</a>, with the reasons for this being:</p> <ul> <li><p>Super-simple syntax (almost absense of it): the syntax mostly defines grouping of characters into words.</p> <p>A set of words parsed from a source line of the script being processed is then interpreted this way: the first word is the name of a command and the rest of them are positional arguments to that command. Get the quick overview of it <a href="http://en.wikipedia.org/wiki/Tcl" rel="nofollow">on Wikipedia</a>.</p></li> <li><p>Everything is a string as interpretation of the arguments is in the hands of the commands processing them.</p></li> <li><p>It's possible to gradually make the interpreter more "beefy". For instance, for a start one might omit implementing variable substitutions (Tcl &lt; 2.0 did not have them) and all the advanced features (both syntactic and semantic, like namespaces). Likewise, it's possible to start with no commands or almost no commands available to the scripts of such a toy interpreter. Then they might be gradually added.</p></li> </ul> <p>You can get a quick sense of what Tcl is by working through its <a href="http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html" rel="nofollow">tutorial</a>. More documentation is <a href="http://www.tcl.tk/doc/" rel="nofollow">there</a>. You can get Tcl to play with it <a href="http://www.activestate.com/activetcl/activetcl-8-6" rel="nofollow">there</a>.</p> <p>You can ask for help on the <code>#tcl</code> IRC channel on <code>irc.freenode.net</code> and on the <code>comp.lang.tcl</code> newsgroup (available via Google Groups).</p>
    singulars
    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.
 

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