[antlr-interest] Pie and simple expression calculator

goodwin goodwin at essence-property.com
Tue Jan 3 01:05:02 PST 2012


Apologies if this is getting a bit long, but it may be of interest to others 
going down a similar road.


The C-- example in the file share area does not work with 3.4, it has 
uncompileable 


void =null


statements, and on searching the archives it seems that the approach is not 
recommended anyway.


So that probably leaves me with Pie as the best starting point, at least we 
know it should work with 3.4 and uses a recommended approach.


But it will still need a bit of work - extend to a full expression handler, 
and deal with unary operations like sin/cos/exp/log.


I looked at some other examples, but they didn't seem a good starting point, 
but maybe I can take something from them. I need to study


http://www.antlr.org/wiki/display/ANTLR3/Simple+tree-based+interpeter


a bit more.


-----Original Message-----
 From: "goodwin" <goodwin at essence-property.com>
 To: antlr-interest at antlr.org
 Date: Tue, 03 Jan 2012 00:13:12 +0000
 Subject: Re: [antlr-interest] Pie and simple expression calculator


Thanks. I will probably start with the C-- example as a base, and compare it 
with the other examples.


I have been a heavy user of R in the past, so will keep a close eye on antlr4 
and R. R is nice and simple as a language, at least initially, until you 
start using the full power.


My interest in formal languages dates from the mid 80's or earlier (I was 
involved in late 70's with a Fortran program which took hundreds of 
thousands of lines to interpret a complex command language), but never 
actually got my hands dirty, so it has always been on my bucket list, and 
now I have good commercial reasons for doing so, not having any staff 
currently to delegate to!


My starting point is what is simple and easy to use for my end users, they 
are people who are happy enough to program Excel macros, but not much more 
than that.


Plus people nowadays expect the full language editors, pop up lists, good 
error diagnostics, suggestions, a fully interactive editor for the defined 
language, so they can comfortably write their own scripts. Anything which 
reduces support calls from the users.


-----Original Message-----
 From: Kyle Ferrio <kferrio at gmail.com>
 To: goodwin at essence-property.com
 Cc: antlr-interest at antlr.org
 Date: Mon, 2 Jan 2012 15:27:30 -0700
 Subject: Re: [antlr-interest] Pie and simple expression calculator


C-- is a very informative example.  Also check out Scott Stanchfield's videos 
on vimeo.com . 

Scott uses the antlr3 plugin for eclipse.  If you're not an eclipse user 
already, and you're in a hurry, you can still learn a lot just by watching 
his videos.

Kyle

On Jan 2, 2012 2:03 PM, "goodwin" <goodwin at essence-property.com > wrote:

Maybe my best starting point is the C-- example in the shared area.


 Maybe I need to sit down and compare all these examples line by line.

 List: http://www.antlr.org/mailman/listinfo/antlr-interest
 Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address


More information about the antlr-interest mailing list