Registered Member
|
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? |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]