Problem with custom language 2

Help
2012-07-11
2013-06-12
  • Márcio Massula Junior

    Hello!

    I'm another orphan of FunctionList plugin, and I've found this plugin a very good alternative.

    I'm trying to bring the regex patterns I've used on FunctionList to Sourcecookifier.

    For example, I'm trying to find the PROC <statement> combination inside my code, like this: PROC Pieza_62(), as showed in the screenshot below:

    This regex pattern works fine in the INPUT field, but doesn't in the OUTPUT field. Is there something I'm missing?

     
  • UFO

    UFO - 2012-07-12

    Hi,

    can you paste the patterns here? The screenshot resolution is too small to
    completely recognize all characters.
    But at least I can already see that you pasted the same values into INPUT
    and OUTPUT? That's wrong. OUTPUT should be something like "\1".
    Check out the regex pattern examples in the help text, or directly look
    at the ones for the "ASM" or "INI" languages.
    Also it uses "gnu regex", which doesn't know "*". You need to use
    something like "[]*" instead.

     
  • Márcio Massula Junior

    Hi, ufo-pu55y

    The regex pattern is this:

    PROC[ \t]+[a-zA-Z0-9_].*
    

    And, yes, I put the same pattern on INPUT and OUTPUT.

    I'll look for this examples of gnu regex.

    Thanks!

     
  • UFO

    UFO - 2012-07-13

    Then try like this:
    Input: PROC[]+([_]*)
    Output: \1

     
  • Márcio Massula Junior

    It worked!

    I've changed the regex a little bit, because the code have some ENDPROC statements which I don't wanna see in Sourcecookifier list:

    INPUT: [[:blank:]]PROC[[:space:]]+([[:alnum:]_]*)
    
    OUTPUT: PROC \1
    

    Thanks!

     

Log in to post a comment.