       null
     else if m = instruction.match(FLD.comment)
       descriptions.push m[1]
+    else if m = instruction.match(FLD.rule)
+      rule = makeRule m[1].split('|').join(';')
     else
       throw new Error "Unexpected instruction: #{instruction}"
-  return [pattern, colors, size, descriptions.join("\n")]    
+  return {
+    pattern: pattern
+    colors: colors
+    size: size
+    name: descriptions.join("\n")
+    rule: rule
+  }
 
 #taken from http://www.html5canvastutorials.com/advanced/html5-canvas-mouse-coordinates/
 getCanvasCursorPosition = (e, canvas) ->

    @iconSize = [64, 56]

  addFdl: (fdl, palette)->
    [pattern, colors, sz, description] = parseFieldDescriptionlLanguage fdl, palette
    liItem = document.createElement "li"
    liItem.setAttribute "data-fdl", fdl
    liAnchor = document.createElement "a"

    cx = (@isim.simulator.width/2) & ~1
    cy = (@isim.simulator.height/2) & ~1
    try
      parsed = parseFieldDescriptionlLanguage fdl, @colorPalette
      document.getElementById("fld-text").value = fdl
    catch e
      alert "Failed to parse: #{e}"
    @isim.clear()
    @isim.put parsed.pattern, cx, cy
    @colors = parsed.colors
    @isim.simulator.rule = parsed.rule if parsed.rule?
    @_updateClearBtnIcon()
    @_clearBackground()
    window.scrollTo 0, 0
