Re: Hacking BeanShell with JavaCC
"Daniel Leuck" <[email protected]> Thu, 17 Apr 2008 03:42:20 -1000
| Newsgroups | gmane.comp.java.beanshell.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Folks, I posted Part II which includes implementation of Python / Groovy style named arguments: http://www.techhui.com/profiles/blog/show?id=1702911%3ABlogPost%3A12211 Again, I'm not proposing new features for BeanShell or trying to create a new language. The purpose of the post is to demonstrate how to modify BeanShell and other languages that are defined with JJTree grammars. This is also a useful way to jump into JavaCC and JJTree if you plan to eventually write an entire language from scratch. I hope you find it useful. Cheers, Dan On Wed, Apr 16, 2008 at 11:11 PM, Daniel Leuck <[email protected]> wrote: > Hi Fschmidt, > > Note that my <> example is not operator overloading. Its an example > of implementing a new operator. > > I could implement generic operator overloading, but that might be a > long blog post :-) > > re: Your list(Object... objs) suggestion > > This is a good approach. I use it in regular Java apps and statically > import the method. > > Dan > > > > On Wed, Apr 16, 2008 at 7:39 PM, fschmidt <[email protected]> wrote: > > > > I think the best way to do this would be to add a general way for users to > > define the meaning of operators for a class/object similar to how Python > > does it. This shouldn't be hard for BeanShell. > > > > By the way, since there is no progress on BeanShell, I made a BeanShell fork > > > > here: > > > > http://code.google.com/p/beanshell2/ > > > > Anyone is welcome to contribute. I did implement long string literals: > > > > http://code.google.com/p/beanshell2/issues/detail?id=20&can=1 > > > > And I suggested a simpler way of creating collections here: > > > > http://code.google.com/p/beanshell2/issues/detail?id=14&can=1 > > > > I actually could use a BeanShell based MATLAB clone, so when you have time > > to work on this, let me know and I can implement the operator overloading > > described above. > > > > > > > > > > Bob Fischer wrote: > > > > > > I would love to see a BeanShell-based MATLAB replacement. I have all > > > the computational components needed for it, I just need a good syntax > > > from within BeanShell; that includes matrix notation (similar to the > > > lists described here), as well as a bunch of funny infix operators. > > > With this base, it should not be hard. > > > > > > > -- > > View this message in context: http://www.nabble.com/Hacking-BeanShell-with-JavaCC-tp16715411p16722790.html > > > > Sent from the BeanShell - Dev mailing list archive at Nabble.com. > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > Don't miss this year's exciting event. There's still time to save $100. > > Use priority code J8TL2D2. > > > > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > _______________________________________________ > > Beanshell-developers mailing list > > Beanshell-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > > https://lists.sourceforge.net/lists/listinfo/beanshell-developers > > > > > > > > -- > Daniel Leuck > President > Ikayzo, inc. > +1 (808) 539-3804 (US Direct) > +81 03-3655-2829 (Japan Direct) > +1 (808) 393-9119 (Mobile) > +1 (808) 591-1496 (Fax) > http://www.ikayzo.com > http://www.javaui.net > -- Daniel Leuck President Ikayzo, inc. +1 (808) 539-3804 (US Direct) +81 03-3655-2829 (Japan Direct) +1 (808) 393-9119 (Mobile) +1 (808) 591-1496 (Fax) http://www.ikayzo.com http://www.javaui.net ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone