19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LocalVarWTypes ::= LocalVarWType<br />

| ( LocalVarWType (, LocalVarWType) + )<br />

LocalVarWType ::= [var ] Id IsType<br />

LocalVarWoTypes ::= LocalVarWoType<br />

| ( LocalVarWoType ( , LocalVarWoType) + )<br />

LocalVarWoType ::= [var ] Id<br />

| Unpasting<br />

Unpasting ::= [ L-Elt (Paste L-Elt) ∗ ]<br />

L-Elt ::= Id [[ L-ArraySize ]]<br />

| Unpasting<br />

L-ArraySize ::= L-Extent (×L-Extent) ∗<br />

L-Extent ::= Expr<br />

| Expr : Expr<br />

| Expr # Expr<br />

Paste ::= (Whitespace | ; ) +<br />

UnitExpr ::= UnitRef<br />

| Expr UnitRef | Expr · UnitRef<br />

| Expr / UnitRef | Expr per UnitRef<br />

| Expr in UnitRef<br />

ExternalSyntax ::= syntax OpenExpander Id CloseExpander = Expr<br />

OpenExpander ::= Id | LeftEncloser<br />

CloseExpander ::= Id | RightEncloser | end<br />

AbsDecl ::= AbsTraitDecl<br />

| AbsObjectDecl<br />

| AbsFnDecl<br />

| AbsVarDecl<br />

| AbsDimUnitDecl<br />

| AbsTypeAlias<br />

| TestDecl<br />

| PropertyDecl<br />

| AbsExternalSyntax<br />

AbsTraitDecl ::= TraitHeader (AbsMdDecl | AbsCoercion | ApiFldDecl | PropertyDecl) ∗ end<br />

AbsObjectDecl ::= ObjectHeader (AbsMdDecl | AbsCoercion | ApiFldDecl | PropertyDecl) ∗ end<br />

AbsCoercion ::= [widening ]coercion [StaticParams](Id IsType)CoercionClauses<br />

ApiFldDecl ::= ApiFldMod ∗ Id IsType<br />

ApiFldMod ::= hidden | settable | UniversalMod<br />

AbsVarDecl ::= VarWTypes<br />

| VarWoTypes : TypeRef ...<br />

| VarWoTypes : SimpleTupleType<br />

AbsDimUnitDecl ::= dim Id [default Unit]<br />

| (unit | SI unit ) Id + [ : DimRef ]<br />

| dim Id (unit | SI unit ) Id +<br />

AbsTypeAlias ::= type Id [StaticParams]<br />

AbsExternalSyntax ::= syntax OpenExpander Id CloseExpander<br />

382

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

Saved successfully!

Ooh no, something went wrong!