Re: Syntax highlighting of odd language
| From: | M. Sokolewicz | Date: | Fri, 05 Nov 2004 20:44:21 +0000 |
| Subject: | Re: Syntax highlighting of odd language | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201321@lists.php.net to get a copy of this message | ||
Aaron Gould wrote:
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 keywords and variables/numbers. I've already got a list of the language's 250-odd keywords in a file. I saw a "Text_Highlighter" PEAR class, but that seems to only do a bunch of predefined popular languages (ie. SQL, PHP, C). Please don't ruin my Friday afternoon and tell me I'll need to dig into regular expressions..... :) regexps are a minimum... What I'd suggest it so find a correctly working parser, which basically feeds your script with the info about what it encounters where. Eg using m4. (gnu.org/software/m4) But that's just my point of view :)