Popular recipes tagged "language" but not "dict"http://code.activestate.com/recipes/tags/language-dict/2016-12-11T16:28:50-08:00ActiveState Code RecipesSimulate C's switch statement (Python)
2016-12-11T16:28:50-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580730-simulate-cs-switch-statement/
<p style="color: grey">
Python
recipe 580730
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/c/">c</a>, <a href="/recipes/tags/features/">features</a>, <a href="/recipes/tags/language/">language</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/switch/">switch</a>).
</p>
<p>This recipe shows a Python construct that can behave somewhat like C's switch statement. It is not a perfect one-to-one simulation. But it does have some of the features of the C switch. One feature not supported is the fall-through feature in C's switch.</p>
small stack language (Python)
2013-07-22T23:53:44-07:00Andrew Wayne Teesdale Jr.http://code.activestate.com/recipes/users/4187305/http://code.activestate.com/recipes/578617-small-stack-language/
<p style="color: grey">
Python
recipe 578617
by <a href="/recipes/users/4187305/">Andrew Wayne Teesdale Jr.</a>
(<a href="/recipes/tags/language/">language</a>, <a href="/recipes/tags/stack/">stack</a>).
</p>
<p>a small language in python</p>
TRAC Interpreter -- Sixties programming language (Python)
2010-08-22T19:05:09-07:00Jack Trainorhttp://code.activestate.com/recipes/users/4076953/http://code.activestate.com/recipes/577366-trac-interpreter-sixties-programming-language/
<p style="color: grey">
Python
recipe 577366
by <a href="/recipes/users/4076953/">Jack Trainor</a>
(<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/educational/">educational</a>, <a href="/recipes/tags/interpreter/">interpreter</a>, <a href="/recipes/tags/language/">language</a>, <a href="/recipes/tags/trac/">trac</a>).
</p>
<p>A Python implementation of an interpreter for the TRAC programming language developed by Calvin Mooers in the early 1960s. This implementation reconstructs Mooers' original algorithm in Python and supports only a limited number of TRAC primitives for demonstration purposes.</p>
TRAC Interpreter - Dragon style (Python)
2010-09-20T00:42:21-07:00Jack Trainorhttp://code.activestate.com/recipes/users/4076953/http://code.activestate.com/recipes/577396-trac-interpreter-dragon-style/
<p style="color: grey">
Python
recipe 577396
by <a href="/recipes/users/4076953/">Jack Trainor</a>
(<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/educational/">educational</a>, <a href="/recipes/tags/interpreter/">interpreter</a>, <a href="/recipes/tags/language/">language</a>, <a href="/recipes/tags/lexical_analyzer/">lexical_analyzer</a>, <a href="/recipes/tags/trac/">trac</a>).
</p>
<p>I've rewritten the TRAC interpreter from <a href="http://code.activestate.com/recipes/577366/">Recipe 577366</a> using a modern recursive descent style based on the Dragon book's lexer/parser model at the end of "Compliers: Principles, Techniques and Tools," Chapter 2, by Aho, Sethi, Ullman (1986).</p>
TRAC Interpreter - Class and Stack version (Python)
2010-09-20T01:16:07-07:00Jack Trainorhttp://code.activestate.com/recipes/users/4076953/http://code.activestate.com/recipes/577397-trac-interpreter-class-and-stack-version/
<p style="color: grey">
Python
recipe 577397
by <a href="/recipes/users/4076953/">Jack Trainor</a>
(<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/educational/">educational</a>, <a href="/recipes/tags/interpreter/">interpreter</a>, <a href="/recipes/tags/language/">language</a>, <a href="/recipes/tags/lexical_analyzer/">lexical_analyzer</a>, <a href="/recipes/tags/trac/">trac</a>).
</p>
<p>This is my third and final version of the Trac Interpreter from <a href="http://code.activestate.com/recipes/577366/">Recipe 577366</a>. It processes the character stream into appropriate class objects and stores these objects on a stack.</p>