Historical Note

This page was migrated from the original p-nand-q.com site which was last updated in 2015. The content has been preserved exactly as it was, with only formatting updated for modern browsers. Over the coming days and weeks, the content will be reviewed and may be updated for accuracy and relevance. If you find any issues, please contact me.

gplz.((o))

The syntax reads as follows:

FILE = SEQUENCE
SEQUENCE = '(' OBJECT [{ (',' OBJECT) }] ')'.
OBJECT = '(' OBJECTDEF ')'.
OBJECTDEF = ASSIGNMENT | WHILE | IF | WHILE_UNLESS | UNTIL_DO |
    IF_ELSE | IF_UNLESS | IF_PROVIDED | FUNCDEF | FUNCCALL | PRINT
    | EXPRESSION.
IF = 'IF ' OBJECT ' DO ' OBJECT.
WHILE = 'WHILE' OBJECT ' DO ' OBJECT.
WHILE_UNLESS = 'WHILE ' OBJECT ' DO ' OBJECT ' UNLESS ' OBJECT.
UNTIL_DO = 'UNTIL ' OBJECT ' DO ' OBJECT.
IF_ELSE = 'IF ' OBJECT ' THEN ' OBJECT ' ELSE ' OBJECT.
IF_UNLESS = 'IF ' OBJECT ' THEN ' OBJECT ' UNLESS ' OBJECT.
IF_PROVIDED = 'IF ' OBJECT ' THEN ' OBJECT ' PROVIDED ' OBJECT.
PRINT = '<<' EXPRESSION.
ASSIGNMENT = VARIABLE ('='|'+='|'-='|'*='|'/='|'%='|'|='|'&=')
    (('(' EXPRESSION ')') | NAME).
FUNCDEF = NAME '(' [NAME {',' NAME}] ')=' SEQUENCE.
FUNCCALL = NAME '(' [EXPRESSION {',' EXPRESSION}] ')'
EXPRESSION = OP0 {('<'|'=='|'>'|'<='|'>='|'!=') OP0}. ')'.
OP0 = OP1 {('+'|'-')OP1}.
OP1 = OP2 {('*'|'/'|'%')OP2}.
OP2 = OP3 {('|')OP3}.
OP3 = OP4 {('&')OP4}.
OP4 = ['!'] ('(' EXPRESSION ')' | '(' FUNCCALL ')' | VARIABLE | LITERAL).
LITERAL = DECINT.
NAME = CHAR { CHAR | DIGIT }.
CHAR = 'a' .. 'z'.
DIGIT = '0' .. '9'.
DECINT = DIGIT {DIGIT}.

Some point to notice:

  • .((o)) files contain a lot of brackets, hence the name.

New statements as of revision 1.4

'.<<' = Print integer as char 
WHILE-x DO-y ELSE-z = The name is a give-away 
FOR x IN y DO z = x is the name of a variable. y is an integer or a variable. z is the expression to execute.

Example

Hello, .((o)) World

# HELLO, WORLD in .((o))

(((<<"Hello, World")

Brackets rule. The following programm will print the first 20 fibonacci numbers

# FIBONACCI in .((o))
((f(x)=((i=x),(j=x),(c=(x-x))),((f(1)),
(WHILE (c<20) DO 
            
    ((<<j),(h=(j+i)),(j=i),(i=h),(c+=1))

The code is so obvious, I could have named this language "easy", but "((o))" is a much cooler name for a programming language.