Call for volunteers: C++ port of ANTLR backend

323 views
Skip to first unread message

Dan McLaughlin

unread,
Nov 9, 2014, 9:05:03 AM11/9/14
to antlr-di...@googlegroups.com
Hello,
   I've been working on the C++ backend for a year now and while it's gotten quite far it has a ways to go to "first compile". I could really use some help to get it over the final hump, any takers? 

   Background, the code was translated from Java to C++ using machine translation. The task so far is just getting it to compile. This means filling in missing code (C++ equivalent libraries for Java things like string handling) and otherwise fixing the machine translation glitches. At this point I have it down to a pattern, more or less, that you can follow. 

   Here's the ground rules. It's difficult to do work like this when you have a regular life, so the best approach IMO is to "snowflake" it. This means you can reliably put 1 hour into the work per day. Do you have an hour to spare, every day? Do you know C++? Then you can probably help. The second part is you need to be serious about it, it's worse for me if you sign up then quit, so please only do so if you intend to make it work. 

    For hardware I'm doing the project on Xcode/OS X. Doing a Visual Studio version has been tested and is an easy project to create. I don't recommend Linux unless you are handy with Makefiles and can set all of that up quickly. 

    If you can help please PM me or reply to this thread. Thanks -

Dan

David Riedel

unread,
Nov 10, 2014, 12:25:35 PM11/10/14
to antlr-di...@googlegroups.com
Dan

Is the code you have created thus far available somewhere so one can see in more detail what needs to be done?

Dave

Stephen Schleimer

unread,
Nov 10, 2014, 12:40:58 PM11/10/14
to antlr-di...@googlegroups.com
Dan,

I assume that you are directing your work at antlr4.  is this so?

Thanks

-steve

--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan McLaughlin

unread,
Nov 10, 2014, 12:44:12 PM11/10/14
to antlr-di...@googlegroups.com
Pretty hard to think of a reason somebody would spend a year+ doing a backend for a deprecated version :)

Stephen Schleimer

unread,
Nov 10, 2014, 1:25:38 PM11/10/14
to antlr-di...@googlegroups.com
Thanks

Jan Mikkelsen

unread,
Nov 11, 2014, 11:25:48 PM11/11/14
to antlr-di...@googlegroups.com
Hi,

Well, I’m certainly interested in taking a look. Can I see what has been done so far to understand what’s involved?

Thanks,

Jan Mikkelsen


Kevin Cummings

unread,
Nov 12, 2014, 2:26:32 PM11/12/14
to antlr-di...@googlegroups.com
On 11/09/2014 09:05 AM, Dan McLaughlin wrote:
> Hello,
> I've been working on the C++ backend for a year now and while it's
> gotten quite far it has a ways to go to "first compile". I could really
> use some help to get it over the final hump, any takers?
>
> Background, the code was translated from Java to C++ using machine
> translation. The task so far is just getting it to compile. This means
> filling in missing code (C++ equivalent libraries for Java things like
> string handling) and otherwise fixing the machine translation glitches.
> At this point I have it down to a pattern, more or less, that you can
> follow.
>
> Here's the ground rules. It's difficult to do work like this when you
> have a regular life, so the best approach IMO is to "snowflake" it. This
> means you can reliably put *1 hour* into the work per day. Do you have
> an hour to spare, every day? Do you know C++? Then you can probably
> help. The second part is you need to be serious about it, it's worse for
> me if you sign up then quit, so please only do so if you intend to make
> it work.

I might have an hour a day to work on this, but, a lot of my startup
time would be catching up and making it work in my work environment.
And my time would probably be spent in fewer, larger chunks of time.

> For hardware I'm doing the project on Xcode/OS X. Doing a Visual
> Studio version has been tested and is an easy project to create. I don't
> recommend Linux unless you are handy with Makefiles and can set all of
> that up quickly.

