summaryrefslogtreecommitdiff
path: root/web/yacco2/diagrams/subrdef.txt
blob: 7929a121749a2f5f4d99187016b4f5a606da4cb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
file: subrdef.txt
Why: some text examples of sub rule construct.
*/

  ->  ||| "#NULL" NS_identifier::TH_identifier {
    op
      Csubrule_def* fsm = (Csubrule_def*)parser()->fsm_tbl();
      fsm->subrule_def_->add_elem_to_subrule_vector(sf->p2__);
    ***
    }
  ->  |?| { 
      op
        CAbs_lr1_sym* sym = new LR1_err_no_open_brace;
        sym->set_rc(*parser()->current_token(),*parser());
        RSVP(sym);
        parser()->set_stop_parse(true);
      ***
      }
 ->  "{"
 -> Rvector Rlint Rrhs_expr