26.09.2013 Views

Transformation of Applicative Specifications into Imperative ...

Transformation of Applicative Specifications into Imperative ...

Transformation of Applicative Specifications into Imperative ...

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.

}<br />

r e s u l t . append ( ".>" ) ;<br />

F.2. VISITOR MODULES<br />

public void visitEnumeratedMapExpr ( EnumeratedMapExpr<br />

enumeratedMapExpr ) {<br />

r e s u l t . append ( " [ " ) ;<br />

enumeratedMapExpr . value_expr_pair_list ( ) . accept ( this ) ;<br />

r e s u l t . append ( " ] " ) ;<br />

}<br />

public void visitComprehendedMapExpr ( ComprehendedMapExpr<br />

compMapExpr) {<br />

r e s u l t . append ( " [ " ) ;<br />

compMapExpr . value_expr_pair ( ) . accept ( this ) ;<br />

r e s u l t . append ( " | " ) ;<br />

for ( Typing ty : compMapExpr . t y p i n g _ l i s t ( ) . g e t L i s t ( ) ) {<br />

ty . accept ( this ) ;<br />

r e s u l t . append ( " , " ) ;<br />

}<br />

i f (compMapExpr . t y p i n g _ l i s t ( ) . l e n ( ) > 0) {<br />

r e s u l t . d e l e t e ( r e s u l t . l ength ( ) − 2 , r e s u l t . length ( ) ) ;<br />

}<br />

compMapExpr . r e s t r i c t i o n ( ) . accept ( this ) ;<br />

r e s u l t . append ( " ] " ) ;<br />

}<br />

public void v i s i t V a l u e E x p r L i s t ( ValueExprList v e l ) {<br />

for ( ValueExpr ve : v e l . value_expr_list ( ) . g e t L i s t ( ) ) {<br />

ve . accept ( this ) ;<br />

r e s u l t . append ( " , " ) ;<br />

}<br />

i f ( v e l . value_expr_list ( ) . l e n ( ) > 0) {<br />

r e s u l t . d e l e t e ( r e s u l t . l ength ( ) − 2 , r e s u l t . length ( ) ) ;<br />

}<br />

}<br />

public void visitNoValueExprList ( NoValueExprList nvel ) {}<br />

public void v i s i t R e s t r i c t i o n ( R e s t r i c t i o n r e s t r i c t i o n ) {<br />

r e s u l t . append ( " : − " ) ;<br />

r e s t r i c t i o n . value_expr ( ) . accept ( this ) ;<br />

}<br />

public void v i s i t N o R e s t r i c t i o n ( NoRestriction n r e s t r i c t i o n ) {}<br />

public void v i s i t V a l u e E x p r P a i r ( ValueExprPair vep ) {<br />

vep . f i r s t ( ) . accept ( this ) ;<br />

r e s u l t . append ( " +> " ) ;<br />

vep . second ( ) . accept ( this ) ;<br />

545

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

Saved successfully!

Ooh no, something went wrong!