Functionlist for Rapid (ABB robots)

  • Hi
    Can anyone explain how to write function in a parser and the nameExpr and so on?

    Have got so far as i get the list but it only says PROC on every row.
    What i want is to find PROC | FUNC | TRAP in a .mod file.
    The program looks like this simplyfied.
    PROC routinename()

    PROC routinename2()

    TRAP trapname()

    FUNC functionname()

    and so on. There is other rows to but it is theese i want to find. I think it is simple if i only knew how to write the correct search line. So does anyone want to help me?

    //Anders S

  • Forgot to mention I want the list to show “PROC routinename” or only “routinname”, with or without brackets. In Function there is variables in the brackets prefer not to show that in the functionlist.

  • Hi again.

    Fixed it myself. Just in case anyone else want to know how.
    I had this row added to associationtable:
    <association userDefinedLangName=“RAPID_ABB” id=“rapid_function”/>

    And my parsercode looks like this know when it works the way i want it to:
    <parser id=“rapid_function” displayName=“ABB Rapid” commentExpr="!">
    mainExpr="^[\t ]((PROC|FUNC|TRAP)[\s][a-zA-Z]\w)">

    Maybe it can help someone else.

    //Anders S

Log in to reply