Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: sethjackson on March 05, 2006, 08:15:37 pm

Title: NSIS lexer
Post by: sethjackson on March 05, 2006, 08:15:37 pm
Hi I've been working on a NSIS lexer (which I will submit to the tracker as soon as I solve this problem).

So the problem is this.

Code: xml
<!-- Variables -->
                        <Set index="1"
                            value="$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $R0 $R1 $R2 $R3 $R4 $R5 $R6 $R7
                                   $R8 $R9 $\t $\" $\' $\` $VARNAME $0, $INSTDIR $OUTDIR $CMDLINE
                                   $LANGUAGE $PROGRAMFILES $COMMONFILES $DESKTOP $EXEDIR ${NSISDIR}
                                   $WINDIR $SYSDIR $TEMP $STARTMENU $SMPROGRAMS $SMSTARTUP
                                   $QUICKLAUNCH $DOCUMENTS $SENDTO $RECENT $FAVORITES $MUSIC
                                   $PICTURES $VIDEOS $NETHOOD $FONTS $TEMPLATES $APPDATA $PRINTHOOD
                                   $INTERNET_CACHE $COOKIES $HISTORY $PROFILE $ADMINTOOLS $RESOURCES
                                   $RESOURCES_LOCALIZED $CDBURN_AREA $HWNDPARENT $PLUGINSDIR
                                   $$ $\r $\n"/>

These are the NSIS variables. However I have one small problem. This right here.

Code: xml
$\"

The lexer will not load because of this variable. How do I fix it so the lexer will load and this variable is in the list?
Title: Re: NSIS lexer
Post by: sethjackson on March 06, 2006, 02:18:02 am
Woohoo I got it. :D

Code: xml
<!-- Variables -->
                        <Set index="1"
                            value="$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $R0 $R1 $R2 $R3 $R4 $R5 $R6 $R7
                                   $R8 $R9 $\t $\&quot; $\' $\` $VARNAME $0, $INSTDIR $OUTDIR $CMDLINE
                                   $LANGUAGE $PROGRAMFILES $COMMONFILES $DESKTOP $EXEDIR ${NSISDIR}
                                   $WINDIR $SYSDIR $TEMP $STARTMENU $SMPROGRAMS $SMSTARTUP
                                   $QUICKLAUNCH $DOCUMENTS $SENDTO $RECENT $FAVORITES $MUSIC
                                   $PICTURES $VIDEOS $NETHOOD $FONTS $TEMPLATES $APPDATA $PRINTHOOD
                                   $INTERNET_CACHE $COOKIES $HISTORY $PROFILE $ADMINTOOLS $RESOURCES
                                   $RESOURCES_LOCALIZED $CDBURN_AREA $HWNDPARENT $PLUGINSDIR
                                   $$ $\r $\n"/>

I used &quot; instead of ". DOH! I'm going to post the NSIS lexer to the tracker soon.
Title: Re: NSIS lexer
Post by: sethjackson on March 06, 2006, 02:30:01 am
Here is the link to the tracker. :D

https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=898&group_id=5358
Title: Re: NSIS lexer
Post by: killerbot on March 06, 2006, 07:32:27 am
a great job from our lexer expert once again.


Does anyone have a "SethLexer"  ?  :lol: :lol: :lol: :lol:
Title: Re: NSIS lexer
Post by: takeshimiya on March 06, 2006, 08:01:18 am
a great job from our lexer expert once again.


Does anyone have a "SethLexer"  ?  :lol: :lol: :lol: :lol:

lol, I'm writting one :lol:
Title: Re: NSIS lexer
Post by: sethjackson on March 06, 2006, 05:57:22 pm
 :lol: :lol:

BTW Takeshi do you have a FreeBasic lexer somewhere? Otherwise....  :lol:

NSIS lexer is in SVN HEAD now. Yay! :D
Title: Re: NSIS lexer
Post by: takeshimiya on March 06, 2006, 10:46:11 pm
:lol: :lol:

BTW Takeshi do you have a FreeBasic lexer somewhere?
Yes, long ago.
But now I'm writting the SethLexer, which is better. :)
Title: Re: NSIS lexer
Post by: sethjackson on March 06, 2006, 10:50:37 pm
I can't wait for the SethLexer.  :lol: Umm are you going to submit the FreeBasic lexer to the tracker?
Title: Re: NSIS lexer
Post by: takeshimiya on March 06, 2006, 10:51:59 pm
I can't wait for the SethLexer.  :lol: Umm are you going to submit the FreeBasic lexer to the tracker?
Of course, I'm just thinking if it's better to merge with VB/VBScript/PowerBasic lexers or left each alone.
Title: Re: NSIS lexer
Post by: sethjackson on March 06, 2006, 10:56:38 pm
Umm I think it would be better to have them seperate.....  :)

EDIT:

That is how SciTE does it.
Title: Re: NSIS lexer
Post by: thomas on March 06, 2006, 11:08:21 pm
We should also change the key binding for "replace" to Ctrl-H and always open Code::Blocks in a unergonomic default size. That's what SciTE does, too.

Oh, and we should not show line numbers, no matter how often the user enables that option :lol:
Title: Re: NSIS lexer
Post by: sethjackson on March 06, 2006, 11:11:14 pm
We should also change the key binding for "replace" to Ctrl-H and always open Code::Blocks in a unergonomic default size. That's what SciTE does, too.

Oh, and we should not show line numbers, no matter how often the user enables that option :lol:

 :lol: :lol:

Not exactly what I meant...... Anyways I still think the *Basic lexers should be seperate.
Title: Re: NSIS lexer
Post by: takeshimiya on March 06, 2006, 11:26:41 pm
We should also change the key binding for "replace" to Ctrl-H and always open Code::Blocks in a unergonomic default size.
The keybindings are user-configurable, and the default size too. Don't blame for free.

Oh, and we should not show line numbers, no matter how often the user enables that option :lol:
I always have line numbers on in SciTE, it's also a setting. Don't blame for free.

Umm I think it would be better to have them seperate.....  :)
EDIT:
That is how SciTE does it.
AFAIK, no, it's the opposite. If you open the SciTE vb lexer, you'll find in the same file lexers for: VB, VBScript, and VB.NET, among others.
Title: Re: NSIS lexer
Post by: sethjackson on March 06, 2006, 11:36:21 pm
I meant FreeBasic is seperate from VB, which is seperate from BlitzBasic etc...... Yeah the VB stuff is combined. Who uses VB anyways?
Title: Re: NSIS lexer
Post by: takeshimiya on March 06, 2006, 11:38:27 pm
I meant FreeBasic is seperate from VB, which is seperate from BlitzBasic etc...... Yeah the VB stuff is combined. Who uses VB anyways?
Me not, but the other day, the autor of the FreeBasic IDE went here in the forum, so no language (nor editor) wars please.
Title: Re: NSIS lexer
Post by: sethjackson on March 06, 2006, 11:41:54 pm
 :lol: I'm not going to start a war. :D
Title: Re: NSIS lexer
Post by: takeshimiya on March 06, 2006, 11:45:22 pm
:lol: I'm not going to start a war. :D
You never know, saying "Who uses VB anyways?" can upset some persons.
As blaming some editors for free, can upset some persons too.
Title: Re: NSIS lexer
Post by: sethjackson on March 07, 2006, 12:20:05 am
I guess so. I need to watch what I say I guess.... I'll try to be more careful from now on. :D