I run Linux, and I used to be handy with Makefiles. I'm a little rusty
ATM. I'm looking to be able to use the C++ support on a couple of my
pet projects which are written in C++ on Linux. I'd very much like to
be able to (re)use some C++ code that I wrote a while back. I have no
access to either OSX or Visual anything.

> If you can help please PM me or reply to this thread. Thanks -

> Dan
>
> --
> You received this message because you are subscribed to the Google
> Groups "antlr-discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to antlr-discussi...@googlegroups.com
> <mailto:antlr-discussi...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--
Kevin J. Cummings
kjc...@verizon.net
cumm...@kjchome.homeip.net
cumm...@kjc386.framingham.ma.us
Registered Linux User #1232 (http://www.linuxcounter.net/)

Dan McLaughlin

unread,
Nov 13, 2014, 2:12:45 PM11/13/14
to antlr-di...@googlegroups.com
Position filled, thanks for your interest. 

dasc...@gmail.com

unread,
Mar 12, 2015, 10:15:37 AM3/12/15
to antlr-di...@googlegroups.com
On Thursday, November 13, 2014 at 8:12:45 PM UTC+1, Dan McLaughlin wrote:
Position filled, thanks for your interest. 



What's the status on the C++ backend? It seems to take forever and I currently forced to use a very slow antlr3 backend.

Thanks for any updates.

Dan McLaughlin

unread,
Mar 12, 2015, 10:48:08 AM3/12/15
to antlr-di...@googlegroups.com

Yes it is taking forever, thanks for noticing. 

We otherwise have full lives, all it takes is things heating up at our day jobs (as full time Software Engineers), or an illness (bad flu season) or family events to slow down the work. That is, it's extraordinarily difficult to find time. 

The C++ port has turned out to be a bigger job. Not brain killing, just a lot of work to get all the syntax lined up and figured out for Java libs versus STL. 

Meanwhile you're welcome to help. Unfortunately people are more willing to wish for it to happen then to actually help the effort along. But at this point I'll take anybody who can lend a hand. The repo is under my account on GitHub. 

Jim Idle

unread,
Mar 13, 2015, 3:30:56 AM3/13/15
to antlr-di...@googlegroups.com
Why is your v3 version so slow? Perhaps we can help speed it up. Are you using the C or C++ back end for your v3 project?

Writing a v4 target is no small task, so you have to cut people some slack. When I wrote the C target for v3 I was lucky enough to work on it full time, but that is a rare occurrence for volunteers; I am sure that the people working on the C++ target are not able to work full time on it.

Jim

--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.

Ondrej Jakubcik

unread,
Mar 13, 2015, 4:52:14 PM3/13/15
to antlr-di...@googlegroups.com
Hi all,

I have been thinking about writing ANTLR 4 C++ generator/runtime since the first release. I am currently familiarizing myself in depth with the Java, C# and Python backends and I hope to start with C++ soon. I don't want to use automatic code conversion, as I want to use pure, idiomatic C++ (C++11).

Please note that I will be doing this in my spare time, so the code will not be available any time soon - probably in few months.

Thanks,
Ondrej

Dne neděle 9. listopadu 2014 15:05:03 UTC+1 Dan McLaughlin napsal(a):

Dan McLaughlin

unread,
Mar 13, 2015, 4:56:03 PM3/13/15
to antlr-di...@googlegroups.com
Sure if you like, but I think it's counter productive and considering that you are spare time also, a waste of effort. The one we have is clean and tight and has a lot of effort into it already, I don't see any advantage from working from scratch really. 

I'd recommend pitching in to the existing effort which is quite far along. Load it into Visual Studio (Xcode is having trouble seeing the final errors), there's only a couple dozen files with errors left. 

Ondrej Jakubcik

unread,
Mar 13, 2015, 5:02:54 PM3/13/15
to antlr-di...@googlegroups.com
Ok, thanks. I will definitely take a look.

O.
Reply all
Reply to author
Forward
0 new messages