Re: [PHP] Syntax highlighting of odd language

2004-11-08 Thread Aaron Gould
M. Sokolewicz wrote: Now, the problem with such a solution is the following. Imagine you have the following keywords: include require in of typof now, when you replace include with span class=highlightedinclude/span, it'll go on, and also replace all instances of in, so you'll end up with

[PHP] Syntax highlighting of odd language

2004-11-05 Thread Aaron Gould
Could any of you privide some leads in regard to highlighting syntax of an odd language? I have a large amount of snippits of legacy code from our company's primary application. The code used is BBx (a variant of Basic). I'm attempting to show this code on a web page, but with highlighting of

Re: [PHP] Syntax highlighting of odd language

2004-11-05 Thread Bruno B B Magalhães
Aaron, why don't you use a very simle sintax like this one: $code = 'function what() { do oddname; %oddsyntax }'; function highlight_code($code) { $oddsyntax = array('oddsyntax','oddsyntax2','oddsyntax3'); for($i = 0; $i = count($oddsyntax)-1; $i++) { $highlighted_code =

Re: [PHP] Syntax highlighting of odd language

2004-11-05 Thread Aaron Gould
Bruno B B Magalhães wrote: $code = 'function what() { do oddname; %oddsyntax }'; function highlight_code($code) { $oddsyntax = array('oddsyntax','oddsyntax2','oddsyntax3'); for($i = 0; $i = count($oddsyntax)-1; $i++) { $highlighted_code = eregi_replace($oddsyntax[$i],'spam

Re: [PHP] Syntax highlighting of odd language

2004-11-05 Thread M. Sokolewicz
Aaron Gould wrote: Bruno B B Magalhães wrote: $code = 'function what() { do oddname; %oddsyntax }'; function highlight_code($code) { $oddsyntax = array('oddsyntax','oddsyntax2','oddsyntax3'); for($i = 0; $i = count($oddsyntax)-1; $i++) { $highlighted_code =