This is based on a grammar I found a while back, that I cannot find an active link to any more. I remember the name of the guy who wrote the paper was named Dorman. I created this a while ago. I have included the instructions in the image itself so that it can be downloaded and used stand alone. Below I have an example of how it is used.
So in the example, I am replacing the "OL(i1)" (in the green box on the first graph). I rolled a 4 so I use the sequence that is in the red box. OL takes a parameter (the "key ?" on the diagram above). In this instance, "i1" is provided, so I replace the "?" in the red box with "i1", and connect the blue and teal nodes properly, the result is two nodes (in the blue box) added to my final graph. Of note in the final graph is the chain "OL(!)<->UI(hp)", that represents a portion of the dungeon that cannot be entered unless the player has an item that is not provided in this dungeon. If the player comes back when he or she has that item, they can eventually get an extra heart piece.
Additional Ideas (2)
I still have the PDF of the paper kicking around somewhere. I'll see if I can find it when I get home.
2. totally didn't see actual 'comments' section below, this isn't an idea. I'd delete if I could.