29.11.2012 Views

MetaFun - Pragma ADE

MetaFun - Pragma ADE

MetaFun - Pragma ADE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

〈if test〉<br />

→ if 〈boolean expression〉 : 〈balanced tokens〉 〈alternatives〉 fi<br />

〈alternatives〉<br />

→ 〈empty〉<br />

〈loop〉<br />

| else : 〈balanced tokens〉<br />

| elseif 〈boolean expression〉 〈:〉 〈balanced tokens〉 〈alternatives〉<br />

→ 〈loop header〉 : 〈loop text〉 endfor<br />

〈loop header〉<br />

→ for 〈symbolic token〉 = 〈progression〉<br />

| for 〈symbolic token〉 = 〈for list〉<br />

| for 〈symbolic token〉 within 〈picture expression〉<br />

| forsuffixes 〈symbolic token〉 = 〈suffix list〉<br />

| forever<br />

〈progression〉<br />

→ 〈numeric expression〉 upto 〈numeric expression〉<br />

| 〈numeric expression〉 downto 〈numeric expression〉<br />

| 〈numeric expression〉 step 〈numeric expression〉 until 〈numeric expression〉<br />

〈for list〉<br />

→ 〈expression〉<br />

| 〈for list〉 , 〈expression〉<br />

〈suffix list〉<br />

→ 〈suffix〉<br />

A.2 Left overs<br />

| 〈suffix list〉 , 〈suffix〉<br />

There are a few more concepts and commands available in METAFUN, like color remapping, shading<br />

and graphic inclusion. Because they have their own small syntax world, we present them<br />

here.<br />

You may consider shades to be internally represented by a hidden datastructure. The end user has<br />

access to a shade by means of a pointer, expressed in a numeric.<br />

〈pseudo procedure〉<br />

→ linear\_shade ( 〈path expression〉 , 〈numeric expression〉 , 〈color expression〉 , 〈color expression〉 )<br />

| circular\_shade ( 〈path expression〉 , 〈numeric expression〉 , 〈color expression〉 , 〈color expression〉 )<br />

Left overs METAPOST syntax<br />

331

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

Saved successfully!

Ooh no, something went wrong!