Thread: Looking for a few people willing to test!

  1. #46
    Banned
    Join Date
    Jun 2005
    Posts
    594
    mines 183 lines, it will end up being about 210 when im done.

    that funny all i have left to do is the keyword highlighting to.
    Last edited by ILoveVectors; 08-25-2005 at 10:28 PM.

  2. #47
    *this
    Join Date
    Mar 2005
    Posts
    498
    Although half my code is comments lol...

  3. #48
    Banned
    Join Date
    Jun 2005
    Posts
    594
    i will post my code when i have finished so it can be critized and
    what not, and shortly after that a html version will be released.

  4. #49
    Banned
    Join Date
    Jun 2005
    Posts
    594
    im sure some of you have been wondering when i was going to
    post a new better version, well today is that day.

    Code:
    #include <iostream>
    #include<iostream>
    
    #define
    #define other stuff
    #define masturabation("woot")
    
    // multi-line single-line comment \
       this is a /* a midline comment */ continuation of the comment
    
    /* a mutli lined comment
    	which doesnt end till here */
    
    char ch = '\\';
    const char *str = "\" \
                       blah";
    const char *str2 = "\"", str3 = "\""; // and this is bool another comment
    
    /*/ there is stuff in between here /*/
    /*/stuff inbetween here as well/*/
    /*//*/
    /*/ /*/
    /* "a comment within a quote" */
    
    /* another bool comment */
    bool aaa = true;
    char c = '\'';
    char c1 = '\'\'\'\'\'\'\\\\';
    char c1 = '\'\'\'\'\'\'\\';
    int num;
    double dnum;
    while()
    {
    
    }
    
    for(int i = 6, int x = 7; i != x; i++)
    {
    
    }
    that my test file, and that how it was output.
    my source at this time is : 193 lines (uncommented)
    it can be reduced to about 180 with a few changes,
    but ill work on that later. if you choose to check this
    out and have any question on what does what
    i will happily answer just post the section
    you are referring to and your questions.

    the following will be a rar file of just the source,
    and then a rar of everything, thanks!


    [EDIT]
    i found ONE bug, ill work on it later, when im shorting the code.
    also for the one post earlier, in the C code with unicode string,
    i didnt supply support for it because, it C, and I guess now
    would be a good time to point out i was designing this for C++
    code. thanks for your input though. if you know of something
    similar to this in c++ let me know.
    [/EDIT]
    Last edited by ILoveVectors; 08-27-2005 at 06:06 PM.

  5. #50
    Banned
    Join Date
    Jun 2005
    Posts
    594
    last update i will just be posting the main code,
    i could not find any bug with my test file with
    this version if you come across one please let me know!


    i went ahead and included the header fiel just incase
    you guys didnt want to dl the rar files. but no changes
    have been made to the header file since last release.

  6. #51
    Registered User
    Join Date
    Jun 2003
    Posts
    361
    I've tried running your code here, and all I get is a hanging program...seems I'm getting stuck in an infinite loop...I stepped through and I can't explain it...
    Code:
    ...
    while(getline(syntax, keyword, '='), getline(syntax, keyreplace, '\n'))
    {
    	key.push_back(keyword);
    	replace.push_back(keyreplace);
    }
    syntax.close();
    ifstream in("source.txt");
    while( getline(in , sourcespace , '\n' ) )
    {
    	source += sourcespace + "\n";
    }
    ...
    The cursor hits the Blue bracket...executes the red section, but then once it hits the YellowGreen bracket, it jumps back up to the Blue bracket...

    Any thoughts?
    Pentium 4 - 2.0GHz, 512MB RAM
    NVIDIA GeForce4 MX 440
    WinXP
    Visual Studio .Net 2003
    DX9 October 2004 Update (R.I.P. VC++ 6.0 Compatability)

  7. #52
    Banned
    Join Date
    Jun 2005
    Posts
    594
    not at the momment have you had any other problems, with any
    other code? also what makes you conclude this is what is
    happening?


    [EDIT]
    i have found the where the problem is being generated
    it has to do with this section of code

    Code:
    while( (definefind = source.find("#", definefind+1)) != string::npos )
    err by that i mean this section of code is causing the colorize
    to f* up, but understanding the section of code has made me
    realize where my error is.

    i will have a update posted sometime tommorrow
    [/EDIT]
    Last edited by ILoveVectors; 08-28-2005 at 11:40 PM.

  8. #53
    Registered User
    Join Date
    Jun 2003
    Posts
    361
    Okie dokes, can't wait :-) Until the boards implement something like this directly into the CODE tags, I look forward to using this whenever possible. From what I've seen so far though, nice work.

    (And I stepped through the code in debug mode, line by line, and that's the sequence my code kept on running in. I just have no idea how to explain it though, it's the weirdest loop that isn't a loop that I've ever seen) :-)
    Pentium 4 - 2.0GHz, 512MB RAM
    NVIDIA GeForce4 MX 440
    WinXP
    Visual Studio .Net 2003
    DX9 October 2004 Update (R.I.P. VC++ 6.0 Compatability)

  9. #54
    Banned
    Join Date
    Jun 2005
    Posts
    594
    lol unfourtantly, ive come across a mor emajor problem when trying to modify this and i located a even bugger bug.

    i may once again end up rewritting this a different way
    i had an idea for a way that would take even less code,
    and alot less memory, not that it uses that much anyways.


    also im fixing to be posting a contest in the contest section,
    go try it out guys.

  10. #55
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    My code is ~700 lines long. JoshR, I read all my data in from a file. So then I can have a syntax file for the board, HTML, etc.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  11. #56
    *this
    Join Date
    Mar 2005
    Posts
    498
    Why are you telling me? O does mine not do a file? well that was just a debug, I actually rewrote it and its only 400 lines and decided not to add the tags untill all zones are calculated and I wrote a function to combine close zones so when you have two #define lines, youll get one color tag for both. Another thing, my code highlights numbers which i suggest you incorporate (ilovevectors) its a nice addition. Also I implemented multiline preprocessor, multiline strings, multiline comments, and multiline characters (yes all those compile under my IDE's).

    All I have to do is write a function to insert the tags and im done, then I will be doing exception handling. When I created the structure for the newest version i made sure to include the SYNTAXERROR enum, instead I will be throwing an exception that tells what line and position the quote or comment is that has a missing end etc...

    Soooo all in all its going to be a powerfull program with added command line options like quickly adding keywords and output to screen or file etc...
    Last edited by JoshR; 08-30-2005 at 12:15 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Katrina Aftermath: Woeful Incompetence (rant).
    By anonytmouse in forum A Brief History of Cprogramming.com
    Replies: 61
    Last Post: 09-05-2005, 07:39 AM
  2. C++ Operator Overloading help
    By Bartosz in forum C++ Programming
    Replies: 2
    Last Post: 08-17-2005, 12:55 PM
  3. February 1, 2019...
    By Cheeze-It in forum A Brief History of Cprogramming.com
    Replies: 98
    Last Post: 08-03-2002, 07:24 AM
  4. Religious Bull****
    By Witch_King in forum A Brief History of Cprogramming.com
    Replies: 119
    Last Post: 10-23-2001, 07:14 AM
  5. IT people - weird genius or simply narrow-minded, antisocial, lazy people
    By Carlos in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 10-11-2001, 05:00 AM