Original Parser

version 1 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter 6 - Unconditional Local Jumps

    [ I would love to remove all GOTOs from the parser's source, never mind the performance implications. But some functions are just too convoluted for me to disentangle while keeping faith that they would work like the originals. ]
    A control label is a kind of value. Some control labels are the finished control label.
    To at this point (here - a control label): (- .{here}; -).
    To go back/-- up/down to where (here - a control label): (- jump {here}; -).

    [ -- parser__parse --]
    To decide what control label is we ReType: (-ReType-).
    To decide what control label is we ReParse: (-ReParse-).
    To decide what control label is we AlmostReParse: (-AlmostReParse-).
    To decide what control label is we BeginCommand: (-BeginCommand-).
    [To decide what control label is we have conversation: (-Conversation-).]
    [To decide what control label is we also have conversation: (-Conversation2-).]
    To decide what control label is we do not have conversation: (-NotConversation-).
    [VerbAccepted]
    [loop through understand-as lines, beginning with]
    [lookahead at 2nd noun]
    [loop through each token in the line ]
    To decide what control label is our LineFailed: (-LineFailed-).
    To decide what control label is we GiveError: (-GiveError-).
    [To decide what control label is we LookForMore: (-LookForMore-).]

    [ -- ParseToken__ -- ]
    [To decide what control label is we begin the ObjectList: (-ObjectList-).]
    To decide what control label is we TryAgain: (-TryAgain-).
    To decide what control label is we TryAgain2 due to an ambiguous descriptor word: (-TryAgain2-).
    To decide what control label is we FailToken: (-FailToken-).
    To decide what control label is we PassToken: (-PassToken-).