Re: Maybe a much simpler syntax

From: Pat Thoyts (cng_at_mfcyng.serrfreir.pb.hx)
Date: 04/05/04


Date: Mon, 05 Apr 2004 01:35:17 GMT


"Iain B. Findleton" <findletoni@yahoo.com> writes:

>ulis wrote:
>> Hi,
>>
>> I found the Whitespace language have a very simple syntax: 3 logical
>> tokens, 5 commands.
>> The Whitespace tutorial is here:
>> http://compsoc.dur.ac.uk/whitespace/tutorial.php
>>
>> The beginning:
>> Whitespace tutorial
>>
>> The only lexical tokens in the whitespace language are Space (ASCII
>> 32), Tab (ASCII 9) and Line Feed (ASCII 10). By only allowing line
>> feed as a token, CR/LF problems are avoided across DOS/Unix file
>> conversions. (Um, not sure. Maybe we'll sort this in a later
>> version.).
>>
>> The language itself is an imperative, stack based language. Each
>> command consists of a series of tokens, beginning with the Instruction
>> Modification Parameter (IMP). These are listed in the table below.
>>
>> IMP Meaning
>> [Space] Stack Manipulation
>> [Tab][Space] Arithmetic
>> [Tab][Tab] Heap access
>> [LF] Flow Control
>> [Tab][LF] I/O
>>
>> The virtual machine on which programs run has a stack and a heap. The
>> programmer is free to push arbitrary width integers onto the stack
>> (only integers, currently there is no implementation of floating point
>> or real numbers). The heap can also be accessed by the user as a
>> permanent store of variables and data structures.
>>
>> Many commands require numbers or labels as parameters. Numbers can be
>> any number of bits wide, and are simply represented as a series of
>> [Space] and [Tab], terminated by a [LF]. [Space] represents the binary
>> digit 0, [Tab] represents 1. The sign of a number is given by its
>> first character, [Space] for positive and [Tab] for negative. Note
>> that this is not twos complement, it just indicates a sign.
>>
>> Labels are simply [LF] terminated lists of spaces and tabs. There is
>> only one global namespace so all labels must be unique.
>>
>> Have fun!
>>
>> ulis
>
>Just what I have been looking for. I am issuing a directive to all
>programmers that, effective immediately, whitespace is the language of
>development for all our products.
>
>Just think of what could be done if a browser plugin for this was
>available! It would make Microsoft stuff look secure!
>

Heh heh. Not too hard in fact. See BrainScript http://brainscript.sf.net/

-- 
Pat Thoyts          http://www.zsplat.freeserve.co.uk/resume.html
To reply, rot13 the return address or read the X-Address header.
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD


Relevant Pages

  • Re: Maybe a much simpler syntax
    ... > I found the Whitespace language have a very simple syntax: ... > tokens, 5 commands. ... > Many commands require numbers or labels as parameters. ...
    (comp.lang.tcl)
  • Re: Maybe a much simpler syntax
    ... > I found the Whitespace language have a very simple syntax: ... > tokens, 5 commands. ... > Many commands require numbers or labels as parameters. ...
    (comp.lang.tcl)
  • Re: Strategic Functional Migration and Multiple Inheritance
    ... Would C# be a "simpler" language by making all the keywords single ... tokens mean different things in different contexts, ... I'm not trying to argue this in metrics of information theory, ... I don't believe such metrics give a good idea of the readability of ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Line continuation in Perl
    ... whitespace isn't something that stands alone - otherwise it would still ... If every one is going to create his/her language, ... I do think Larry is addressing me in those last two sentences. ... Unless he's changing his mind on some particular things, ...
    (comp.lang.perl.misc)
  • Re: Case sensitivity in programming languages.
    ... have worked for many years with case insensitive software then encounter ... Thats why is most every language today case sensitive and no one ... case-insensitive languages are the only ones who see that case sensitivity ... if the grammer requires certain tokens to be of ...
    (comp.lang.php)

Loading