Re: Trying to create a new language with udl
Markus Dahlbokum <[email protected]>
| Newsgroups | gmane.comp.ide.komodo.general |
|---|---|
| Organization | Intes |
| Message-ID | <[email protected]> |
Hi Eric, thank you for the help. The code you sent works fine. You mentioned to put the udl file into the dir where I execute koext. This was not necessary in my case. But I got some other problems. Komodo edit 5.0.2 colors the lines correctly but then crashes. V4.2.1 works fine. So I'm doing my work on 4.2.1 now (I chose this version because you don't need GLIBC_2.4). Next I tried to switch the code you sent me to SSL family (style names would fit better): ######################################################## # UDL for permas language permas family SSL initial IN_SSL_DEFAULT sublanguage permas start_style SSL_DEFAULT end_style SSL_VARIABLE state IN_SSL_DEFAULT: '!' : paint(upto, SSL_DEFAULT), => IN_DAT_COMMENT state IN_DAT_COMMENT: /[\r\n]/ : paint(upto, SSL_COMMENT), paint(include, SSL_DEFAULT), => IN_SSL_DEFAULT ######################################################## The build works but no coloring. Same with CSL. Any Ideas? For my syntax coloring it is important to match strings ignoring the case. The luddite docu says regular expressions are perl like. So I tried: i/pattern/ : paint... but this is invalid syntax for luddite. How can I do this? Thanks again for your help, Markus On Wednesday 03 December 2008 20:42:16 you wrote: > Hi Markus, > > I can duplicate both problems. > > This starter code works: > > ######################################################## > # UDL for permas > > language permas > > family markup > initial IN_M_DEFAULT > > sublanguage permas > > start_style M_DEFAULT > end_style M_COMMENT > > state IN_M_DEFAULT: > '!' : paint(upto, M_DEFAULT), => IN_DAT_COMMENT > > state IN_DAT_COMMENT: > /[\r\n]/ : paint(upto, M_COMMENT), paint(include, M_DEFAULT), => > IN_M_DEFAULT > > ######################################################## > > but only if it's in the target directory where you run > koext from. If you don't put it in there, koext processes > an empty UDL file, which triggers a crash when Komodo > tries to load a .perm file. > > See http://bugs.activestate.com/show_bug.cgi?id=81200 for details. > > BTW, the difference is that I provided an initial-state directive. > Looks like without it, no coloring takes place. (I should know, > I wrote it, but it was a while ago...). > > - Eric > > Markus Dahlbokum wrote: > > Hello, > > > > I'm trying to create a new language with syntaxhighlighting. I'm new to > > Luddite so I'm running into problems. > > > > What I've done so far: > > - I've downloaded the latest Komodo edit (5.0.2) > > - I used 'koext startext' > > and 'koext startlang' to create the base files > > - I edited the .udl files: > > > > permas-mainlex.udl: > > # UDL for permas > > > > language permas > > > > #... > > include 'permasDAT.udl' > > > > > > permasDAT.udl: > > # UDL for permasDAT > > > > family markup > > sublanguage permas > > > > start_style M_DEFAULT > > end_style M_COMMENT > > > > state IN_M_DEFAULT: > > '!' : paint(upto, M_DEFAULT), => IN_DAT_COMMENT > > > > state IN_DAT_COMMENT: > > '\n' : paint(upto, M_COMMENT), => IN_M_DEFAULT > > > > > > > > - Then I buit the package with 'koext buid' (no errors) > > > > Finally I installed the .xpi file and opened a file - no colored output! > > As far as I understand the udl files should switch to the DAT_COMMENT if > > a '!' is found. Then everything up to the end of line ist painted as > > M_COMMENT. > > > > What am I doing wrong??? > > > > Thanks for your help, > > Markus > > _______________________________________________ > > Komodo-discuss mailing list > > [email protected] > > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > Other options: > > http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss _______________________________________________ Komodo-discuss mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss