Re: [sonar-dev] Re: About Java 7 support

Oliver Burn <[email protected]> Tue, 6 Sep 2011 21:37:10 +1000
Newsgroups gmane.comp.java.audit.checkstyle.user,gmane.comp.java.sonar.devel
Message-ID <CAHZftdX75uev9SbT1rWbjCE=b_TZKOtSN8SVeuYp+YfmrDZ9mw@mail.gmail.com>
--===============0007876208401773599==
Content-Type: multipart/alternative; boundary=000e0cd52afa8d7a2b04ac443f29

--000e0cd52afa8d7a2b04ac443f29
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

The patch has been applied to Checkstyle.

Thanks!

On Tue, Sep 6, 2011 at 18:15, Dinesh Bolkensteyn <
[email protected]> wrote:

> There is already a proposed patch for the EOF issue from Lukas Platinsky =
@
> https://sourceforge.net/tracker/?func=3Ddetail&aid=3D3393810&group_id=3D2=
9721&atid=3D397080
> (which I did not try)
>
> Indeed the support for "enum" as an identifier (Java 4) is still an open
> issue.
>
> --
> Dinesh Bolkensteyn
> Tweeting? http://twitter.com/DBolkensteyn
>
>
> www.SonarSource.org
> www.SonarSource.com
>
>
>
> On Mon, Sep 5, 2011 at 10:49 PM, Freddy Mallet <
> [email protected]> wrote:
>
>> Hi Evgeny,
>>
>> In fact Dinesh already tried to fix the java grammar to handle this use
>> case but that's a bit tricky so we decided to postpone this investigatio=
n.
>>
>> Freddy
>>
>> ----------------------------------------
>> Freddy Mallet
>> www.SonarSource.org
>> www.SonarSource.com
>> ----------------------------------------
>>
>>
>> On Mon, Sep 5, 2011 at 10:30 PM, Evgeny Mandrikov <[email protected]>w=
rote:
>>
>>> Dinesh FYI another interesting open issue is about analysis of Java 1.4
>>> code, where enum can be used as an identifier :
>>> http://jira.codehaus.org/browse/SONAR-1653
>>>
>>>
>>> On Mon, Sep 5, 2011 at 19:56, Evgeny Mandrikov <[email protected]>wro=
te:
>>>
>>>> Hi all,
>>>>
>>>> FYI: I tested this patch by applying it locally on Checkstyle
>>>> 5.5-SNAPSHOT and using this version in Sonar.
>>>> And it works like a charm for simple project, which uses all language
>>>> features of Java 7 (
>>>> https://github.com/Godin/sonar-experiments/tree/master/java7-language-=
features
>>>>  ).
>>>> Congratulations Dinesh!
>>>>
>>>> However Dinesh, could you please also take a look on another parsing
>>>> issue, which is still present in 5.5-SNAPSHOT :
>>>> http://sourceforge.net/tracker/?func=3Ddetail&atid=3D397078&aid=3D1667=
137&group_id=3D29721
>>>> Currently in Sonar we have a workaround - we simply ignore this
>>>> error, but IMO would be better to fix it, if you can ;)
>>>>
>>>> On Fri, Sep 2, 2011 at 17:42, Dinesh Bolkensteyn <
>>>> [email protected]> wrote:
>>>>
>>>>> Dear Olivier,
>>>>>
>>>>> The patch is provided here:
>>>>> https://sourceforge.net/tracker/?func=3Ddetail&aid=3D3403265&group_id=
=3D29721&atid=3D397080
>>>>>
>>>>> Note that, because SourceForge does not preserve spaces in the commen=
t,
>>>>> the AST part is messed up, which is why I post the comment hereunder =
again.
>>>>>
>>>>> *** Original comment attached to the patch ***
>>>>>
>>>>> This patch adds the support for Java 7 to Checkstyle's ANTLR grammar.
>>>>> It comes with 1 unit test for each new Java 7 language feature.
>>>>>
>>>>> This patch should be backwards-compatible: AST for files which do not
>>>>> use Java 7 features should be left unchanged.
>>>>>
>>>>> Impact by Java 7 language feature:
>>>>>
>>>>>  1) String in switch: None, the grammar already supported this.
>>>>>
>>>>>  2) Simplified variable arguments: None, the grammar should not be
>>>>> impacted by this feature.
>>>>>
>>>>>  3) Binary integer literals and underscores in numerical literals: Th=
e
>>>>> tokens value in the AST will be identical as the one written in the s=
ource
>>>>> code.
>>>>>
>>>>>  4) Diamond Generics: In presence of a diamond, the AST looks like:
>>>>>
>>>>> +--TYPE_ARGUMENTS
>>>>>     |
>>>>>     +--GENERIC_START
>>>>>     +--GENERIC_END
>>>>>
>>>>>  5) try-with-resources: In presence of a try-with-resources, the AST
>>>>> looks like:
>>>>>
>>>>> +--try
>>>>>     |
>>>>>     +--LPAREN (new node containing the "resource")
>>>>>         |
>>>>>         +--MODIFIERS
>>>>>         +--TYPE
>>>>>             |
>>>>>             ...
>>>>>         +--IDENT
>>>>>         +--ASSIGN
>>>>>         +--EXPR
>>>>>             |
>>>>>             ...
>>>>>         +--RPAREN
>>>>>     +--SLIST (list of statements of the try block, just like a
>>>>> try/catch)
>>>>>         |
>>>>>         ...
>>>>>     +--LITERAL_CATCH (optionnally, if there was a catch, just like a
>>>>> try/catch)
>>>>>     +=85 (unchanged, just like a try/catch)
>>>>>
>>>>>  6) Multi-catch and more precise rethrow: In presence of a multi-catc=
h,
>>>>> the AST looks like:
>>>>>
>>>>> +--try
>>>>>     |
>>>>>     +--SLIST (list of statements of the try block)
>>>>>         |
>>>>>         ...
>>>>>     +--LITERAL_CATCH
>>>>>         |
>>>>>         +--LPAREN
>>>>>         +--PARAMETER_DEF
>>>>>             |
>>>>>             +--MODIFIERS
>>>>>             +--TYPE
>>>>>                 |
>>>>>                 +--IDENT (containing the first exception to catch, or=
 a
>>>>> DOT node if it is a fully qualified type)
>>>>>                 +--IDENT (containing the second exception to catch, o=
r
>>>>> a DOT node if it is a fully qualified type)
>>>>>                 +--...
>>>>>             +--IDENT (name of the exception variable)
>>>>>         +--RPAREN
>>>>>         +--SLIST (list of statements of the catch block)
>>>>>             |
>>>>>             ...
>>>>>
>>>>> Kind regards,
>>>>>  Dinesh Bolkensteyn
>>>>>
>>>>>
>>>>> On Tue, Aug 16, 2011 at 10:07 AM, Freddy Mallet <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Thanks for your answer Oliver ! So we'll start with the first baby
>>>>>> step to patch the current Antlr grammar. We should get back to you d=
uring
>>>>>> the upcoming weeks.
>>>>>>
>>>>>> Kind regards,
>>>>>> Freddy
>>>>>> ----------------------------------------
>>>>>> Freddy Mallet
>>>>>> www.SonarSource.org
>>>>>> www.SonarSource.com
>>>>>> ----------------------------------------
>>>>>>
>>>>>>
>>>>>> On Tue, Aug 16, 2011 at 4:34 AM, Oliver Burn <[email protected]>=
wrote:
>>>>>>
>>>>>>> Hi Freddy,
>>>>>>>
>>>>>>> Thanks for your kind offer.
>>>>>>>
>>>>>>> My preference for a new grammar is motivated by the following
>>>>>>> thoughts:
>>>>>>>
>>>>>>>    - Upgrade from ANTLRv2 to ANTLRv3 - there a numerous benefits to
>>>>>>>    not being left behind, including newer features and the awesome =
ANTLRworks
>>>>>>>    - The existing grammar has evolved along with the language - a
>>>>>>>    fresh implementation maybe cleaner
>>>>>>>    - Hoping to find a ANTLR grammar out there that somebody is
>>>>>>>    maintaining. Bare in mind that when Java 8 comes out, where will=
 be a series
