instruction :: Parser INSTRUCTION
instruction
  =   try (string "CONS"      *> (CONS      <$> ref <*> ref <*> ref))
  <|> try (string "DEST"      *> (DEST      <$> ref <*> ref <*> ref))
  <|> try (string "COPY"      *> (COPY      <$> ref <*> ref))
  <|> try (string "CONDCOPY"  *> (CONDCOPY  <$> ref <*> ref <*> ref))
  <|> try (string "EXEC"      *> (EXEC      <$> ref))
  <|> try (string "CONDEXEC"  *> (CONDEXEC  <$> ref <*> ref))
  <|> try (string "PUSH"      *> (PUSH      <$> ref <*> ref))
  <|> try (string "POP"       *> (POP       <$> ref <*> ref))
  <|> try (string "WRITE"     *> (WRITE     <$> ref))
  <|> try (string "CONDWRITE" *> (CONDWRITE <$> ref <*> ref))
  <?> "an instruction"
  where ref = spaces *> name <* spaces
instruction :: Parser INSTRUCTION
instruction
  =   try (string "CONS"      *> (CONS      <$> ref <*> ref <*> ref))
  <|> try (string "DEST"      *> (DEST      <$> ref <*> ref <*> ref))
  <|> try (string "COPY"      *> (COPY      <$> ref <*> ref))
  <|> try (string "CONDCOPY"  *> (CONDCOPY  <$> ref <*> ref <*> ref))
  <|> try (string "EXEC"      *> (EXEC      <$> ref))
  <|> try (string "CONDEXEC"  *> (CONDEXEC  <$> ref <*> ref))
  <|> try (string "PUSH"      *> (PUSH      <$> ref <*> ref))
  <|> try (string "POP"       *> (POP       <$> ref <*> ref))
  <|> try (string "WRITE"     *> (WRITE     <$> ref))
  <|> try (string "CONDWRITE" *> (CONDWRITE <$> ref <*> ref))
  <?> "an instruction"
  where ref = spaces *> name <* spaces
instruction
  =   try (string "CONS"      *> (CONS      <$> ref <*> ref <*> ref))
  <|> try (string "DEST"      *> (DEST      <$> ref <*> ref <*> ref))
  <|> try (string "COPY"      *> (COPY      <$> ref <*> ref))
  <|> try (string "CONDCOPY"  *> (CONDCOPY  <$> ref <*> ref <*> ref))
  <|> try (string "EXEC"      *> (EXEC      <$> ref))
  <|> try (string "CONDEXEC"  *> (CONDEXEC  <$> ref <*> ref))
  <|> try (string "PUSH"      *> (PUSH      <$> ref <*> ref))
  <|> try (string "POP"       *> (POP       <$> ref <*> ref))
  <|> try (string "WRITE"     *> (WRITE     <$> ref))
  <|> try (string "CONDWRITE" *> (CONDWRITE <$> ref <*> ref))
  <?> "an instruction"
  where ref = spaces *> name <* spaces