Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How can I implement an Editor which supports a mixed language whose grammar is mixed of C and C++?
How can I implement an Editor which supports a mixed language whose grammar is mixed of C and C++? [message #691266] Fri, 01 July 2011 06:26 Go to next message
luj_ghost83 is currently offline luj_ghost83Friend
Messages: 2
Registered: July 2011
Junior Member
Hi,
Eclipse C editor can check syntax errors. I am trying to implement a kind of editor that should support a C-like language(standard c language + some other grammar).I want the editor to check the syntax error. But the grammar may be a mixed grammar. It is mainly a C grammar but it also mixes some C++ grammar in it.

The language should support statements like:
extern "**" int a;

But as I know, this kind of statement is only supported in C++ language. So Can I just extend any extension point and reuse the existing C parser or C++ parser, overriding some methods to add some grammar rules to achieve this? Or I should re-implement a new parser?

Thanks!
Re: How can I implement an Editor which supports a mixed language whose grammar is mixed of C and C+ [message #695760 is a reply to message #691266] Tue, 12 July 2011 13:53 Go to previous message
Tony Tang is currently offline Tony TangFriend
Messages: 5
Registered: July 2011
Junior Member
What you need to do is not only a new parser,you also have to re-implement a new language and a series relative classes.Since the codan checker is based on index parser,which need more work to do.
Previous Topic:Public API equivalent of method findWord()
Next Topic:How can I automatically switch to C/C++ Perspective from Debug Perspective
Goto Forum:
  


Current Time: Fri Apr 26 21:08:59 GMT 2024

Powered by FUDForum. Page generated in 0.02791 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top