Menu

Bug: "$" is replaced by "__" by xml2abc during xml to dot conversion

2015-03-02
2015-03-06
  • Benito C. Nelson

    Input:
    main() {
    puts("$");
    }

    Output:
    digraph activity
    {
    node [fixedsize=false, height=.01, shape=circle, fillcolor="#FFFFFF" ];
    fontsize=5;
    ranksep=0.25;
    direct_declarator_L_1_C_1_Intro -> direct_declarator_L_1_C_1_Start[ color=white, ];
    direct_declarator_L_1_C_1_Start -> expr_stmt_L_2_C_2;
    expr_stmt_L_2_C_2 ->
    direct_declarator_L_1_C_1_Intro [label="main()\nthis is the modell of a function with comments before the commands\n", shape=note, height=0.1 ,URL="main" ];
    direct_declarator_L_1_C_1_Start [label="", shape=circle, fillcolor=black, style="filled", height=0.25];
    expr_stmt_L_2_C_2 [label="puts(''__'')", shape=box, style="rounded, filled", height=0.01, width=0.01 ];
    }

     
  • Eckard Klotz

    Eckard Klotz - 2015-03-05

    Hello Mr. Nelson.

    Please excuse my late reply. Currently I'm on a business trip with a limited amount of spare time. I try to take a look on it at week end.

    In the meanwhile please give me some more information about your release version (main or development-release and version number) and your operation-system (windows XYZ, linux, Mac, ...). You will find in the main-folder of your distribution log files of the binaries abc2xml and xml2abc. In the case that you only analyzed your example please provide them as zip-file. If they are too big, since you analyzed your whole project, please provide the first lines which contain the binary version, the build-date, build-time and the configuration results until the first source will be analyzed.

    Best regards,
    Eckard Klotz

     
  • Benito C. Nelson

    It is http://sourceforge.net/projects/moritz/files/Moritz_2.x/DevelopmentFor_2_1_0/Snapshot_2_0_2/Moritz2_WIN32_2015_01_03.zip on Windows 7 and Windows 8.1.

    Steps to reproduce:
    1) Extract Moritz2_WIN32_2015_01_03.zip to X:\Moritz2_WIN32_2015_01_03.
    2) Go to X:\Moritz2_WIN32_2015_01_03.
    2) Change the content of src\UserExample.c to
    main() {
    puts("$");
    }

    3) Run ansi_c_create.bat.
    4) Check the result in dot\UserExample_c_F_mian.dt. This is its content:
    digraph activity
    {
    node [fixedsize=false, height=.01, shape=circle, fillcolor="#FFFFFF" ];
    fontsize=5;
    ranksep=0.25;
    direct_declarator_L_1_C_1_Intro -> direct_declarator_L_1_C_1_Start[ color=white, ];
    direct_declarator_L_1_C_1_Start -> expr_stmt_L_2_C_2;
    expr_stmt_L_2_C_2 ->
    direct_declarator_L_1_C_1_Intro [label="main()\nthis is the modell of a function with comments before the commands\n", shape=note, height=0.1 ,URL="main" ];
    direct_declarator_L_1_C_1_Start [label="", shape=circle, fillcolor=black, style="filled", height=0.25];
    expr_stmt_L_2_C_2 [label="puts(''__'')", shape=box, style="rounded, filled", height=0.01, width=0.01 ];
    }

    Log files of the binaries abc2xml and xml2abc in a zip file are attached.

     
  • Eckard Klotz

    Eckard Klotz - 2015-03-06

    Hello Mr. Nelson.

    I hope that the attached patch solves your problem.

    Please rename the sub-folder "x2a_uad" in the path "LangPack\ansi_c" of your distribution and unpack the zip-file there to replace it.

    On the one side the dollar character should be shown now correctly on the other side a main-function like yours without a return-type has now a well defined end-symbol.

    Please check it out and post a reply if it works for you or not.

    Best regards,
                        Eckard Klotz.

     

    Last edit: Eckard Klotz 2015-03-06
  • Benito C. Nelson

    The patch works perfectly, thank you!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.