Electronic Poetry - Round 17 : New syntax !


Yeah ! I have been testing the new syntax. It is great ! However, at times, the grammar is still complicated to read though...

This morning work :

It is a swamp planet, with carnivorous plant life
It is a oceanic planet, with algae life
It is a swamp planet, with fungi life
It is a oceanic planet, covered with islands
It is a desert planet, covered with dunes

The text are not very interresting. But  the generation process, much more : a planet type (oceanic) is choosen. Then from this type a feature (algae) and feature type (life) is choosen.  The way the feature is described in the final output depends on  the feature type.



The code looks like this :

// Planetary Features - Learning new Syntax
#Planet
    #SetPlanet(§PlanetDesc)
,    #Print(§PlanetDesc)
 
#Print(param1)
    It is a &@param1¤Type planet, ~DescribeFeature(&@param1¤FeatureType, &@param1¤Feature)
    
~DescribeFeature(param1)
    life:with @param1 life
    land:covered with @param1
 
#SetPlanet(param1)
    *@param1¤Type(#PlanetType)
,    #SetPlanetFeature(&@param1¤Type,@param1)
    
#PlanetType
    swamp
    desert
    oceanic
    
#SetPlanetFeature(PlanetType, param1)
    *@param1¤Feature( #§Set@PlanetType¤Feature(@param1¤FeatureType) )
 
#SetswampFeature(param1)
    fungi/*@param1(life)
    carnivorous plant/*@param1(life)
    bog/*@param1(swamp)
 
#SetdesertFeature(param1)
    cactus/*@param1(life)
    oasis/*@param1(land)
    dunes/*@param1(land)
 
#SetoceanicFeature(param1)
    whales/*@param1(life)
    algae/*@param1(life)
    islands/*@param1(land)

Leave a comment

Log in with itch.io to leave a comment.