Re: Parser version

2018-02-09 Thread Russel Winder
On Thu, 2018-02-08 at 10:13 -0700, Daniel.Sun wrote:
> Hi Russel,
> 
>   ANTLR-4 parser(i.e. the Parrot parser) is the default one for
> master,
> and ANTLR-2 parser is default for other branches.
> 
> Cheers,
> Daniel.Sun

Strange. I am building master and there is definitely an ANTLR2
generation phase of the build.

-- 
Russel.
===
Dr Russel Winder  t: +44 20 7585 2200
41 Buckmaster Roadm: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk


signature.asc
Description: This is a digitally signed message part


Re: Remembering imports between script invocations

2018-02-09 Thread Jorge Aguilera Gonzalez
I'm not sure if it's what you want but you can use "evaluate" to include
one script into another (see
http://gangmax.me/blog/2015/10/15/include-a-groovy-script-in-another/)
althought I think is a little dirty

To generate UI maybe you can evaluate MarkupTemplateEngine (
http://groovy-lang.org/templating.html#_the_markuptemplateengine)

Regards


El 9 feb. 2018 17:06, "David Ekholm"  escribió:

Who can I contact?

Regards
/David

On 8 Feb 2018, at 23:25,  <
eric.mil...@thomsonreuters.com> wrote:

Sounds more like the Groovy Shell or Groovy Console.  Not too sure myself
how the javax.script stuff is tied in.

*From:* David Ekholm [mailto:da...@jalbum.net ]
*Sent:* Thursday, February 08, 2018 2:47 PM
*To:* dev@groovy.apache.org
*Subject:* Re: Remembering imports between script invocations

How do I do that via the javax.script API?

Even if this is possible via the javax.script API, chances are that a user
wishes to ad-hoc add another import, but as they are forgotten between
script invocations, it makes it hard to use Groovy to interactively create,
say a Swing or JavaFX UI one line at a time. With BeanShell, the user can
add the needed imports, execute that "script" and then continue to refer to
the imported classes in the following script invocations. Making Groovy
remember imports would make it behave in as nice fashion as the new JShell
tool in Java 9. JShell unfortunately cannot run embedded via the
javax.script API :-(

Regards
/David


On 8 Feb 2018, at 21:34, eric.mil...@thomsonreuters.com wrote:

You can add all the imports you want to your compiler configuration and
they will be consistently available for all scripts.

*From:* David Ekholm [mailto:da...@jalbum.net ]
*Sent:* Thursday, February 08, 2018 2:12 PM
*To:* dev@groovy.apache.org
*Subject:* Remembering imports between script invocations

We're considering supporting Groovy as an additional scripting language to
our web gallery software jAlbum (http://jalbum.net
),
but one aspect bugs me: It doesn't seem like import statements are
remembered between script invocations. This makes it far harder to use
Groovy to prototype UIs within jAlbum's scripting console than for instance
BeanShell (using the javax.script API). We currently support the slow
BeanShell scripting language and JavaScript. BeanShell behaves well in this
regard, remembering earlier imported packages between script invocations.
Can this be added to Groovy or is there some API flag we can set?

Regards
/David, jAlbum founder and client lead developer.


Re: Remembering imports between script invocations

2018-02-09 Thread David Ekholm
Who can I contact?

Regards
/David

> On 8 Feb 2018, at 23:25,  
>  wrote:
> 
> Sounds more like the Groovy Shell or Groovy Console.  Not too sure myself how 
> the javax.script stuff is tied in.
>  
> From: David Ekholm [mailto:da...@jalbum.net ] 
> Sent: Thursday, February 08, 2018 2:47 PM
> To: dev@groovy.apache.org 
> Subject: Re: Remembering imports between script invocations
>  
> How do I do that via the javax.script API?
>  
> Even if this is possible via the javax.script API, chances are that a user 
> wishes to ad-hoc add another import, but as they are forgotten between script 
> invocations, it makes it hard to use Groovy to interactively create, say a 
> Swing or JavaFX UI one line at a time. With BeanShell, the user can add the 
> needed imports, execute that "script" and then continue to refer to the 
> imported classes in the following script invocations. Making Groovy remember 
> imports would make it behave in as nice fashion as the new JShell tool in 
> Java 9. JShell unfortunately cannot run embedded via the javax.script API :-(
>  
> Regards
> /David
>  
> On 8 Feb 2018, at 21:34, eric.mil...@thomsonreuters.com 
>  wrote:
>  
> You can add all the imports you want to your compiler configuration and they 
> will be consistently available for all scripts.
>  
> From: David Ekholm [mailto:da...@jalbum.net ] 
> Sent: Thursday, February 08, 2018 2:12 PM
> To: dev@groovy.apache.org 
> Subject: Remembering imports between script invocations 
>  
> We're considering supporting Groovy as an additional scripting language to 
> our web gallery software jAlbum (http://jalbum.net 
> ),
>  but one aspect bugs me: It doesn't seem like import statements are 
> remembered between script invocations. This makes it far harder to use Groovy 
> to prototype UIs within jAlbum's scripting console than for instance 
> BeanShell (using the javax.script API). We currently support the slow 
> BeanShell scripting language and JavaScript. BeanShell behaves well in this 
> regard, remembering earlier imported packages between script invocations. Can 
> this be added to Groovy or is there some API flag we can set?
>  
> Regards
> /David, jAlbum founder and client lead developer.