- Program = Extends { FuncDecl? | NativeDecl? | Comment | Sentence}
- Sentence = { Block | While | For | If | Return | ExprS | Forin | Comment | Break }
- Comment = { /*... */ | // ... }
- Extends = { 'extends' ResourceVal? ';'}?
- ExprS = Expr ';'
- Expr = { LVal ( '=' | '+=' | '-=') }? RVal
- RVal
OrEx
{}
'||
OrEx
OrEx
AndEx
{}
'&&
AndEx
AndEx
IsEx
{}
|
'!=
'==
'>=
'<=
'>
'<
IsEx
IsEx
CompEx
[]
'is
ResourceVal
CompEx
ASEx
{}
|
'+
'-
ASEx
ASEx
MDEx
{}
|
'*
'/
'%
MDEx
MDEx
[]
|
'-
'!
Una
|Una
IncEx
Const
Par
NewObj
IncEx
LVal
[]
|
'++
'--
NewObj
'new
ResourceVal
'(
ArgList
')
Par
'(
Expr
')
Const
|
'null
'NUM
'STRING
LVal
LValE
{}
'.
LValE
LValE
|
'SYMBOL
'constructor
[]
'(
ArgList
')
ResourceVal
'SYMBOL
{}
'.
'SYMBOL
[]ArgList
Expr
{}
',
Expr
Block
'{
{}
Sentence
'}
Forin
'for
'(
LVal
'in
Expr
')
Sentence
While
'while
'(
Expr
')
Sentence
For
'for
'(
Expr
';
Expr
';
Expr
')
Sentence
Break
'break
';
If
'if
'(
Expr
')
Sentence
[]
'else
Sentence
Return
'return
[]
Expr
';
FuncDecl
|
'function
'constructor
'destructor
'SYMBOL
'(
VArgList
')
VarBlock
NativeDecl
'native
'SYMBOL
';
[]VArgList
'SYMBOL
{}
',
'SYMBOL
VarBlock
'{
{}
VarDecl
{}
Sentence
'}
VarDecl
'var
VArgList
';
|