May 22, 2013 Re: C++ parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to nazriel Attachments:
| Hmmm... Or you could try using pegged (or CTPG or goldie or dparser). I haven't played with it too much, but there's a C grammar, and it mentions the ability to specify semantic actions, so.... That's like 1/3 of the way to something usable. https://github.com/PhilippeSigaud/Pegged/wiki/Semantic-Actions |
May 22, 2013 Re: C++ parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to 1100110 | On Wednesday, 22 May 2013 at 20:39:08 UTC, 1100110 wrote:
> Hmmm... Or you could try using pegged (or CTPG or goldie or dparser).
>
> I haven't played with it too much, but there's a C grammar, and it
> mentions the ability to specify semantic actions, so.... That's like 1/3
> of the way to something usable.
>
> https://github.com/PhilippeSigaud/Pegged/wiki/Semantic-Actions
Writing C++ grammar parser in Pegged/Goldie from scratch so that it can produce usable AST... Well, good luck! :)
|
May 22, 2013 Re: C++ parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot Attachments:
| On 05/22/2013 04:07 PM, Dicebot wrote: > On Wednesday, 22 May 2013 at 20:39:08 UTC, 1100110 wrote: >> Hmmm... Or you could try using pegged (or CTPG or goldie or dparser). >> >> I haven't played with it too much, but there's a C grammar, and it mentions the ability to specify semantic actions, so.... That's like 1/3 of the way to something usable. >> >> https://github.com/PhilippeSigaud/Pegged/wiki/Semantic-Actions > > Writing C++ grammar parser in Pegged/Goldie from scratch so that it can produce usable AST... Well, good luck! :) I know right? (I figured there's probably a half-baked one floating around somewhere...) But we kinda need something good like http://luajit.org/ext_ffi.html... |
May 22, 2013 Re: C++ parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to 1100110 | On Wednesday, 22 May 2013 at 21:38:49 UTC, 1100110 wrote:
> ...
I simply don't understand why do you find libclang unsuitable.
|
May 22, 2013 Re: C++ parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot Attachments:
| On 05/22/2013 04:40 PM, Dicebot wrote:
> On Wednesday, 22 May 2013 at 21:38:49 UTC, 1100110 wrote:
>> ...
>
> I simply don't understand why do you find libclang unsuitable.
>
hmmm? I never said it was unsuitable, I think you mistaking me for
someone else.
(I also have no experience with libclang, and I'm tired of manually
translating these things... So, am I looking for a way to not translate
this? Yes.)
Also I'm pretty sure I'd need help with something like this...
|
May 23, 2013 Re: C++ parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to 1100110 | On 2013-05-22 22:33, 1100110 wrote: > Yeah, I was afraid of that... > > So, Now the next easiest thing is probably SWIG. Hey, at least give me a change to fix the problem. -- /Jacob Carlborg |
May 23, 2013 Re: C++ parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to nazriel | On 2013-05-22 22:17, nazriel wrote: > I am afraid it doesn't build anymore with DMD git-head. > It isn't dstep itself but one of its dependencies. > > I wanted to use it in order to create bindings for XCB but couldn't > built it. Could you use the pre compiled binary in the mean time: https://github.com/jacob-carlborg/dstep/downloads I forgot to put a link to the downloads on the front page. -- /Jacob Carlborg |
May 23, 2013 Re: C++ parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to 1100110 | On 2013-05-23 00:17, 1100110 wrote: > hmmm? I never said it was unsuitable, I think you mistaking me for > someone else. > (I also have no experience with libclang, and I'm tired of manually > translating these things... So, am I looking for a way to not translate > this? Yes.) > > > Also I'm pretty sure I'd need help with something like this... I'm here to help, DStep is also here to help. I'll see if I can get it up an running again. -- /Jacob Carlborg |
May 23, 2013 Re: C++ parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg Attachments:
| On 05/23/2013 01:25 AM, Jacob Carlborg wrote:
> On 2013-05-23 00:17, 1100110 wrote:
>
>> hmmm? I never said it was unsuitable, I think you mistaking me for
>> someone else.
>> (I also have no experience with libclang, and I'm tired of manually
>> translating these things... So, am I looking for a way to not translate
>> this? Yes.)
>>
>>
>> Also I'm pretty sure I'd need help with something like this...
>
> I'm here to help, DStep is also here to help. I'll see if I can get it up an running again.
>
Hell yeah!
I didn't realize dstep was yours.
If I can do anything to help, let me know.
|
May 23, 2013 Re: C++ parser | ||||
---|---|---|---|---|
| ||||
Posted in reply to 1100110 | On 2013-05-23 11:44, 1100110 wrote: > Hell yeah! > I didn't realize dstep was yours. > > > If I can do anything to help, let me know. It works with DMD 2.062. To get it to work with DMD 2.063 there are is regression that needs to be fixed for find a workaround for. Tango fails to compile because of this. http://d.puremagic.com/issues/show_bug.cgi?id=10142 -- /Jacob Carlborg |
Copyright © 1999-2021 by the D Language Foundation