FunnelWeb Syntax

Created on 2022-09-09T08:04:36-05:00

Return to the Index

This card can also be read via Gemini.

A scanner walks over text and breaks it in to directives and blocks.

The special character (@ by default) captures itself and the next character as a special token. This token has meaning later in the parsing phases. Spans between special captures are known as free text.

Another phase looks at free text and directive tokens. Directive tokens may cause more free text and directives to be consumed; for example @< will take the next span of free text to mean the name of a macro. @> is another directive (causes the free text span to be terminated). A macro then reads the next free span looking for "==" or "+=" which is then punctuated by @{ (starts a macro body) and so on.

Unlike [no]web the <>== syntax is wrapped with escapes. So you have @ to reference a macro. Or @== to create one and @+= to create one through multiple macro invocations.

Macro expansion is deliberately simple and happens in a pass after everything is figured out. This allows "unrestricted forward referencing." Since macro labels are assigned in a purely statically analyzable way

@a@
@$@@{@-
if (llDetectedTouch(0) == g_keyholder)@}

@a@
@$@@{
g_menu_user = llDetectedKey(0);
llSobProfusely();
@}

@$@@{
touch_start(integer n) {
   // time to sob profusely
   @ {
      @
   } else {
      llWhisper(llDetectedTouch(0), "fuck off UwU");
   }
}
@}

@o@@{
default {
   @
}
@}