The One Lab

In-system Programming Language for Android

Character space

Easy keys

0-9
qwertyuiop
asdfghjkl
zxcvbnm,
@.

Shifted keys

!@#$%^&*()
[tab]\`_-+=
\|\\{}:;"'
[]<>?
~/

Features

Predefined Classes

Object

String

Operators

Example

class Person extends Object
var Person.name

method Person.construct name_
  "Constructor. Contains a description of the class as well."
  name = name_             ;; Big fat comment. So there.
end

method Person.showName
  "Open a dialog box with our name in it."
  send "com.android.messageBox" "SHOW" name
end

method Person.verifyName
  "Open a dialog box asking to verify the person's name."
  return send "com.android.messageBox" "OK" name
end

var person = new Person "June"
person.showName
person.verifyName

Actual Grammar

class_definition := 
    CLASS classname
    | CLASS classname EXTENDS classname '\n'
    ;

variable_definition :=
    VAR varname
    | VAR varname '=' expression '\n'
    | VAR classname '.' varname '\n'
    | VAR classname '.' varname '=' expression '\n'
    ;

method_definition :=
    METHOD methodname '\n' block END '\n'
    | METHOD methodname parameterlist '\n' block END '\n'
    | METHOD classname '.' methodname '\n' block END '\n'
    | METHOD classname '.' methodname parameterlist '\n' block END '\n'
    ;

block :=
    statement '\n' statement
    | statement '\n'
    ;

expression :=
    '(' expression ')'
    | expression '+' expression
    | expression '-' expression
    | expression '*' expression
    | expression '/' expression
    | expression '@' expression
    | expression '**' expression
    | expression '^' expression
    | varname '=' expression
    | expression '==' expression
    | expression '!=' expression
    | expression '<=' expression
    | expression '>=' expression
    | expression '<' expression
    | expression '>' expression
    | expression AND expression
    | expression OR expression
    ;

statement :=
    varname '.' methodname '\n'
    | varname '.' methodname parameterlist '\n'
    | ifblock
    | whileblock
    | switchblock
    | forblock
    ;

parameterlist :=
    varname ',' varname
    | varname
    ;

ifblock :=
    IF expression '\n' block END '\n'
    | ifblock ELSE ifblock '\n'
    | IF expression '\n' block ifblock '\n'
    | ifblock ELSE expression '\n' block END '\n'
    ;

whileblock :=
    WHILE expression '\n' block END '\n'
    ;

switchblock :=
    SWITCH varname '\n' caseblock* END '\n'
    ;

caseblock :=
    CASE expression ':' '\n' block END '\n'
    ;

forblock :=
    FOR varname IN expression '\n' block END '\n'
    | FOR variable_definition IN expression '\n' block END '\n'
    ;