>>>>>>>    of changes to the grammar required.
>>>>>>>
>>>>>>> That all said, it would be easier to patch the existing grammar. I
>>>>>>> would happily take a patch that does that. :-)
>>>>>>>
>>>>>>> Regards,
>>>>>>> Oliver
>>>>>>>
>>>>>>> On Tue, Aug 16, 2011 at 01:57, Freddy Mallet <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Hi Oliver,
>>>>>>>>
>>>>>>>> We would be happy to contribute to the support of java 7 [1].
>>>>>>>> Upgrading the current Antlr grammar should not be too complex (eve=
n if not
>>>>>>>> simple) in order to support new java language enhancements :
>>>>>>>>
>>>>>>>>    - Strings in switch statements
>>>>>>>>    - try-with-resources statements
>>>>>>>>    - improved type inference for generic instance creation
>>>>>>>>    ("diamond")
>>>>>>>>    - better integral literals
>>>>>>>>    - and improved exception handling (multi-catch)
>>>>>>>>
>>>>>>>> In ticket 3328367 [1], you mention the option to fully rewrite the
>>>>>>>> Antlr grammar instead of simply updating the existing one. In few =
words,
>>>>>>>> could you explain what would be the advantages of this solution an=
d why you
>>>>>>>> seem to prefer this second solution ?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Freddy
>>>>>>>>
>>>>>>>> [1] -
>>>>>>>> http://sourceforge.net/tracker/?func=3Ddetail&aid=3D3328367&group_=
id=3D29721&atid=3D397078you seem to be
>>>>>>>> ----------------------------------------
>>>>>>>> Freddy Mallet
>>>>>>>> www.SonarSource.org
>>>>>>>> www.SonarSource.com
>>>>>>>> ----------------------------------------
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------=
------------
>>>>>>>> uberSVN's rich system and user administration capabilities and mod=
el
>>>>>>>> configuration take the hassle out of deploying and managing
>>>>>>>> Subversion and
>>>>>>>> the tools developers use with it. Learn more about uberSVN and get=
 a
