# Exercises the ifhost conditional, assuming your host answers to 'localhost'.
# parser will echo YES1 through YES9
# there's a problem with the parser if it echoes NO

@@ifhost foo
    @@error NO1
@@else
    @@print +YES1
@@endif

@@ifhost bar || localhost||baz


    @@ifhost foo
    
        @@ifhost localhost
            @@error +NO2;
        @@else
            @@error +NO3;
        @@endif

            @@error +NO4;

    @@else
    
        @@ifhost foo
            @@error +NO5;
        @@else
            @@print +YES2;
        @@endif

            @@print +YES3;

    @@endif



    @@ifhost localhost
    
        @@ifhost localhost
            @@print +YES4;
        @@else
            @@error +NO6;
        @@endif

            @@print +YES5;

    @@else
    
        @@ifhost localhost
            @@error +NO7;
        @@else
            @@error +NO8;
        @@endif

            @@error +NO9;

    @@endif

    @@ifhost localhost
        @@print +YES6;
    @@else
        @@error +NO10;
    @@endif

    @@ifhost foo
        @@error +NO11;
    @@else
        @@print +YES7;
    @@endif

    
    @@ifhost localhost || baz
        @@print +YES8;
    @@endif    

    @@ifhost baz || localhost
        @@print +YES9;
    @@endif

    @@ifhost baz
        @@error +NO12;
    @@endif

@@else


    @@ifhost foo
    
        @@ifhost localhost
            @@error +NO13;
        @@else
            @@error +NO14;
        @@endif

            @@error +NO16;

    @@else
    
        @@ifhost foo
            @@error +NO16;
        @@else
            @@error +NO17;
        @@endif

            @@error +NO18;

    @@endif

    @@ifhost foo
        @@error +NO19;
    @@else
        @@error +NO20;
    @@endif

    @@ifhost localhost
        @@error +NO21;
    @@else
        @@error +NO22;
    @@endif


    @@ifhost foo
        @@error +NO23;
    @@else
        @@error +NO24;
    @@endif
    
    @@ifhost baz
        @@error +NO25;
    @@endif

@@endif

#A token rule at the end to avoid 'no rules in policy file' errors 
/asdf -> +a;

