[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-dev] Reusing parser tests
|
The design documentation on the CDT wiki is also very useful for understanding the architecture of the parsers (although the C99/UPC document is a bit out of date):
http://wiki.eclipse.org/CDT/designs
Mike Kucera
Software Developer
IBM CDT Team, Toronto
mkucera@xxxxxxxxxx
Mike Kucera---04/29/2008 11:15:36 AM---Richard,
Mike Kucera/Toronto/IBM@IBMCA
Sent by: cdt-dev-bounces@xxxxxxxxxxx
04/29/2008 11:14 AM
Please respond to
"CDT General developers list." <cdt-dev@xxxxxxxxxxx> |
|
|
Richard,
It definitely sounds like you may find the lrparser framework useful for your needs.
Currently support for C99 is pretty much done, although I don't have support for GCC extensions yet. I've extended the C99 LR parser to add support for UPC (Unified Parallel C) to CDT. If you want to see what a language extension looks like using this framework take a look at the UPC plugin which is also in CVS. Nobody other than me is really using this stuff yet so I would love any comments or suggestions you might have.
Support for C++ is still a work in progress, but its coming along quite well.
Mike Kucera
Software Developer
IBM CDT Team, Toronto
mkucera@xxxxxxxxxx
"Richard Miskin" ---04/28/2008 10:47:10 AM---Mike,
"Richard Miskin" <Richard.Miskin@xxxxxxx>
Sent by: cdt-dev-bounces@xxxxxxxxxxx
04/28/2008 10:46 AM
Please respond to
"CDT General developers list." <cdt-dev@xxxxxxxxxxx> |
|
|
Mike,
Sounds like you’ll be working on exactly the sort of thing I’d need. I’ll try and have a look at the lrparser test plugin in the next day or so to see what you’ve done - I assume that’s in CVS.
The ILanguage I’m adding is based on the C/C++ parser from EDG. Our commercial product (Cantata++) uses this and it is configured in such a way that we can enable/disable language features at run time. This means the same exes support MSVC, GCC, Sun’s CC and many target compilers. In particular we can specify options to accept different language keywords in various places, e.g. near or far.
We have a user interface for this that is based on Eclipse/CDT but a problem we’ve seen is that customers have code that uses language extensions that works with our parser and their compiler but causes problems for the CDT GNU parser. This isn’t really surprising as gcc won’t accept it either, but it is an issue for our customers.
In addition we provide the ability to generate and edit test scripts, but this is based on a combination of information produced by our tool at compile time and information gleaned from the AST. With my ILanguage implementation every IASTNode can contain additional data that is useful to us and we wouldn’t have to rely on the files generated at compile time. This would be a big plus for us as there are situations where the way the EDG parser describes an item doesn’t necessarily match to the way it is in the AST.
The theory is that If we can get our parser into Eclipse then everything should ‘just work’. Unfortunately the structure of the EDG Intermediate Language doesn’t closely match the AST all the time and EDG parser is written in C so there’s a nice JNI layer involved.
The question of how far I am through implementing it is a tricky one; I’m further through C than C++ but testing it is a little tricky. The main reason I want to try reusing the existing CDT tests is to give myself a better idea of what I’m missing. Also I’ve not attempted to support code completion yet.
Cheers,
Richard
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Mike Kucera
Sent: Friday 25 April 2008 14:47
To: CDT General developers list.
Subject: Re: [cdt-dev] Reusing parser tests
I'm reusing many of the tests for my own ILanguage implementation. Its pretty cumbersome at the moment, because the tests don't actually call the parser through ILanguage. Instead they call the CDT core parser directly. The way I was able to reuse the tests was to subclass each one individually and override whatever parse() method the test has. Take a look in the lrparser test plugin to see how it works.
I am planning on doing something to improve the situation. I want to refactor the tests to use ILanguage and make it easy to specify your own ILanguage to run. It would also be useful to turn off individual tests because not all parsers are created equal. Now that CDT has language extensibility it needs to have extensible and reusable test suites also.
This is something I will probably be working on very soon. If you have any comments please let me know.
I'm also curious, what's your language that you're adding? How far are you in implementing it? I'm working on a parser framework that will make it easier to add language extensions to CDT. If you are working on an extension to C or C++ then we should talk.
Mike Kucera
Software Developer
IBM CDT Team, Toronto
mkucera@xxxxxxxxxx
"Richard Miskin" ---04/25/2008 03:23:04 AM---Hi,
"Richard Miskin" <Richard.Miskin@xxxxxxx>
Sent by: cdt-dev-bounces@xxxxxxxxxxx
04/25/2008 03:22 AM
Please respond to
"CDT General developers list." <cdt-dev@xxxxxxxxxxx> |
|
|
Hi,
I’m in the process of creating a new ILanguage that uses our parser to produce a CDT AST (with bindings etc). I’ve got some tests that I’ve written myself but I was wondering whether it would be viable to reuse any of the existing tests from the CDT project.
Any views?
Cheers,
Richard
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the addressee, any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is strictly prohibited. If you have received this transmission in error please notify the sender immediately and then delete this email.
Any representations or commitments expressed in this email are subject to contract.
This message has been scanned for viruses and dangerous content. However, it is essential that the recipient also checks this message using commercially available mail scanning and anti-virus software. IPL Information Processing Limited accepts no liability for any loss or damage resulting from any virus or other dangerous content in this message.
IPL Information Processing Limited is registered in England and Wales under company registration number 1418818. Registration took place at Cardiff on 10 May 1979. IPL Information Processing Limited's registered office and normal place of business is Eveleigh House, Grove Street, Bath, BA1 5LR, United Kingdom. IPL is also registered for Value Added Tax (VAT) under registration number GB 601 2931 83._______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the addressee, any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is strictly prohibited. If you have received this transmission in error please notify the sender immediately and then delete this email.
Any representations or commitments expressed in this email are subject to contract.
This message has been scanned for viruses and dangerous content. However, it is essential that the recipient also checks this message using commercially available mail scanning and anti-virus software. IPL Information Processing Limited accepts no liability for any loss or damage resulting from any virus or other dangerous content in this message.
IPL Information Processing Limited is registered in England and Wales under company registration number 1418818. Registration took place at Cardiff on 10 May 1979. IPL Information Processing Limited's registered office and normal place of business is Eveleigh House, Grove Street, Bath, BA1 5LR, United Kingdom. IPL is also registered for Value Added Tax (VAT) under registration number GB 601 2931 83._______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev(See attached file: pic30516.gif)_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
![GIF image](gif2fVi4wf5cN.gif)
![GIF image](gifEd8ccEnTdl.gif)
![GIF image](gifB6GkXIUMUX.gif)
![GIF image](gifr0rnuU185Z.gif)
![GIF image](gifGzMkcP4E2Y.gif)
![GIF image](gifCj_KZTaY7Y.gif)
![GIF image](gifvVww8EY95w.gif)
![GIF image](gif1ij2b63ZRl.gif)
Attachment:
pic30516.gif
Description: GIF image