Methods = (? | MethodDef ?)*
MethodDef = ClassName ? <'::'> MethodSelector ArgList (? <'='> ? MethodBody)? ? <'.'>
MethodSelector =QuerySelector | UpdateSelector QuerySelector = #'\w+' UpdateSelector = #'\w+!'
MethodBody = Expr = SingleItemExpression | MessageExpression | BinaryExpression = ObjName | Number | StringLiteral | DoBlock ObjName = #'[A-Za-z_]\w*' = IntNumber | FloatNumber IntNumber = #'[1-9][0-9]*' FloatNumber = #'[0-9]+.[0-9]+' StringLiteral = #'\"["]*\"'
MessageExpression = ObjName <'.'> MethodSelector ArgList BinaryExpression = <'('> Expr ? Op ? Expr <')'>
Op = ArithmeticOp | BooleanOp | ComparisonOp = '+' | '-' | '*' | '/' | '%' | '**' = '&' | '|' = '==' | '!=' | '<' | '>' | '<=' | '>=' ArgList = <'()'> | <'('> ArgName (',' ? ArgName)* <')'> ArgName = #'[A-Za-z_]\w*' = #'\n' = #'\s+' ClassName = #'[A-Z]\w*'
DoBlock = <'[<'> (DoLine )* <'>]'>
= | Assignment | MessageExpression <'.'>
Assignment = ? ObjName ? <':='> ? Expr <'.'>