New function list: Don't understand how the functionName of a class parser works :(

2. Help
dimaal
2013-09-19
2013-09-19
  • dimaal
    dimaal
    2013-09-19

    Hi all,
    i try to create a PL/SQL parser, but it seems i don't understand how the functionName works. Here is the simple parser to demonstrate the problem:

    <parser id="pl_sql" displayName="PL/SQL" commentExpr="((/\*.*?\*)/|(--.*?$))">
    <classRange
        mainExpr="^\s*CREATE\s([^;]+?)\sTRIGGER\s+\w+(\.\w+)*"
        openSymbole = "TRIGGER"
        closeSymbole = "END;\s*/"
        displayMode="node"
        >
        <className>
            <nameExpr expr="TRIGGER\s+\w+(\.\w+)*"/>
        </className>
        <function
            mainExpr="(INSERTING|UPDATING|DELETING)"
            >
            <functionName>
                <nameExpr expr="(INSERTING|UPDATING|DELETING)"/>
            </functionName>
        </function>
    </classRange>
    </parser>
    

    and here is the simple test file:

    CREATE OR REPLACE TRIGGER DATA.TRIG_FILE_CONTEXT
      BEFORE INSERT OR UPDATE OR DELETE ON DATA.TFILE_CONTEXT FOR EACH ROW
    DECLARE
      v_txt VARCHAR2( 200);  
    BEGIN
      IF INSERTING THEN
        NULL;
      END IF;
      IF UPDATING THEN
        NULL;
      END IF;
      IF DELETING THEN
        NULL;
      END IF;
    END;
    /
    

    the new function list properly finds three "functions" but don't shows its names. Can somebody tell me how it should be done?

    my problem

     
    Last edit: dimaal 2013-09-19