You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by "Edinson E. Padrón Urdaneta" <ed...@gmail.com> on 2016/05/23 08:44:49 UTC

[Question] The Apache Groovy Language Reference

Greetings Apache Groovy Community,

I was wondering if we have a manual that describes the syntax and semantics
of the language. Something like Python's [1].

Thank you all for your time in advance.

[1] https://docs.python.org/3/reference/index.html

Re: [Question] The Apache Groovy Language Reference

Posted by "Edinson E. Padrón Urdaneta" <ed...@gmail.com>.
Hi Duncan,

I'm looking for something along the lines of:

String literals are described by the following lexical definitions:
>
> *stringliteral  * ::=  [stringprefix <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-stringprefix>](shortstring <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-shortstring> | longstring <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-longstring>)*stringprefix   * ::=  "r" | "u" | "R" | "U"*shortstring    * ::=  "'" shortstringitem <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-shortstringitem>* "'" | '"' shortstringitem <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-shortstringitem>* '"'*longstring     * ::=  "'''" longstringitem <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-longstringitem>* "'''" | '"""' longstringitem <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-longstringitem>* '"""'*shortstringitem* ::=  shortstringchar <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-shortstringchar> | stringescapeseq <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-stringescapeseq>*longstringitem * ::=  longstringchar <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-longstringchar> | stringescapeseq <https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-stringescapeseq>*shortstringchar* ::=  <any source character except "\" or newline or the quote>*longstringchar * ::=  <any source character except "\">*stringescapeseq* ::=  "\" <any source character>
>
>
 That's from the Python's Language Reference that I just shared.

Re: [Question] The Apache Groovy Language Reference

Posted by "Edinson E. Padrón Urdaneta" <ed...@gmail.com>.
And just in case: I'm aware of this [1]. But I think that something
describing the syntax and semantics (in the way I just showed) of Groovy
could be very useful. Particularly for the guys working on the new Antler4
stuff. But that's just my humble opinion.


[1] http://groovy-lang.org/syntax.html

On Mon, May 23, 2016 at 5:04 AM, Mario Garcia <ma...@gmail.com> wrote:

> Hi:
>
> There is also a single page document at
> http://groovy-lang.org/single-page-documentation.html
>
> Mario
>
> 2016-05-23 10:59 GMT+02:00 Duncan Dickinson <me...@duncan.dickinson.name>:
>
>> Hi Edinson,
>>
>> The main documentation is at http://groovy-lang.org/documentation.html
>> and includes language specification sections. Is that what you're after?
>>
>> Cheers,
>>
>> Duncan
>>
>> Sent from my iPad
>>
>> On 23 May 2016, at 18:44, Edinson E. Padrón Urdaneta <
>> edinson.padron.urdaneta@gmail.com> wrote:
>>
>> Greetings Apache Groovy Community,
>>
>> I was wondering if we have a manual that describes the syntax and
>> semantics of the language. Something like Python's [1].
>>
>> Thank you all for your time in advance.
>>
>> [1] https://docs.python.org/3/reference/index.html
>>
>>
>

Re: [Question] The Apache Groovy Language Reference

Posted by Mario Garcia <ma...@gmail.com>.
Hi:

There is also a single page document at
http://groovy-lang.org/single-page-documentation.html

Mario

2016-05-23 10:59 GMT+02:00 Duncan Dickinson <me...@duncan.dickinson.name>:

> Hi Edinson,
>
> The main documentation is at http://groovy-lang.org/documentation.html
> and includes language specification sections. Is that what you're after?
>
> Cheers,
>
> Duncan
>
> Sent from my iPad
>
> On 23 May 2016, at 18:44, Edinson E. Padrón Urdaneta <
> edinson.padron.urdaneta@gmail.com> wrote:
>
> Greetings Apache Groovy Community,
>
> I was wondering if we have a manual that describes the syntax and
> semantics of the language. Something like Python's [1].
>
> Thank you all for your time in advance.
>
> [1] https://docs.python.org/3/reference/index.html
>
>

Re: [Question] The Apache Groovy Language Reference

Posted by Duncan Dickinson <me...@duncan.dickinson.name>.
Hi Edinson,

The main documentation is at http://groovy-lang.org/documentation.html and includes language specification sections. Is that what you're after?

Cheers,

Duncan

Sent from my iPad

> On 23 May 2016, at 18:44, Edinson E. Padrón Urdaneta <ed...@gmail.com> wrote:
> 
> Greetings Apache Groovy Community,
> 
> I was wondering if we have a manual that describes the syntax and semantics of the language. Something like Python's [1].
> 
> Thank you all for your time in advance.
> 
> [1] https://docs.python.org/3/reference/index.html

Re: [Question] The Apache Groovy Language Reference

Posted by Thibault Kruse <ti...@googlemail.com>.
While a specification was started, I don't think you should expect a
complete specification of semantics.
Syntax should be fine for code that is not subject to transformations.

However, due to AST transforms, any "groovy" file you may read may have
both other syntax and other semantics defined in custom projects.
As an example, in geb certain codeparts will wrap each line in an assert
statement at runtime.





On Monday, May 23, 2016, Edinson E. Padrón Urdaneta <
edinson.padron.urdaneta@gmail.com> wrote:

> Greetings Apache Groovy Community,
>
> I was wondering if we have a manual that describes the syntax and
> semantics of the language. Something like Python's [1].
>
> Thank you all for your time in advance.
>
> [1] https://docs.python.org/3/reference/index.html
>

Re: [Question] The Apache Groovy Language Reference

Posted by jim northrop <ja...@googlemail.com>.
found this old PDF that may help ;-}

On 23 May 2016 at 10:44, Edinson E. Padrón Urdaneta <
edinson.padron.urdaneta@gmail.com> wrote:

> Greetings Apache Groovy Community,
>
> I was wondering if we have a manual that describes the syntax and
> semantics of the language. Something like Python's [1].
>
> Thank you all for your time in advance.
>
> [1] https://docs.python.org/3/reference/index.html
>