class Precedence { public static int precedence(Node p) /* return the operator precedence associated with */ /* denotation p. */ { int stti; /* string table index of id */ int lvl; switch (p.kind) { case Const.BLOCKDENOTATION : return(p.precedence()); case Const.USELIST : return(p.precedence()); case Const.WORDCAND : return(2); case Const.WORDCOR : return(1); case Const.OPRID : case Const.LETTERID : //HELP stti = p . id_str_table_index(); //HELP if (stti . pend[Const.NLEVELS - 1]) if((p . kind) == Const.OPRID) return(3 /* default precedence */); else return(Const.INFINITE); // HELP for (lvl = 0; stti. pend[lvl]; lvl++); //HELP return(lvl); default : return(Const.INFINITE); } } }