Author Topic: PHP lexer  (Read 4783 times)

sethjackson

  • Guest
PHP lexer
« on: May 31, 2006, 04:19:58 pm »
I'm having trouble getting a PHP lexer working......

Code::Blocks only applies the "Start tag" style. None of the others are applied..... What is wrong here?

Code: xml
<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_lexer_properties>
<CodeBlocks_lexer_properties>
<Lexer name="PHP"
index="4"
filemasks="*.php">
<Style name="Default"
index="118"
fg="0,0,0"
bg="255,255,255"
bold="0"
italics="0"
underlined="0"/>
                <Style name="Start tag"
                        index="18"
                        fg="0,0,187"/>
                <Style name="Complex variable"
                        index="104"
                        fg=""/>
                <Style name="Double quote string"
                        index="119"
                        fg="0,0,255"/>
                <Style name="Single quote string"
                        index="120"
                        fg="224,160,0"/>
                <Style name="Keyword"
                        index="121"
                        fg="0,0,160"/>
                <Style name="Number"
                        index="122"
                        fg="240,0,240"/>
                <Style name="Variable"
                        index="123"
                        fg="160,0,0"/>
                <Style name="Comment"
                        index="124"
                        fg="160,160,160"/>
                <Style name="One line comment"
                        index="125"
                        fg="160,160,160"/>
                <Style name="String variable"
                        index="126"
                        fg=""/>
                <Style name="Operator"
                        index="127"
                        fg="255,0,0"/>
                <SampleCode value="lexer_php.sample"/>
        </Lexer>
</CodeBlocks_lexer_properties>

EDIT:

I probably need to add the PHP keywords, but still the other styles should work......
« Last Edit: May 31, 2006, 04:23:42 pm by sethjackson »

takeshimiya

  • Guest
Re: PHP lexer
« Reply #1 on: May 31, 2006, 04:57:11 pm »
Regarding your question, I don't know.

See the attached lexer, completely un-tested and un-working, but can serve you as a start.

I don't know how'll you handle php/js/vbs/etc inside html and the other way around (embedded), but if it can't be done don't loose much time with that.

[attachment deleted by admin]

sethjackson

  • Guest
Re: PHP lexer
« Reply #2 on: May 31, 2006, 05:23:24 pm »
Regarding your question, I don't know.

See the attached lexer, completely un-tested and un-working, but can serve you as a start.

I don't know how'll you handle php/js/vbs/etc inside html and the other way around (embedded), but if it can't be done don't loose much time with that.

Yeah I won't it was just that killerbot requested it, and since I was going to try to get it working so I could use C::B with PHP.

Anyways I'm working on a separate HTML lexer that I will submit to BerliOS later.

Offline tretton

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: PHP lexer
« Reply #3 on: June 28, 2006, 03:36:00 pm »
Ohhh, yes! Using CodeBlocks for PHP would be the sweeeeetest thing. I have yet to find a good PHP IDE, and since CB is so great and I'm already used to it, why not use it for PHP too! ;)