>>>>>>>> free
>>>>>>>> download at:  http://p.sf.net/sfu/wandisco-dev2dev
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Checkstyle-user mailing list
>>>>>>>> [email protected]
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/checkstyle-user
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -------------------------------------------------------------------=
-----------
>>>>>>> uberSVN's rich system and user administration capabilities and mode=
l
>>>>>>> configuration take the hassle out of deploying and managing
>>>>>>> Subversion and
>>>>>>> the tools developers use with it. Learn more about uberSVN and get =
a
>>>>>>> free
>>>>>>> download at:  http://p.sf.net/sfu/wandisco-dev2dev
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Checkstyle-user mailing list
>>>>>>> [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/checkstyle-user
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Evgeny Mandrikov aka Godin <http://godin.net.ru>
>>>> http://twitter.com/_godin_
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Evgeny Mandrikov aka Godin <http://godin.net.ru>
>>> http://twitter.com/_godin_
>>>
>>
>>
>
>
> -------------------------------------------------------------------------=
-----
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> _______________________________________________
> Checkstyle-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/checkstyle-user
>
>

--000e0cd52afa8d7a2b04ac443f29
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

The patch has been applied to Checkstyle.<br><br>Thanks!<br><br><div class=
=3D"gmail_quote">On Tue, Sep 6, 2011 at 18:15, Dinesh Bolkensteyn <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]">dinesh.b=
[email protected]</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">There is already a proposed patch for the E=
OF issue from Lukas Platinsky @ <a href=3D"https://sourceforge.net/tracker/=
?func=3Ddetail&amp;aid=3D3393810&amp;group_id=3D29721&amp;atid=3D397080" ta=
rget=3D"_blank">https://sourceforge.net/tracker/?func=3Ddetail&amp;aid=3D33=
93810&amp;group_id=3D29721&amp;atid=3D397080</a><br>

