ExpCmList -> Expression ["," ExpList]
ArrCmList -> [LeftValue "<-"] Expression ["," ArrList]
CaseList -> LeftValue ":" Expression ";" [CaseList]
DoList -> ([LeftValue "="]Expression | LeftValue "::" TypeDes ) ";" [DoList]
WhereList -> (FuncHead | FuncBody) ";" [WhereList]
Exp0 -> <constant>
Exp0 -> FuncName
Exp0 -> "(" [ExpCmList] ")"
Exp0 -> "[" [ExpCmList] "]"
Exp0 -> "[" Expression "|" ArrCmList "]"
Exp0 -> "case" Expression "of" CaseList "end"
Exp0 -> "do" DoList "end"
Exp1 -> Exp0
Exp1 -> Exp1 Exp0
Exp2 -> Exp1
Exp2 -> Exp2 Operator Exp1 /*压缩*/
Exp3 -> Exp2
Exp3 -> Exp3 "'" <identifier> "'" Exp2
Expression -> Exp3
Expression -> Expression ["where" WhereList "end"]
LeftCmList -> LeftValue ["," LeftCmList]
Left0List -> LeftValue0 [Left0List]
LeftValueA -> <identifier>
LeftValueB -> <constant>
LeftValueB -> "(" LeftCmList ")"
LeftValueB -> "[" LeftCmList "]"
LeftValue0 -> LeftValueA | LeftValueB
LeftValue1 -> LeftValueB
LeftValue1 -> LeftValueA [Left0List]
LeftValue -> LeftValue1 [":" LeftValue]
Type0 -> "(" TypeDes ")"
Type0 -> <identifier>
Type1 -> Type0
Type1 -> Type1 Type0
Type2 -> Type1
Type2 -> Type2 "->" Type1
TypeDes -> Type2
TypeDes -> TypeDes "|" Type2
Prereq -> <identifier> [<identifier>] "," [Prereq]
FuncHead -> FuncName "::" [Prereq] TypeDes
FuncBody -> FuncName Left0List "=" (Expression | "linking" <string>)
FuncName -> <identifier>
FuncName -> "(" Operator ")"
FnList -> FuncName [FnList]
Operator -> <operator>
Operator -> "$" <identifier> "$"
IdDotList -> <identifier> ["." IdDotList]
IdList -> <identifier> [IdList]
ImportDecl -> "import" IdDotList
TypeDecl -> "type" <identifier> [IdList]["=" TypeDes]
ClassDecl -> "class" <identifier> <identifier> "where" WhereList "end"
InstDecl -> "instance" <identifier> <identifier> ["where" WhereList "end"]
ModuleDecl -> "module" <identifier> "exports" FnList "where" DeclList "end"
Decl -> (ImportDecl | TypeDecl | ClassDecl | InstDecl | ModuleDecl | FuncHead | FuncBody) ";"
DeclList -> Decl [DeclList]
Program -> ModuleDecl ";"
posted on 2008-04-20 20:50
陈梓瀚(vczh) 阅读(1856)
评论(3) 编辑 收藏 引用 所属分类:
Vczh Lazy Script