← Back to context

Comment by BruceEel

4 years ago

There was the "Val Linker"[1] (also for the Amiga, though I can't seem to find that version), written in a kind of Pascal-ish C, powered by macros.. Snippet:

    void get_order_token()
   BeginDeclarations
   EndDeclarations
   BeginCode
    While token_break_char Is ' '
     BeginWhile
      order_token_get_char();
     EndWhile;
    copy_string(token, null_string);
    If IsIdentifier(token_break_char)
     Then
      While IsIdentifier(token_break_char)
       BeginWhile
        concat_char_to_string(token, token_break_char);
        order_token_get_char();
       EndWhile;
      lowercase_string(token);
     Else
      If token_break_char Is '['
       Then
        While token_break_char IsNot ']'
         BeginWhile
          concat_char_to_string(token, token_break_char);
          order_token_get_char();
         EndWhile;
        order_token_get_char();
        If case_ignore.val
         Then
          lowercase_string(token);
         EndIf;
       Else
        concat_char_to_string(token, token_break_char);
        order_token_get_char();
       EndIf;
     EndIf;
    return;
   EndCode

*1 https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simteln...