Help - highlighting Autosys jil files - bad quotes

Help - highlighting Autosys jil files - bad quotes

12
Basic UserBasic User
12

    Apr 01, 2005#1

    Hi, all! I am trying to define a wordfile entry to handle syntax highlighting for Autosys jil files. These files contain comments and autosys jil commands. I started with some other wordfile entry and hacked at it a little, but now I have noticed that a single quote in the middle of a double quoted string stops all highlighting that follows. The actual string has an appostrophe in it like below:

    "Developer's Report"

    In other sections where strings are double quoted, there is never a problem, it just seems to be the single quote in there that is throwing things off.

    Below is a sample of code to be highlighted followed by my wordfile entry. Any suggestions to my wordfile entry would be greatly appreciated!

    Code: Select all

    /* ----------------- odm_WeekendCleanup.0010.060 ----------------- */ 
    
    insert_job: odm_WeekendCleanup.0010.060   job_type: c 
    box_name: odm_WeekendCleanup.0010.000
    command: $QUEUE_DIR/jobs/odm_WeekendCleanup.0010.060 tocus3d3 E
    machine: testcm2
    #owner: queue@testcm2
    permission: gx,ge,wx,we,mx,me
    condition: success(odm_WeekendCleanup.0010.040)
    description: "Inactivate Messages"
    std_out_file: $QUEUE_DIR/log/odm_WeekendCleanup.0010.000.log.$$ODM_CLEANUP_TMS
    std_err_file: $QUEUE_DIR/log/odm_WeekendCleanup.0010.000.log.$$ODM_CLEANUP_TMS
    alarm_if_fail: 1
    profile: /parms.sh
    
    
    /* ----------------- odm_WeekendCleanup.0010.070 ----------------- */ 
    
    insert_job: odm_WeekendCleanup.0010.070   job_type: c 
    box_name: odm_WeekendCleanup.0010.000
    command: $QUEUE_DIR/jobs/odm_WeekendCleanup.0010.070 tocus3d3 E
    machine: testcm2
    #owner: queue@testcm2
    permission: gx,ge,wx,we,mx,me
    condition: success(odm_WeekendCleanup.0010.040)
    description: "Developer's Report"
    std_out_file: $QUEUE_DIR/log/odm_WeekendCleanup.0010.000.log.$$ODM_CLEANUP_TMS
    std_err_file: $QUEUE_DIR/log/odm_WeekendCleanup.0010.000.log.$$ODM_CLEANUP_TMS
    alarm_if_fail: 1
    profile: /parms.sh
    
    
    /* ----------------- odm_WeekendCleanup.0010.080 ----------------- */ 
    
    insert_job: odm_WeekendCleanup.0010.080   job_type: c 
    box_name: odm_WeekendCleanup.0010.000
    command: $QUEUE_DIR/jobs/odm_WeekendCleanup.0010.080 tocus3d3 E
    machine: testcm2
    #owner: queue@testcm2
    permission: gx,ge,wx,we,mx,me
    condition: success(odm_WeekendCleanup.0010.040)
    description: "Cleanup Pend_Mergecnts_T"
    std_out_file: $QUEUE_DIR/log/odm_WeekendCleanup.0010.000.log.$$ODM_CLEANUP_TMS
    std_err_file: $QUEUE_DIR/log/odm_WeekendCleanup.0010.000.log.$$ODM_CLEANUP_TMS
    alarm_if_fail: 1
    profile: /parms.sh
    
    
    Wordfile entry:

    Code: Select all

    /L20"JIL2" Line Comment = # Block Comment On = /* Block Comment Off = */ Escape Char = \ String Chars = ' File Extensions = JIL
    /Delimiters = ~!@$%^*()+=/\[]{}:;"<>'´` ,	.?
    /Indent Strings = "{("
    /Unindent Strings = "})"
    /Function String = "%[a-zA-Z_]*("
    /Open Fold Strings = "insert_job:"
    /Close Fold Strings = "profile:" "alarm_if_fail:" 
    /C1"Commands"
    {
    }
    &&
    ||
    $
    box_name 
    command
    delete_job delete_box description
    insert_job
    job_type 
    machine
    owner
    permission profile
    std_err_file std_out_file
    /C2"Sched commands"
    condition
    date_conditions days_of_week 
    max_run_alarm
    start_times start_mins
    term_run_time
    /C3"Term Indicators"
    alarm_if_fail
    box_terminator
    job_terminator
    /C4"attributes"
    all
    b
    c
    gx ge
    mx me
    wx we
    
    Since I copied the wordfile entry from some other place, I know there are things in there that I do not need. Feel free to suggest parts that I am not using based on the example code I posted (such as function definition - this jil code does not use functions...).

    Thanks!
    - Chris
    Living in Florida is like being on vacation all the time!

    6,675585
    Grand MasterGrand Master
    6,675585

      Apr 01, 2005#2

      With your example only a single quote is a string identifier. Now you have three possibilities:

      1) You only want double quoted strings to be highlighted as string - write String Chars = ".

      2) You want that nothing is highlighted as string - delete String Chars = ' and write instead of it Noquote.

      3) You want double and single quotes as string, but not a single quote inside a double quoted string - delete String Chars = ' and delete the single quote from the list of delimiters.

      If your language does not have functions, delete the line with the function string definition.
      Best regards from an UC/UE/UES for Windows user from Austria

      12
      Basic UserBasic User
      12

        Apr 01, 2005#3

        You are awesome! Thanks! Although I do not see a difference in the highlighting of option 1 or 3, either one let my highlighting continue beyond the Developer's Report string. Thanks!

        - Chris
        - Chris
        Living in Florida is like being on vacation all the time!

        6,675585
        Grand MasterGrand Master
        6,675585

          Apr 02, 2005#4

          1) and 3) are identical on your example, but not for something like:

          description: 'single quoted string'
          description: "double quoted string"
          description: "string's"
          Best regards from an UC/UE/UES for Windows user from Austria

          12
          Basic UserBasic User
          12

            Apr 04, 2005#5

            Thanks! Originally, I read your advise a few times and was a little confused as to how it applied to my example. Now that you showed the difference, I see that you were giving me more general rules - more info on how to properly configure. Thanks! It makes much more sense now!

            Just so I fully understand
            - strings are identified by double quote (") and single quote (') by default. In that case, do not include String Chars text.

            - If I want to limit it to only " or ', then specify which one in String Chars.

            - If I want no strings identified, do not include String Chars text and include Noquote instead.

            How does the list of delimiters play into all of this? Do I always include the ones I want as string chars? (both for both, only one for one, and none for noquote)

            Thanks, again!
            - Chris
            Living in Florida is like being on vacation all the time!

            6,675585
            Grand MasterGrand Master
            6,675585

              Apr 05, 2005#6

              crodgers wrote:How does the list of delimiters play into all of this? Do I always include the ones I want as string chars? (both for both, only one for one, and none for noquote)
              The delimiters cut the sequence of characters of a text file into words. A word can be also a single character like a space, (, ), " or '. Strings are by default always enclosed by two " words or two ' words.

              So if a string character is not defined as word delimiter, it is not recognized as string character, if there is not an other delimiter immediately before respectively after the string character as my last example demonstrates. So normally the defined string characters are also set as delimiters.

              When Noquote is used, it depends on you, if you want by double clicking on the 'o' of "quoted string" only quoted is selected or "quoted.
              Best regards from an UC/UE/UES for Windows user from Austria

              12
              Basic UserBasic User
              12

                Apr 05, 2005#7

                WOW! You are a wealth of knowledge! "Advanced User" above your avatar is quite accurate! Thanks again for your insight.

                BTW, I am looking more into the help files now. Initially I wanted to get up and running and was a bit overwelmed with the amount of info in the help files, but now things are beginning to make sense...

                Thanks, again, for your help. :D
                - Chris
                Living in Florida is like being on vacation all the time!

                1
                NewbieNewbie
                1

                  Jan 29, 2009#8

                  Hello
                  Just checking to see if the OP has a wordfile for the AutoSys JIL files that he can post. I could really use it. Thanks
                  Amit