(which I did not try)<br><br>Indeed the support for &quot;enum&quot; as an =
identifier (Java 4) is still an open issue.<br clear=3D"all"><font color=3D=
"#888888"><span style=3D"font-family:arial,sans-serif;font-size:13px;border=
-collapse:collapse"><br>

--<br>Dinesh Bolkensteyn<br></span>Tweeting? <a href=3D"http://twitter.com/=
DBolkensteyn" target=3D"_blank">http://twitter.com/DBolkensteyn</a></font><=
div class=3D"im"><span style=3D"font-family:arial, sans-serif;font-size:13p=
x;border-collapse:collapse"></span><br>

<span style=3D"font-family:arial,sans-serif;font-size:13px;border-collapse:=
collapse"><br><a href=3D"http://www.SonarSource.org" target=3D"_blank">www.=
SonarSource.org</a><br><a href=3D"http://www.SonarSource.com" target=3D"_bl=
ank">www.SonarSource.com</a></span><br>

<br>
<br><br></div><div><div></div><div class=3D"h5"><div class=3D"gmail_quote">=
On Mon, Sep 5, 2011 at 10:49 PM, Freddy Mallet <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:[email protected]" target=3D"_blank">freddy.mallet@=
sonarsource.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Hi Evgeny,<div><br></div><div>In fact Dinesh already tried to fix the java =
grammar to handle this use case but that&#39;s a bit tricky so we decided t=
o postpone this investigation.</div><div><br></div><font color=3D"#888888">=
<div>

Freddy =A0</div></font><div><div>
<br clear=3D"all">----------------------------------------<br>Freddy Mallet=
<br><a href=3D"http://www.SonarSource.org" target=3D"_blank">www.SonarSourc=
e.org</a><br><a href=3D"http://www.SonarSource.com" target=3D"_blank">www.S=
onarSource.com</a><br>


----------------------------------------<br>
<br><br></div><div><div></div><div><div class=3D"gmail_quote">On Mon, Sep 5=
, 2011 at 10:30 PM, Evgeny Mandrikov <span dir=3D"ltr">&lt;<a href=3D"mailt=
o:[email protected]" target=3D"_blank">[email protected]</a>&gt;</span>=
 wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Dinesh FYI another interesting open issue is about analysis of Java 1.4 cod=
e, where enum can be used as an identifier : <a href=3D"http://jira.codehau=
s.org/browse/SONAR-1653" target=3D"_blank">http://jira.codehaus.org/browse/=
SONAR-1653</a><div>


<div></div><div><br>

<br><div class=3D"gmail_quote">On Mon, Sep 5, 2011 at 19:56, Evgeny Mandrik=
ov <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_=
blank">[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex">




Hi all,<div><br></div><div>FYI: I tested this patch by applying it locally =
on Checkstyle 5.5-SNAPSHOT and using this version in Sonar.</div><div>And i=
t works like a charm for simple project, which uses all language features o=
f Java 7 (=A0<a href=3D"https://github.com/Godin/sonar-experiments/tree/mas=
ter/java7-language-features" target=3D"_blank">https://github.com/Godin/son=
ar-experiments/tree/master/java7-language-features</a>=A0).</div>





<div>Congratulations Dinesh!</div><div><br></div><div>However Dinesh, could=
 you please also take a look on another parsing issue, which is still prese=
nt in 5.5-SNAPSHOT : <a href=3D"http://sourceforge.net/tracker/?func=3Ddeta=
il&amp;atid=3D397078&amp;aid=3D1667137&amp;group_id=3D29721" target=3D"_bla=
nk">http://sourceforge.net/tracker/?func=3Ddetail&amp;atid=3D397078&amp;aid=
=3D1667137&amp;group_id=3D29721</a></div>





