Original Parser

version 1 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Book - Inform 7 mini-extensions

    Chapter 1 - Understood Words

    [ Inform 6 calls these "dictionary words". ]

    [An understood word is a kind of value. ] [ This line must go at the top of this file. ]
    Some understood words are the invalid understood word. [required by I7]
    To decide what understood word is a word unknown by the game: (- 0 -).
    To decide what understood word is no more words left to parse: (- (-1) -).
    To decide what understood word is ME the player: (- 1 -).
    To say (word - an understood word): (- print (address) {word}; -).
    The understand token understood word translates into I6 as "special".
    To decide what understood word is (n - number) as an understood word: (- {n} -).
    [ Use the latter like:
    Understand "do you know the word [understood word]" as a mistake ("[if the understood word understood is a word unknown by the game]No.[else if the number understood < 10000]Yes, I know the number [number understood].[else if the number understood is 10000]Yes, but I cap numbers at the ten thousand mark.[else]Yes, I know the word [the understood word understood].[end if]").
    ]