Mouse (programming language): Difference between revisions

Content deleted Content added
No edit summary
mNo edit summary
Line 3:
Mouse was originally intended as a small, efficient language for [[microcomputer|microcomputers]] with limited memory. It is an interpreted, [[Stack (data structure)|stack]]-based language and uses [[Reverse Polish notation]]. In order to make an interpreter as easy as possible to implement, Mouse is designed so that a program is processed as a stream of characters, interpreted one character at a time.
 
The elements of the Mouse language consist of a set of (mostly) one-character symbols, each of which performs a specific function (see table below). Since variable names are limited to one character, there are only 26 possible variables in Mouse (named A-Z). Integers and characters are the only available data types.
 
Despite these limitations, Mouse includes a number of relatively advanced features, including:
Line 10:
* Loops
* Pointers
* Macros (subroutines (which may be recursive))
* Arrays
* Code tracing
 
The design of the Mouse language makes it ideal for teaching the design of ana simple interpreter. Much of the book describing Mouse<ref name="grogono2" /> is devoted to describing the implementation of two interpreters, one in Z80 assembly language, the interpreterother in Pascal.
 
==Detailed Description==
Line 30:
|-
| <space>
| No action.
|-
|align="center"| $
| End of program.
|-
| <number>
| Push <number> on theonto stack.
|-
|align="center"| +
Line 155:
====Output====
 
Mouse may print integers, characters, or string constants, as shown in these examples. If an exclamation point appears in a string constant, a carriagenew returnline is printed.
<pre>
X. ! ~ recall number X and print it
Line 213:
* [http://www.geocities.com/fullerhaparnoldafmil/mouse.html The Great MOUSE Programming Language Revival]
* [http://cth.dtdns.net/mouse/ Friends of the Mouse]
* [http://www.primepuzzle.com/mouse/mouse.html Mouse, the Language]
* [http://mouse.davidgsimpson.com Mouse: Computer Programming Language] (includes source code for Mouse interpreters)
* [http://mouse.sourceforge.net/ Information on sourceforge.net]