Nice job, Yves!
Good idea and with all your revisions it will be real nice!
P.M. Why did U post debug version? It's more than 200 kb, and such people who has not VC++ compiler can't recompile it for release version wich has more less size?
"UNIX is simple; it just takes a genius to understand its simplicity!"
Originally posted by dimm_coder
Nice job, Yves!
Good idea and with all your revisions it will be real nice!
P.M. Why did U post debug version? It's more than 200 kb, and such people who has not VC++ compiler can't recompile it for release version wich has more less size?
Ups you are right I totally forgot about that when I first posted the program. I'll make the program again and change the first link.
[ok it is changed now ]
Last edited by Yves M; November 5th, 2002 at 08:26 AM.
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
int f(float d)
// Checks whether the number is positive or negative
{
if (f > 0) {
printf("postive\n");
return 1;
} else {
printf("negative or zero\n");
return -1;
}
}
Hey guys, I had modified Yves's code to add *code* tags and a colour coding for integer and floating point.
I got a bit of problem here, so I will upload the source later.
The program is still not fully tested yet. If you found any bugs, please let me know.
CBasicNet's exe gives an error when I click on the icon in the tray. [EDIT ]And I forgot to read the first post of Yves explaining how the program works, it probably works indeed. My sincere apologies.[/EDIT]
Last edited by Simon666; November 5th, 2002 at 08:33 AM.
Originally posted by Simon666
CBasicNet's exe gives an error when I click on the icon in the tray. [EDIT ]And I forgot to read the first post of Yves explaining how the program works, it probably works indeed. My sincere apologies.[/EDIT]
I was afraid the capitals could be misunderstood. I am not shouting or angry you know. I'm never angry when code doesn't work, except when it is mine or when it is formatting my harddisk. Neither is the case. Maybe I should have underlined it and added a couple of smilies. Sorry man, it is my fault. I just saw something interesting to download and never read how to use it in the first post.
Originally posted by Simon666
I was afraid the capitals could be misunderstood. I am not shouting or angry you know. I'm never angry when code doesn't work, except when it is mine or when it is formatting my harddisk. Neither is the case. Maybe I should have underlined it and added a couple of smilies. Sorry man, it is my fault. I just saw something interesting to download and never read how to use it in the first post.
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
Ok, so what's up with the next version ? Well I didn't work on it yesterday, but maybe today I'll finish it. Thanks to a discussion with Gabriel, I decided to scrap the complicated configuration dialog and parse the "parsers" from text files instead. Maybe I don't even need the whole thing about the registry... Hum well
Actually a small preview of what a configuration file looks like :
Of course the COLOR tags don't include the "-", that's just so that it doesn't get parsed by the board.
The main things are: Special characters in the input file
To be able to specify special characters in the input file, the following tags are used:
\n = newline (character 10)
\r = carriage return (character 13)
\t = tab (character 9)
\e = empty character (this ends a string if it appears in a string, or maps an input sequence to nothing. In the example, the carriage return is mapped to nothing)
\w = white space (character 32)
\# = # (this is used since comments and section starts in the input file begin with #)
Rules
The first string in the line is the start string for the rule, the second one the end string. Then comes the start code tag and finally the end code tag. The number (0, 1, 2 or) indicates whether to include the beginning (1) and the end (2) string inside the code tag. For example for the "//" comments its nicer not to include the newline inside the code tag.
An optional string can be used for escaping the end string. This means that if in a string for example we find a "\", we'll just skip the next character and hence not end the string if it was actually \".
One limitations is the fact that each rule must have a unique starting string. If two rules have the same one, the first rule will simply take precedence.
Symbols
This is the translation of the special symbols. For example here, a tab is converted to two spaces. This only works for one character at a time in the input though.
Last edited by Yves M; November 5th, 2002 at 10:45 AM.
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
The version of the Syntax Highlighter with customizable rules is out in the wild !
So the new things in this version are (some announced before) User Interface
The UI is pretty simple, here is an example what it looks like for default. Since you can change the parsers, you can also change the text that appears on the buttons in the right column.
Usage is as before. You copy some source code to the clipboard, then left-click on the taskbar icon (or click on the "Parse" button), and then paste the parsed code into vBulletin.
The active parser is highlighted in blue, so in the picture above you can see that I'm using the C++ for vBulletin parser
Configuration Files
The program doesn't come with configuration files and actually doesn't really need them. However if the directory you installed it into is not write protected, it automatically generates default configuration files named "SynHlt.cfg" and four files with an ".scg" extension. The SynHlt.cfg file contains the text that appears on the buttons and the names of the files describing the respective parsers. When the program is loaded, the first parser that appears in SynHlt.cfg is made the default.
I described the format of the .scg files in the previous post. You can change them to change for example the colors or the list of keywords.
License Agreement
By downloading either the program, you accept full responsibility for it. That means that it is as if you had programmed it yourself. So no restrictions at all on copying, modifying, using to drive nuclear power plants, as long as you are aware that all responsibility falls on you
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.