anchor.diff:          false ->
               ?FAIL({Check,X})
       end;
  -%% @TODO ABNF TYPES -- START
  -check_term({seq,_}=Check, X, _Level, _Mod) ->
  -    if is_binary(X) ->
  -            ok; %% temporarily ok for any binary
  -       true ->
  -            ?FAIL({Check,X})
  -    end;
  -check_term({repeat,_,_,_}=Check, X, _Level, _Mod) ->
  -    if is_binary(X) ->
  -            ok; %% temporarily ok for any binary
  -       true ->
  -            ?FAIL({Check,X})
  -    end;
  -check_term({byte_range, Min, Max}=Check, X, _Level, _Mod) ->
  -    if is_binary(X) ->
  -            case X of
  -                <<C:8, _/binary>> ->
  -                    if Min =< C andalso C =< Max ->
  -                            ok;
  -                       true ->
  -                            ?FAIL({Check, X})
  -                    end;
  -                <<>> ->
  -                    ?FAIL({Check, X})
  -            end;
  -       true ->
  -            ?FAIL({Check,X})
  -    end;
  -check_term({byte_alt, A, B}=Check, X, Level, Mod) ->
  -    if is_binary(X) ->
  -            case check_term(A, X, Level, Mod) of
  -                ok  ->
  +%% abnf
  +check_term(Check, X, Level, Mod) when is_binary(X) ->
  +    case check_term_abnf(Check, X, Level, Mod, 0) of
  +        Size when is_integer(Size) ->
  +            %% check if entire binary has been consumed
  +            if Size =:= size(X) ->
                       ok;
  -                _   ->
  -                    check_term(B, X, Level, Mod)
  -            end;
  -       true ->
  -            ?FAIL({Check,X})
  -    end;
  -check_term({byte_seq, [Type|Types]}=Check, X, Level, Mod) ->
  -    if is_binary(X) ->
  -            case check_term(Type, X, Level, Mod) of
  -                ok ->
  -                    <<_:1/binary, X2/binary>> = X,
  -                    check_term({byte_seq, Types}, X2, Level, Mod);
  -                _ ->
  +               true ->
                       ?FAIL({Check,X})
               end;
  -       true ->
  -            ?FAIL({Check,X})
  -    end;
  -check_term({byte_seq, []}=_Check, <<>>, _Level, _Mod) ->
  -    ok;
  -check_term({byte_val, Byte}=Check, X, _Level, _Mod) ->
  -    if is_binary(X) ->
  -            case X of
  -                <<C:8, _/binary>> ->
  -                    if C == Byte ->
  -                            ok;
  -                       true ->
  -                            ?FAIL({Check, X})
  -                    end;
  -                <<>> ->
  -                    ?FAIL({Check, X})
  -            end;
  -       true ->
  -            ?FAIL({Check,X})
  -    end;
  -%% @TODO ABNF TYPES -- END
  +        false ->
  +            ?FAIL({Check,X})
  +    end;
  +%% otherwise, fail
   check_term(Check, X, _Level, _Mod) ->
       %% io:format("~p isnot ~p~n", [Check, X]),
       %% exit({Y,isNotA, X}).
  
positive.code:     isTypeAttr(Type,nonundefined) andalso is_nonundefined(Val);
  check_term_attr(_,_,_) ->
      false.
  
  
  %% is_string
  
negative.code:     X == undefined.
  
  
  %% check_term_seq
  check_term_seq([], [], _Level, _Mod) ->
      true;
  check_term_seq(_Args, [], _Level, _Mod) ->
  