Original Parser

version 1 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter 4 - Bit Twiddling

    To decide if (x - K) includes/include (y - an enumerated value of kind K): (- (( ({x}) & ({y}) ) == ({y}) ) -).
    To decide if (x - K) includes/include any of (y - an enumerated value of kind K): (- ((({x}) & ({y})) ~= 0) -).
    To decide if (x - K) does not include (y - an enumerated value of kind K): (- (( ({x}) & ({y}) ) == 0) -).
    To decide what K is (x - K) + (y - an enumerated value of kind K): (- ({x} | {y}) -).
    To decide what K is (x - K) excluding (y - an enumerated value of kind K): (- ( ({x}) & ({y}) ) -).
    To include (y - an enumerated value of kind K) in (x - K): (- {x} = {x} | ({y}); -).
    To exclude (y - an enumerated value of kind K) from (x - K): (- {x} = {x} &~ ({y}); -). [test me?]
    To exclude all except (y - an enumerated value of kind K) from (x - K): (- {x} = {x} & ({y}); -).
    To exclude all possibilities from (x - an enumerated value): (- {x} = 0; -).