Is there someone who has written a lexer in lua? Can he/she post the code? What is the name of the file? In what directory was saved the file with the lexer? Can he/she post the lines in the .properties file regarding the lexer?
I think what it does is, basically, define "preset" lexer functions, and effects, for doing the basics, then allows you to "extend" that, using the same sort of Lua stuff that you are trying to mess with. This means that, as long as most of your language definitions don't require anything really odd, its fairly easy to set up. The instructions are.. a bit inspecific to follow, which was the problem I ran into. Certain things are "required", for example:
{ 'any_char', l.any_char }
which is in the M._rules. This has the effect of "turning off" what ever highlighting was already in effect. I discovered, without it, it would react to the first thing it found, but then all other code would fail to highlight. The documentation also talks about existing style definitions. I ended up adding what I needed manually for those, but otherwise you have to add a line to import them. Obvious, in retrospect, but not so obvious if you are hacking the thing together, and making assumptions. In any case, I posts the lexer I made using it in the thread, and it might be a lot easier to use scintallua, than to start completely from scratch, especially since I have no idea how much "pre-work" is included, which you would have to do yourself, to make lua do anything at all, without the stuff the guy already did:
> Is there someone who has written a lexer in lua? Can he/she post the code? > What is the name of the file? In what directory was saved the file with the > lexer? Can he/she post the lines in the .properties file regarding the > lexer?
> Is there someone who has written a lexer in lua? Can he/she post the code? What is the
> name of the file? In what directory was saved the file with the lexer? Can he/she post the
> lines in the .properties file regarding the lexer?
If you search the mailing list around the time the feature was introduced (last year?), you can find some (simple) examples.
I will make another more detailed answer later...
-- Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Is there someone who has written a lexer in lua? Can he/she post the code?
>> What is the
>> name of the file? In what directory was saved the file with the lexer? Can
>> he/she post the
>> lines in the .properties file regarding the lexer?
> If you search the mailing list around the time the feature was introduced
> (last year?), you can find some (simple) examples.
> I will make another more detailed answer later...
> --
> Philippe Lhoste
> -- (near) Paris -- France
> -- http://Phi.Lho.free.fr > -- -- -- -- -- -- -- -- -- -- -- -- -- --
> --
> You received this message because you are subscribed to the Google Groups
> "scite-interest" group.
> To post to this group, send email to scite-interest@googlegroups.com.
> To unsubscribe from this group, send email to
> scite-interest+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/scite-interest?hl=en.
-- Best regards,
Jingcheng Zhang
Beijing, P.R.China