ANTLR

From: Peter (BOUGHTONP)24 Nov 2009 22:05
To: ALL1 of 15
An evil parser-generator tool.

Anyone here know anything useful about it?
From: 99% of gargoyles look like (MR_BASTARD)24 Nov 2009 22:14
To: Peter (BOUGHTONP) 2 of 15
It turns people into mooses, meece, or whatever the plural of moose is?
From: Peter (BOUGHTONP)24 Nov 2009 22:24
To: 99% of gargoyles look like (MR_BASTARD) 3 of 15
I think it's just moose, like with sheep and stuff.

I currently feel more as though it is turning my brain to mousse though.

Somehow it seems to be incredibly popular, and yet every time I try to do anything with it I feel like I'm swimming in thick treacle whilst tied to an oversized anvil. :(
From: 99% of gargoyles look like (MR_BASTARD)24 Nov 2009 22:27
To: THERE IS NO GOD BUT (RENDLE) 4 of 15
So, what do you think? Geek-jizz, or no geek-jizz?
From: THERE IS NO GOD BUT (RENDLE)25 Nov 2009 16:14
To: 99% of gargoyles look like (MR_BASTARD) 5 of 15
Hardcore.
From: THERE IS NO GOD BUT (RENDLE)25 Nov 2009 16:15
To: Peter (BOUGHTONP) 6 of 15
Are you trying to use it for something specific?
From: 99% of gargoyles look like (MR_BASTARD)25 Nov 2009 16:27
To: THERE IS NO GOD BUT (RENDLE) 7 of 15
\m/
From: Peter (BOUGHTONP)25 Nov 2009 18:28
To: THERE IS NO GOD BUT (RENDLE) 8 of 15
Yep, first step is that I want a functioning ECMAScript parser (I found one for v3 but Eclipse/ANTLRWorks locks up when trying to use the generated code - something debug related).

Once I've got that, a few extra BNF rules will result in a CFScript parser, another couple will make a CFML one, and then I do some magic so that I can point at a directory containing an application and it calculates a fancy model of the application.

And then once that's done, it'll be packaged up so it can be slotted into an IDE and allow development of the assorted useful functions you expect a modern IDE to have.

But yeah, first step is producing a runnable ECMAScript parser.


And I'm not married to ANTLR for all of this - I'll happily use an alternative if it lets me get on with the useful stuff - but it does seem to be the most popular one, for whatever reason. :S
EDITED: 25 Nov 2009 20:14 by BOUGHTONP
From: THERE IS NO GOD BUT (RENDLE)25 Nov 2009 21:34
To: Peter (BOUGHTONP) 9 of 15
ANTLR is definitely the way to go. What's your target language? Java?

The PragProg book is, apparently, very good. If I was going to attempt anything beyond generating ASTs from simple DSLs then I'd invest in a copy.
From: Peter (BOUGHTONP)27 Nov 2009 01:29
To: THERE IS NO GOD BUT (RENDLE) 10 of 15
Yeah, this'll eventually end up in an Eclipse plugin, so Java is simplest (though I'd also like to produce it as an independent binary so it can be easily scripted and integrated with non-Java editors also)

I'm a little wary of buying a book when I'm having such problems getting going - would be fine with something to fill in the gaps, but so far it seems I've got islands rather than lakes. :/

Just noticed the excerpts though, so I'll read them tomorrow and see what I think of it.


Current problem is trying to figure out either why the debugger is hanging, or even just how to turn it off.
From: Peter (BOUGHTONP)28 Nov 2009 00:05
To: THERE IS NO GOD BUT (RENDLE) 11 of 15
Know anywhere that sells the book+pdf for a better price?

Amazon do the printed book for £17, but don't appear to do the digital version.

Annoyingly, I could have had them both for less than that, if I'd known pragprog.com had a 40% sale on - until Wednesday. :'(
From: THERE IS NO GOD BUT (RENDLE)28 Nov 2009 14:47
To: Peter (BOUGHTONP) 12 of 15
PragProg do a discount on the ebook if you've bought the print one.
From: Peter (BOUGHTONP)28 Nov 2009 15:03
To: THERE IS NO GOD BUT (RENDLE) 13 of 15
Even if from a different supplier?
From: THERE IS NO GOD BUT (RENDLE)28 Nov 2009 16:25
To: Peter (BOUGHTONP) 14 of 15
Yeah, it's the "enter the fourth word on page 213" type of thing.
From: Peter (BOUGHTONP)28 Nov 2009 16:36
To: THERE IS NO GOD BUT (RENDLE) 15 of 15
Ah that's good. :) Thanks.