<div>Currently in Sonar we have a workaround - we simply ignore this error,=
=A0but IMO would be better to fix it, if you can ;)</div><div><div><div></d=
iv><div><br><div class=3D"gmail_quote">On Fri, Sep 2, 2011 at 17:42, Dinesh=
 Bolkensteyn <span dir=3D"ltr">&lt;<a href=3D"mailto:dinesh.bolkensteyn@son=
arsource.com" target=3D"_blank">[email protected]</a>&gt;<=
/span> wrote:<br>





<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Dear Olivier,<br><br>The patch is provided h=
ere: <a href=3D"https://sourceforge.net/tracker/?func=3Ddetail&amp;aid=3D34=
03265&amp;group_id=3D29721&amp;atid=3D397080" target=3D"_blank">https://sou=
rceforge.net/tracker/?func=3Ddetail&amp;aid=3D3403265&amp;group_id=3D29721&=
amp;atid=3D397080</a><br>






<br>Note that, because SourceForge does not preserve spaces in the comment,=
 the AST part is messed up, which is why I post the comment hereunder again=
.<br><br>*** Original comment attached to the patch ***<br><br>This patch a=
dds the support for Java 7 to Checkstyle&#39;s ANTLR grammar.<br>






It comes with 1 unit test for each new Java 7 language feature.<br><br>This=
 patch should be backwards-compatible: AST for files which do not use Java =
7 features should be left unchanged.<br><br>Impact by Java 7 language featu=
re:<br>






<br>=A01) String in switch: None, the grammar already supported this.<br><b=
r>=A02) Simplified variable arguments: None, the grammar should not be impa=
cted by this feature.<br>=A0<br>=A03) Binary integer literals and underscor=
es in numerical literals: The tokens value in the AST will be identical as =
the one written in the source code.<br>






<br>=A04) Diamond Generics: In presence of a diamond, the AST looks like:<b=
r><br>+--TYPE_ARGUMENTS<br>=A0=A0=A0 |<br>=A0=A0=A0 +--GENERIC_START<br>=A0=
=A0=A0 +--GENERIC_END<br><br>=A05) try-with-resources: In presence of a try=
-with-resources, the AST looks like: <br>






<br>+--try<br>=A0=A0=A0 |<br>=A0=A0=A0 +--LPAREN (new node containing the &=
quot;resource&quot;)<br>=A0=A0=A0=A0=A0=A0=A0 |<br>=A0=A0=A0=A0=A0=A0=A0 +-=
-MODIFIERS<br>=A0=A0=A0=A0=A0=A0=A0 +--TYPE<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0 |<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ...<br>=A0=A0=A0=A0=A0=A0=A0 =
+--IDENT<br>=A0=A0=A0=A0=A0=A0=A0 +--ASSIGN<br>





=A0=A0=A0=A0=A0=A0=A0 +--EXPR<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 |<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ..=
.<br>=A0=A0=A0=A0=A0=A0=A0 +--RPAREN<br>=A0=A0=A0 +--SLIST (list of stateme=
nts of the try block, just like a try/catch)<br>=A0=A0=A0=A0=A0=A0=A0 |<br>=
=A0=A0=A0=A0=A0=A0=A0 ...<br>=A0=A0=A0 +--LITERAL_CATCH (optionnally, if th=
ere was a catch, just like a try/catch)<br>






=A0=A0=A0 +=85 (unchanged, just like a try/catch)<br><br>=A06) Multi-catch =
and more precise rethrow: In presence of a multi-catch, the AST looks like:=
<br>=A0<br>+--try<br>=A0=A0=A0 |<br>=A0=A0=A0 +--SLIST (list of statements =
of the try block)<br>






=A0=A0=A0=A0=A0=A0=A0 |<br>=A0=A0=A0=A0=A0=A0=A0 ...<br>=A0=A0=A0 +--LITERA=
L_CATCH<br>=A0=A0=A0=A0=A0=A0=A0 |<br>=A0=A0=A0=A0=A0=A0=A0 +--LPAREN<br>=
=A0=A0=A0=A0=A0=A0=A0 +--PARAMETER_DEF<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
 |<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 +--MODIFIERS<br>=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 +--TYPE<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 |<=
br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 +--IDENT (containing the f=
irst exception to catch, or a DOT node if it is a fully qualified type)<br>






=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 +--IDENT (containing the seco=
nd exception to catch, or a DOT node if it is a fully qualified type)<br>=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 +--...<br>=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 +--IDENT (name of the exception variable)<br>=A0=A0=A0=A0=
=A0=A0=A0 +--RPAREN<br>






=A0=A0=A0=A0=A0=A0=A0 +--SLIST (list of statements of the catch block)<br>=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 |<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ..=
.<br><br>Kind regards,<br><font color=3D"#888888">
=A0Dinesh Bolkensteyn</font><div><div></div><div><br><br><div class=3D"gmai=
l_quote">On Tue, Aug 16, 2011 at 10:07 AM, Freddy Mallet <span dir=3D"ltr">=
&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">fred=
[email protected]</a>&gt;</span> wrote:<br>






<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div>Thanks for your answer Oliver ! So we&#=
39;ll start with the first baby step to patch the current Antlr grammar. We=
 should get back to you during the upcoming weeks.=A0</div>






<div><br></div><div>Kind regards,</div><div>Freddy<br clear=3D"all">
----------------------------------------<br>Freddy Mallet<br><a href=3D"htt=
p://www.SonarSource.org" target=3D"_blank">www.SonarSource.org</a><br><a hr=
ef=3D"http://www.SonarSource.com" target=3D"_blank">www.SonarSource.com</a>=
<br>







----------------------------------------<br>
<br><br><div class=3D"gmail_quote">On Tue, Aug 16, 2011 at 4:34 AM, Oliver =
Burn <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>&gt;</span> wrote:<br><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pad=
ding-left:1ex">







Hi Freddy,<br><br>Thanks for your kind offer.<br><br>My preference for a ne=
w grammar is motivated by the following thoughts:<br><ul><li>Upgrade from A=
NTLRv2 to ANTLRv3 - there a numerous benefits to not being left behind, inc=
luding newer features and the awesome ANTLRworks</li>








<li>The existing grammar has evolved along with the language - a fresh impl=
ementation maybe cleaner</li><li>Hoping to find a ANTLR grammar out there t=
hat somebody is maintaining. Bare in mind that when Java 8 comes out, where=
 will be a series of changes to the grammar required.</li>








</ul>That all said, it would be easier to patch the existing grammar. I wou=
ld happily take a patch that does that. :-)<br><br>Regards,<br>Oliver<br><b=
r><div class=3D"gmail_quote"><div><div></div><div>On Tue, Aug 16, 2011 at 0=
1:57, Freddy Mallet <span dir=3D"ltr">&lt;<a href=3D"mailto:freddy.mallet@g=
mail.com" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<b=
r>








</div></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>Hi Oliver,<=
div><br></div><div>We would be happy to contribute to the support of java 7=
 [1]. Upgrading the current Antlr grammar should not be too complex (even i=
f not simple) in order to support new java language enhancements :=A0</div>









<div><div><ul><li>Strings in switch statements</li><li>try-with-resources s=
tatements</li><li>improved type inference for generic instance creation (&q=
uot;diamond&quot;)</li><li>better integral literals</li><li>and improved ex=
ception handling (multi-catch)</li>









</ul></div></div><div>In ticket=A03328367 [1], you mention the option to fu=
lly rewrite the Antlr grammar instead of simply updating the existing one. =
In few words, could you explain what would be the advantages of this soluti=
on and why you seem to prefer this second solution ?</div>









