28.01.2015 Views

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

user{exception constant{parameters minimum::=minimumminimum{typestate ::=constant([component{name[,component{name]... ]) AppendixA.<strong>Hermes</strong>ConcreteSyntax145<br />

key ::=exceptionuser{exception{nameexception{typestate<br />

Attributeconstructions: case{declaration ::=([formal{variable[,formal{variable]...])<br />

attribute{construction component{declaration ::=constraint( ::=named{literal!component{declaration ::=declaration component{typestate<br />

(e.g.variants,tables,inports).Inaformaltypestatespecication,eachattributeargumentistakentobeacomponentofanassumedbasevariable<br />

attribute::=attribute{nameattribute{arguments formal{typestate formal{attribute typestate::=f[attribute[,attribute]...]g specicationconsistsofacollectionofattributes,eachofwhichincludesan attributename<strong>and</strong>alistofarguments.Formaltypestatesappearinthe unwrap<strong>and</strong>for...inspectstatements,<strong>and</strong>inseveraltypeconstructions Typestatespecicationsappearinattributeconstructions.Atypestate )isconstraint{typestateconstraint{expression [declaration[,declaration]...]<br />

whichdependsonthecontext.<br />

Argumentlistsappearinvariouscontexts,includingcallstatements<strong>and</strong> typestateattributes.Theymatchactualargumentstoparameters.Positionalmatchingisachievedwithacomma-separatedlistofarguments.A<br />

keyword-basedargumentslistexplicitlyincludestheparameternamesso ::=f[formal{attribute[,formal{attribute]...]g<br />

thatpositionisunimportant. allowedasanargument. Thevarioustypesofargumentlistsaredistinguishedonlybywhatis ::=attribute{nameformal{attribute{arguments

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!