This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kate syntax highlighting idea

6

Votes
6
0
Tags: kate, syntax kate, syntax kate, syntax
(comma "," separated)
zaufi
Registered Member
Posts
1
Karma
0
OS

Kate syntax highlighting idea

Fri Dec 03, 2010 9:20 am
Hi all!

Recently I've tried to write a C++ highlighting from scratch using a BNF grammar (http://www.nongnu.org/hcb/). My idea was to create the highlighting to be context sensitive according a real C++ grammar... for example:

template <typedef SomeType>
class MyClass;

is it the illegal code and idea was to highlight it as error cuz typedef is inappropriate in this context.

As u may suggest my attempt was failed (kate crashed, cuz it is impossible to include rules recursively). But I still believe that it would be hard (harder than nowadays), but quite possible to have a syntax highlighting system as grammar FSM.

I think that having such system will help to type a valid C++ code and see a lot of errors before compile... particularly this should help to beginners to explore a C++ syntax & etc...

What do u think?? Is it possible?


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]