Here is the complete definition of AS in AS. Notice that for bootstrapping reasons, the current version of AS is defined in Metal. This explains also why the identifiers used in this definition comply with the Metal rules, i.e. phyla are in upper case and operator in lower case letters.
abstract syntax of as is program : ID # DEFINITION -> PROGRAM; declaration_s : DECLARATION * -> DECLARATION_S; extends : ID # DECLARATION_S -> DEFINITION; DECLARATION_S < DEFINITION; line : -> DECLARATION; operator : ID_S # SIGNATURE -> DECLARATION; phylum : ID # TID_S -> DECLARATION; inclusion : TID # INCL -> DECLARATION; sinclusion : ID # INCL -> INCLUSION; ID < INCL; id : string -> ID; tid : ID # ID -> TID; ID < TID; id_s : ID+ -> ID_S; tid_s : TID* -> TID_S; signature : DOMAIN # ID -> SIGNATURE; #string, #integer, #tree : -> DOMAIN; star_list_of, plus_list_of : TID -> DOMAIN; prod : TID* -> DOMAIN; lamb : TID # TID # TID -> DOMAIN; end as;