1. val sentencegrammar = Grammar[
  2. >> ("start", [[S "dialog", T "\n\n", S "conclusion"],
  3. [S "dialog", T "\n", S "canned laughter"]]),
  4.  
  5. >> ("dialog", [[S "name", T ": ", S "question", T "\n",
  6. S "name", T ": ", S "reply"]]),
  7.  
  8. >> ("name", [[S "name", S "namesuffix"],
  9. [S "adjective", T " ", S "name"],
  10. [T "Jakob"],
  11. [T "Bamse"]]),
  12.  
  13. >> ("question", [[T "Do you happen to know the ", S "object", T "?"]]),
  14.  
  15. >> ("reply", [[S "expletive", T " ", S "refusal", T "!"],
  16. [S "refusal", T "."]]),
  17.  
  18. >> ("canned laughter", [[T "Hahahaha!"],
  19. [T "*cackle*"],
  20. [T "Mwahahah!"]]),
  21. >> ("refusal", [[T "no"],
  22. [T "naw"]]),
  23.  
  24. >> ("expletive", [[T "Fuck"],
  25. [T "Hell"],
  26. [T "Shit"]]),
  27.  
  28. >> ("adjective", [[S "adjectives", T " ", S "adjective"],
  29. [S "adjectives"]]),
  30.  
  31. >> ("adjectives", [[T "Pretty"],
  32. [T "Handsome"],
  33. [T "Flexible"],
  34. [T "Relaxed"],
  35. [T "Stoic"],
  36. [T "Yellow"],
  37. [T "Mystic"],
  38. [T "Strong"],
  39. [T "Pitiful"]]),
  40.  
  41. >> ("object", [[S "adjective", T " ", S "objects", T " of ", S "placename"],
  42. [S "objects"]]),
  43.  
  44. >> ("objects", [[T "potted plant"],
  45. [T "earthworm"],
  46. [T "grappling hook"],
  47. [T "dinosaur"],
  48. [T "SML-interpreter"]]),
  49.  
  50. >> ("placename", [[T "Paris"],
  51. [T "DIKU"],
  52. [T "Roskilde"],
  53. [S "placename", T " Dyrskue"]]),
  54.  
  55. >> ("namesuffix", [[T " of ", S "placename"],
  56. []]),
  57.  
  58. >> ("conclusion", [[T "That's all, folks!"]])
  59. ];