Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Nov 2011
    Posts
    7

    Default "Unimportant" Text Agen





    Where I was wrong

    PS sorry for my english

    Нужно настроить правила сравнения таким образом, чтобы отличие VAR vs VARIABLE было несущественным. В примере видно, что мое правило работает только тогда, когда после VAR ввел два пробела.
    В указанном примере нужно добиться, чтобы изменения во всех строках были несущественные, за исключением третьей (там где rows1)

    google translate:
    Need to set rules for the comparison so that the difference VAR vs VARIABLE was "Unimportant". The example shows that my rule works only when the following VAR has introduced two spaces.
    In the above example must be made to change all the lines were insignificant, except for the third (where rows1)
    Last edited by altdesign; 04-Nov-2011 at 02:46 AM.

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,618

    Default

    Hello,

    Your picture links appear to be broken. Would you be able to post again or email us at support@scootersoftware.com ?
    Aaron P Scooter Software

  3. #3
    Join Date
    Nov 2011
    Posts
    7

    Default

    Update external link to image

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,618

    Default

    Hello,

    Thanks for the updated screenshot. I notice the issue in the 2nd difference section with DEF VAR. If you enable the View menu -> Aligned Details, is it aligning as you expect or is that the problem?

    It looks like you may want to look at our BC3 Pro feature, Text Replacements. Text Replacements let you define:
    "DEFINE" = "DEF"
    and
    "VARIABLE" = "VAR"

    They are in the Session Settings, Replacements tab, of the Text Compare. If you need to revert to trial mode to test this Pro feature, please read this guide:
    http://www.scootersoftware.com/suppo...?zz=kb_evalpro

    If you are still having trouble, would it be possible to get an email with a pair of sample files? If you email us at support@scootersoftware.com , please also include a link back to this forum thread for our reference.
    Aaron P Scooter Software

  5. #5
    Join Date
    Oct 2007
    Location
    Pennsylvania
    Posts
    1,772

    Default

    Quote Originally Posted by altdesign View Post
    Where I was wrong
    Create a grammar list for DEF and DEFINE
    http://screencast.com/t/zqEeV4kpl2ss

    Create a grammar list for VAR and VARIABLE
    http://screencast.com/t/rzfwtLeIOyn

    Uncheck the grammar rules to make them unimportant
    http://screencast.com/t/LKkgQN5NA

    Result:
    http://screencast.com/t/JBHz1n0CR
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

  6. #6
    Join Date
    Nov 2011
    Posts
    7

    Default

    Hello,

    Quote Originally Posted by Aaron View Post
    If you enable the View menu -> Aligned Details, is it aligning as you expect or is that the problem?
    is that the problem


    Quote Originally Posted by Aaron View Post
    Text Replacements let you define:
    "DEFINE" = "DEF"
    and
    "VARIABLE" = "VAR"
    well done!


    but I have done so:
    "DEFINE" = "DEF " (with space at the end)
    "VARIABLE" = "VAR " (with space at the end)
    "DEF" = "DEFINE " (with space at the end)
    "VAR" = "VARIABLE " (with space at the end)

    and result


    else

    "DEFINE" = "DEF" (NO space at the end)
    "VARIABLE" = "VAR" (NO space at the end)
    "DEF" = "DEFINE" (NO space at the end)
    "VAR" = "VARIABLE" (NO space at the end)

    result

  7. #7
    Join Date
    Nov 2011
    Posts
    7

    Default

    TEXT1:
    DEFINE INPUT PARAMETER rid-doc AS INTEGER.
    DEFINE VARIABLE i AS INTEGER.
    DEFINE VARIABLE rows AS INTEGER.
    DEFINE VARIABLE tovar AS CHARACTER.
    DEFINE VARIABLE sum AS DECIMAL.
    DEFINE VARIABLE cost AS DECIMAL.
    DEFINE VARIABLE doc-date AS DATE.

    TEXT2:
    DEF INPUT PARAMETER rid-doc AS INTEGER.
    DEF VAR i AS INTEGER.
    DEF VAR rows AS INTEGER.
    DEF VAR tovar AS CHARACTER.
    DEF VAR sum AS DECIMAL.
    DEF VAR cost AS DECIMAL.
    DEF VAR doc-date AS DATE.
    Last edited by Aaron; 08-Nov-2011 at 08:49 AM.

  8. #8
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,618

    Default

    Hello,

    Thanks for the sample files. That was certainly puzzling before I was able to check against them.

    It looks like your Keyword grammar is defined to include DEFINE and def (with a space), and is higher in the grammar list. You also have explicit DEFINE+Whitespace regular expression grammars. The grammar list's priority heavily influences which it will match on, but a higher priority does not guarantee a match (due to several factors, such as left starting character).

    The end results is using your Progress file format, the left file is matching the DEFINE text to the DEFINE grammar, and your right file is matching DEF to the Keyword grammar. Because they are different grammars, the entire text will be marked as a difference (including any whitespace that is part of the grammar definition and not default text).

    Do you need "define" text defined as part of two different grammar elements of the same file format?

    UPDATE: I also removed your settings files from your forum post. Some basic info (user account name, install location, etc) are present, and I'm not sure if you intended that for our public forum.
    Last edited by Aaron; 08-Nov-2011 at 08:51 AM. Reason: UPDATE: edited to remove Support.zip
    Aaron P Scooter Software

  9. #9
    Join Date
    Oct 2007
    Location
    Pennsylvania
    Posts
    1,772

    Default

    There should not be any need to use replacements or regular expressions. Did you try removing them and using simple grammar lists like I demonstrated in my previous post above?
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

  10. #10
    Join Date
    Nov 2011
    Posts
    7

    Default

    Quote Originally Posted by Michael Bulgrien View Post
    Did you try removing them and using simple grammar lists like I demonstrated in my previous post above?
    Добрый день. Да, я попробовал Ваш способ. Но результат был неудовлетворительный.

    Hello. Yes, I tried your way. But the result was unsatisfactory.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •