Dots
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
The Dots programming language is a language that only uses the characters .
, :
, and ;
.
Syntax
A Dots program is mainly composed of dots, colons, and semicolons, imposing the structure within which the arguments are evaluated.
A series of dots (.
) introduces and identifies the command, while the colon (:
) serves to designate a following argument. Every instruction terminates in an imperative semicolon (;
).
The following Extended Backus-Naur Form (EBNF) specification shall imbue the syntaxis' stipulations with enhanced stringency:
program := { command | padding } , halt , padding ; command := halt | print | defineVariable ; halt := ".;" ; print := ".." , ( identifier | stringLiteral ) , ";" ; defineVariable := "..." , ":" , identifier , ":" , stringLiteral , ";" ; stringLiteral := { character - ";" } ; identifier := identifierChar , { identifierChar } ; identifierChar := character - ( whitespace | reservedSymbol ) ; reservedSymbol := "." | ":" | ";" ; padding := { whitespace } ; whitespace := " " | "\t" | "\n" ;
Commands
All programs must be ended with the end program command and all commands must end with a semicolon.
Command | Arguments | What it does | Pattern |
---|---|---|---|
.
|
0 | End a program. | .;
|
..
|
1 | Print to the screen. The argument must either be an already defined variable name, in which case its content is inserted, or an arbitrary character sequence, except for the semicolon (; ), to be employed ipsissima verba.
|
..:variableOrText;
|
...
|
2 | Define a variable, the name of which derives from the first argument, and its value from the second. The name must be an identifier comprised of one or more graphical characters, except for . , : , ; , or whitespaces; the value may be any character sequence barring the semicolon (; ).
|
...:variableName:content;
|
Examples
Hello World!
This is the hello world program in this language:
..:Hello World!; .;
Hello, World! Using Variables
This program employs a variable in order to print the message “Hello, World!”:
...:greeting:Hello, World!; ..:greeting; .;
Interpreter
- Common Lisp implementation of the Dots programming language.