hybrid on ; dyadic rightassoc <: : 22 ; dyadic rightassoc <:: : 22 ; dyadic rightassoc LT , GT , LE , GE : 6 ; dyadic rightassoc NE , EQ : 9 ; dyadic rightassoc <&> : 5 ; dyadic rightassoc <|> : 4 ; dyadic leftassoc <.> : 11 ; dyadic leftassoc <<- : 3 ; form bnf === NLX /* empty */ +++ LMARG /* margin -- left */ +++ RMARG /* margin -- right */ +++ FIX ( num ) /* number -- int */ +++ FLT ( num ) /* number -- float */ +++ CHX ( char ) /* value -- character */ +++ STX ( str ) /* value -- string */ +++ VAR ( str ) /* variable */ +++ bnf LT bnf /* less-than operator */ +++ bnf GT bnf /* more-than operator */ +++ bnf LE bnf /* less-than-or-equal operator */ +++ bnf GE bnf /* more-than-or-equal operator */ +++ bnf EQ bnf /* equal-to operator */ +++ bnf NE bnf /* not-equal-to operator */ +++ OPENI (str) /* open file using argument */ +++ OPENO (str) /* open file using argument */ +++ CLOSE (str) /* open file using argument */ +++ IOOPI (bnf) /* record based I/O op, read */ +++ IOOPO (bnf # bnf) /* record based I/O op, write */ +++ bnf <&> bnf /* sequence */ +++ bnf <|> bnf /* alternation */ +++ bnf <.> bnf /* association */ +++ RNG ( char # /* */ char ) /* lexical range */ +++ ARB /* pattern -- arbitrary text */ +++ ABN ( bnf ) /* pattern -- arbitrary number of */ occurences +++ SOM ( bnf ) /* pattern -- at least one occurence */ +++ BAL /* pattern -- balanced parens */ +++ BKT /* pattern -- balanced brackets */ +++ BRC /* pattern -- balanced braces */ +++ LEN ( num ) /* pattern -- accept by length */ +++ ANY ( bnf ) /* pattern -- one of a limited set */ +++ NAY ( bnf ) /* pattern -- one, but not from set */ +++ SPN ( bnf ) /* pattern -- contiguous char span */ +++ BRK ( bnf ) /* pattern -- contiguous char span */ /* inverse */ +++ LHS ( bnf ) /* the left-hand */ +++ RHS ( bnf ) /* the right-hand side */ +++ bnf <<- bnf /* assignment */ +++ GSYM ( bnf ) /* GET-op of some symbol */ +++ PSYM ( bnf # /* PUT-op of some symbol */ bnf ) /* address of PUT'ed symbol */ +++ ALLS /* general GET-op of all symbols */ /* this returns a LMP sequence */ +++ LMP ( list(bnf) ) /* unordered object sequence */ +++ GRP ( list(bnf) ) /* ordered object sequence */ +++ SUBR( bnf # /* program name --- fun definition */ list(bnf) ) /* general args --- fun arguments */ +++ CALL( bnf # /* program name --- function call */ list(bnf) ) /* general args --- arguments */ +++ RETN /* program return -- no value retned */ +++ RETV ( bnf ) /* program return -- value returned */ +++ BODY ( (list(bnf) ) /* body of function */ +++ END ; /* end of function definition */