% $Id$
%
% Abstract syntax for beCecil (untyped version)
%
% AUTHOR: Gary T. Leavens

module beCecil_abstract_syntax.

%%%%%%%%%%% syntactic categories.
kind program		type.
kind block		type.
kind decl		type.
kind generic_fun_attr	type.
kind formal		type.
kind typeExpr		type.
kind expression		type.
kind classAndType	type.
kind actual_argument	type.

%%%%%%%%%% syntax itself
type prog		(list decl) -> block -> program.

type begin		(list decl) -> expression -> block.

type objectDecl		string -> decl.
type inheritsDecl	string -> string -> decl.
type hasDecl		string -> generic_function -> decl.
type hideDecl		(list decl) -> (list decl) -> decl.
type typeDecl		string -> decl.
type subtypeDecl	string -> typeExpr -> decl.
type conformsDecl	string -> typeExpr -> decl.

type namedGF		string -> generic_fun_attr.
type method		(list formal) -> block -> generic_fun_attr.
type storage		(list formal) -> expression -> generic_fun_attr.
type acceptor		(list formal) -> string -> block -> generic_fun_attr.
type combinaton		generic_fun_attr -> generic_fun_attr
				-> generic_fun_attr.

type atColon		string -> string -> typeExpr -> formal.

type tn			string -> typeExpr.
type arrow		(list typeExpr) -> typeExpr -> typeExpr.
type assignable		(list typeExpr) -> typeExpr -> typeExpr.
type exact		(list exactType) -> typeExpr.
type conjunction	(list typeExpr) -> typeExpr.
type disjunction	(list typeExpr) -> typeExpr.

type exactInvocable	(list typeExpr) -> typeExpr -> typeExpr.
type exactAssignable	(list typeExpr) -> typeExpr -> typeExpr.

type colon		string -> typeExpr -> classAndType.

type varExpr		string -> expression.
type applyExpr		expression -> (list actual_argument) -> expression.
type assignExpr		expression -> (list actual_argument) -> expression.
type sequenceExpr	(list expression) -> expression.

type arg		expression -> actual_argument.
type directed		expression -> (list string) -> actual_argument.
