Anonymous avatar Anonymous committed f1f5c42

Markdown fixes for README.

Comments (0)

Files changed (1)

 Zzrk - Adventures in the Great Unsaturated Grammar
-====
+==================================================
 
 What is it?
 -----------
 
 First, you need an implementation of Zz.  The only one I've found, and
 subsequently the one I've written Zzrk around, is OpenZz.  It can be
-gotten from http://openzz.sourceforge.net/.
+gotten from [http://openzz.sourceforge.net/](http://openzz.sourceforge.net/).
 
 Although OpenZz does have an interactive mode, it unfortunately assumes
 you're using Zz to describe a compiler.  Since I assume you'll want to
 happens), here's a guide to working around some of OpenZz's drawbacks.
 
 First, you can't just specify zzrk.zz as the input to ozz.  Instead,
-start OpenZz, then at the "ozz>" prompt, type
+start OpenZz, then at the `ozz>` prompt, type
 
     /include "zzrk.zz"
 
-You can then treat the "ozz>" prompt as the prompt for the adventure
+You can then treat the `ozz>` prompt as the prompt for the adventure
 game parser.  Try the usual actions, and see what happens.  Be forewarned
 that any unrecognizable command on your part -- an unknown verb, noun, or
 other part of speech -- will trigger a syntax error.  And, because OpenZz
 puzzles just to demonstrate that the standard adventure game furniture can
 be concocted in Zz.  Collecting treasures will get you points, and
 obtaining 50 points will win the game (that is, if you have 50 points and
-you type "score", you will get a message telling you that you have won.
+you type `score`, you will get a message telling you that you have won.
 You will still need to quit OpenZz through some other manual action, such
 as typing Ctrl-D, or causing syntax errors.)
 
 Comments
 --------
 
-I originally wrote zzrk.zz on November 21st, 2003.  I gave it actual
+I originally wrote `zzrk.zz` on November 21st, 2003.  I gave it actual
 puzzles, wrote this readme, and released it under a BSD license on
 May 6, 2007.
 
 A couple of annoying things about Zz...
 
-The documentation for OpenZz doesn't mention that the /if { } construct
-has a variant that takes an else clause.  And, /return does not actually
+The documentation for OpenZz doesn't mention that the `/if { }` construct
+has a variant that takes an `else` clause.  And, `/return` does not actually
 cause an immediate return, it only assigns a value to the nonterminal
 under consideration.  For these reasons, I was originally writing many of
-my tests twice (like /if a == b {} /if a != b {}).  Then I noticed, in
-examining the results of /krules, that the kernel does in fact support
-else.  The fact that curly braces actually denote lists means they're not
+my tests twice (like `/if a == b {} /if a != b {}`).  Then I noticed, in
+examining the results of `/krules`, that the kernel does in fact support
+`else`.  The fact that curly braces actually denote lists means they're not
 optional in tests though, and the nesting is still pretty annoying.
 
 The other annoying thing is that there's no way to prioritize selection
 of nonterminals.  For example, I feel very strongly that it ought to be
-possible to write the score_of production like this:
+possible to write the `score_of` production like this:
 
-/$num_t -> "score_of" coin     { /return  5 }
-/$num_t -> "score_of" jewel    { /return 10 }
-/$num_t -> "score_of" sceptre  { /return 15 }
-/$num_t -> "score_of" crown    { /return 20 }
-/$num_t -> "score_of" object^$ { /return  0 }
+    /$num_t -> "score_of" coin     { /return  5 }
+    /$num_t -> "score_of" jewel    { /return 10 }
+    /$num_t -> "score_of" sceptre  { /return 15 }
+    /$num_t -> "score_of" crown    { /return 20 }
+    /$num_t -> "score_of" object^$ { /return  0 }
 
-On the basis that coin et al. are more specific than object^$, and should
+On the basis that `coin` et al. are more specific than `object^$`, and should
 be selected before it.  But, it's not possible to set this up, at least as
 far as I can see.  Which is a pity, because this sort of "catch-all"
 mechanism would also enable much better error handling.
 magic word is, you can't even use it without causing a syntax error.
 But afterward it is a full-fledged part of the parser's vocabulary.
 Note also that this is how the properties of an object are updated:
-the production which handles "e_exit square_room" is replaced by one
+the production which handles `e_exit square_room` is replaced by one
 that returns a different value, once the door is open.
 
 Some of the action productions are a bit clumsy because they contain
 logic that should probably be associated with the object instead.
 Putting lists of statements in a property of the object, and using
-Zz's /execute facility, would probably allow a "method-like" style
+Zz's `/execute` facility, would probably allow a "method-like" style
 that permits this, but I haven't played with it.
 
 Lastly, it's interesting to note that internal helper functions (not
 
 Happy adventuring!
 
--Chris Pressey
-May 6, 2007
+-Chris Pressey  
+May 6, 2007  
 Vancouver, BC
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.