<div><br></div><div>Thanks</div><div>Freddy</div><div><br></div><div>[1] - =
<a href=3D"http://sourceforge.net/tracker/?func=3Ddetail&amp;aid=3D3328367&=
amp;group_id=3D29721&amp;atid=3D397078" target=3D"_blank">http://sourceforg=
e.net/tracker/?func=3Ddetail&amp;aid=3D3328367&amp;group_id=3D29721&amp;ati=
d=3D397078</a> you seem to be=A0<br clear=3D"all">









----------------------------------------<br><font color=3D"#888888">Freddy =
Mallet<br><a href=3D"http://www.SonarSource.org" target=3D"_blank">www.Sona=
rSource.org</a><br><a href=3D"http://www.SonarSource.com" target=3D"_blank"=
>www.SonarSource.com</a><br>









----------------------------------------<br>
</font></div>
<br></div></div>-----------------------------------------------------------=
-------------------<br>
uberSVN&#39;s rich system and user administration capabilities and model<br=
>
configuration take the hassle out of deploying and managing Subversion and<=
br>
the tools developers use with it. Learn more about uberSVN and get a free<b=
r>
download at: =A0<a href=3D"http://p.sf.net/sfu/wandisco-dev2dev" target=3D"=
_blank">http://p.sf.net/sfu/wandisco-dev2dev</a><br>
<br>_______________________________________________<br>
Checkstyle-user mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/checkstyle-user" ta=
rget=3D"_blank">https://lists.sourceforge.net/lists/listinfo/checkstyle-use=
r</a><br>
<br></blockquote></div><br>
<br>-----------------------------------------------------------------------=
-------<br>
uberSVN&#39;s rich system and user administration capabilities and model<br=
>
configuration take the hassle out of deploying and managing Subversion and<=
br>
the tools developers use with it. Learn more about uberSVN and get a free<b=
r>
download at: =A0<a href=3D"http://p.sf.net/sfu/wandisco-dev2dev" target=3D"=
_blank">http://p.sf.net/sfu/wandisco-dev2dev</a><br>
<br>_______________________________________________<br>
Checkstyle-user mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/checkstyle-user" ta=
rget=3D"_blank">https://lists.sourceforge.net/lists/listinfo/checkstyle-use=
r</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div></div><=
/div><font color=3D"#888888">-- <br>Best regards,<br>Evgeny Mandrikov aka G=
odin &lt;<a href=3D"http://godin.net.ru" target=3D"_blank">http://godin.net=
.ru</a>&gt;<br>




<a href=3D"http://twitter.com/_godin_" target=3D"_blank">http://twitter.com=
/_godin_</a><br>

</font></div>
</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>Best regards=
,<br>Evgeny Mandrikov aka Godin &lt;<a href=3D"http://godin.net.ru" target=
=3D"_blank">http://godin.net.ru</a>&gt;<br><a href=3D"http://twitter.com/_g=
odin_" target=3D"_blank">http://twitter.com/_godin_</a><br>





</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br>
</div></div><br>-----------------------------------------------------------=
-------------------<br>
Special Offer -- Download ArcSight Logger for FREE!<br>
Finally, a world-class log management solution at an even better<br>
price-free! And you&#39;ll get a free &quot;Love Thy Logs&quot; t-shirt whe=
n you<br>
download Logger. Secure your free ArcSight Logger TODAY!<br>
<a href=3D"http://p.sf.net/sfu/arcsisghtdev2dev" target=3D"_blank">http://p=
.sf.net/sfu/arcsisghtdev2dev</a><br>_______________________________________=
________<br>
Checkstyle-user mailing list<br>
<a href=3D"mailto:[email protected]">Checkstyle-user@li=
sts.sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/checkstyle-user" ta=
rget=3D"_blank">https://lists.sourceforge.net/lists/listinfo/checkstyle-use=
r</a><br>
<br></blockquote></div><br>

--000e0cd52afa8d7a2b04ac443f29--


--===============0007876208401773599==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
--===============0007876208401773599==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Checkstyle-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user

--===============0007876208401773599==--