// interaction_list        = [ lead_comment_decl ] interaction [ ";" ] [ interaction_list ].
bool adam_test_parser::is_interaction_list() {
    // REVISIT (mmarcus) : fix up grammar here
    std::string comment;
    bool result(true);
    while (result) {
        while (is_lead_comment(comment))
            ;
        result = is_interaction();
        while (is_lead_comment(comment) || is_token(semicolon_k))
            ;
    }
    return result;
}
Ejemplo n.º 2
0
bool adam_parser::is_set_decl(name_t token, set_decl_t set_decl)
{
    if (!is_keyword(token)) return false;
    
    require_token(colon_k);

    while (true)
    {
        std::string detailed;
        (void)is_lead_comment(detailed);
        if (!(this->*set_decl)(detailed)) break;
    }
    
    return true;
}
Ejemplo n.º 3
0
//  relate_expression       = [lead_comment] named_decl.
bool adam_parser::is_relate_expression_decl(relation_t& relation)
{
    (void)is_lead_comment(relation.detailed_m);
    return is_named_decl(relation.name_m, relation.position_m, relation.expression_m, relation.brief_m);
}