[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to convert String to SableCC name


I will have to produce an extension of  a DepthFirstAdapter generated by
SableCC itself.

For instance for the rule:
suite02_bmr70 = thdr one_entity suite02_bmr70
              | {empty}

I have to produce the java code
 public void caseASuite01Bmr70(ASuite01Bmr70 node)
   {  System.out.println("caseASuite01Bmr70") ;
      bmrcou = new BMR70K() ;
   // Get one_entity
      (node.getOneEntity()).apply(this) ;
   // Add vector
      bmrcou.AddToVector_liste_entity(symcou) ;
   // Next Apply
      (node.getSuite02Bmr70()).apply(this) ;
So do you know a SableCC method: Convert
Convert(suite02_bmr70) gives Suite01Bmr70
Convert(one_entity) gives OneEntity.