Re: Trying to create a new language with udl

Eric Promislow <[email protected]>
Newsgroups gmane.comp.ide.komodo.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.