while searching for ideas for a story generator I found this example with a syntax completely new to me and I would like to understand what is happening here. It works in SWI Prolog swipl.
First it says
% Generate a random story from productions of form Nonterminal=>Expression
so I guess the atoms like
start generate text with the expression on the right side.
to do so it redefines the operator
:-op(600, xfy, =>).
or what is its puspose ?
What happens especiall in these kind of clauses, eseciall the * and + operators on atoms and strings inside the brackets?
start=>'Earth'*(catestrophe + science + attack + collision). catestrophe=>(('burns up' + 'freezes' + 'falls into the sun') *'and' *possible_megadeath ).
Could not find anything about it but may be I am looking in the wrong places? Any help appreciated!
Many thanks, C.