The GLoo Language

Script ::= [ Code ] 'let' Declarations 'in'  SingleValue 'end'

Declarations ::= { Declaration }*

Declaration ::= ['@'] Binder Binding | 'load' String

Binding ::= 'load' String | SingleValue

Form ::= '(||)' | Identifier | '(|' FormContexts '|)'

FormContexts ::= FormDereferences { [ Form ] }*

FormDereferences ::= FormRestrictions { '->' Label }*

FormRestrictions ::= FormExtensions { '\' Form }*

FormExtensions ::= PrimaryForm { '#' Form }*

PrimaryForm ::= FormBindings | Form [ ',' FormBindings ]

FormBindings ::= FormBinding { ',' FormBinding }*

FormBinding ::= Binder SingleValue

SingleValue ::= [ '$' ] SeqValue { [ Form ] }*

SeqValue ::= OrValue { ';' OrValue }*

OrValue ::= AndValue { '||' AndValue }*

AndValue ::= BitOrValue { '&&' BitOrValue }*

BitOrValue ::= XorValue { '|' XorValue }*

XorValue ::= BitAndValue { '^' BitAndValue }*

BitAndValue ::= EquivalenceValue { '&' EquivalenceValue }*

EquivalenceValue ::= RelationalValue { ('==' | '!=') RelationValue }*

RelationalValue ::= ShiftValue { ('<' | '<=' | '>' | '>=') ShiftValue }*

ShiftValue ::= AddValue { ('<<' | '>>' | '>>>') AddValue }*

AddValue ::= TimesValue { ('+' | '-') TimesValue }*

TimesValue ::= UnaryValue { ('*' | '/' | '%') UnaryValue }*

UnaryValue ::= [ '++' | '--' | '+' | '-' | '~' | '!' ] PrimaryValue [ '++' | '--' ]

PrimaryValue ::= LiteralValue | PrimaryPrefix { '->' Label }* [ '.' Label ] { PrimaryValue }*

PrimaryPrefix ::= Code [ ':'QualifiedId ] | Form | '(' '\' Formal '::' SingleValue ')' | '(' SingleValue ')' | 
                            'let' Declarations 'in' SingleValue 'end'

LiteralValue ::= 'epsilon' | Integer | Float | String | Character

Formal ::= ['@'|'$'] Label | '(' ')'

Binder ::= Label '='

Label ::= Identifier [ ':' Integer ] | '{' SingleValue '}'

Code ::= '%{' Java program text '}%' 

Identifier ::= (a-z,A-Z){a-z,A-Z,0-9,_}*

QualifiedId ::= Identifier { '.' Identifier }*

Integer ::= (0-9){0-9}*

Float ::= [ Integer ] . Integer | Integer . [ Integer ] 

String ::= '"' { all characters except " }* '"'

Character ::= ''' { all characters except ' }* '''
    

Last modified: 2007-05-30 — Markus Lumpe