[ 
https://issues.apache.org/jira/browse/THRIFT-3477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15046057#comment-15046057
 ] 

Jens Geyer edited comment on THRIFT-3477 at 12/8/15 12:38 AM:
--------------------------------------------------------------

[Proposed solution|^THRIFT-3477-Parser-fails-on-enum-item-that-starts-wi.patch 
]: Move the {{dubconstant}} rule behind {{identifier}}

The other option would be to rewrite the {{dubconstant}} rule in order to 
enforce that at least one of decimal point or exponent part is present to form 
a valid double literal. I have a patch for that one as well, but I think this 
solution is much cleaner.


was (Author: jensg):
[Proposed solution|^THRIFT-3477-Parser-fails-on-enum-item-that-starts-wi.patch 
]: Move the {dubconstant} rule behind {identifier}

The other option would be to rewrite the dubconstant rule. I have a patch for 
that one as well, but I think this solution is much cleaner.

> Parser fails on enum item that starts with 'E' letter and continues with 
> number 
> --------------------------------------------------------------------------------
>
>                 Key: THRIFT-3477
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3477
>             Project: Thrift
>          Issue Type: Bug
>            Reporter: Gordashnikov Artur
>         Attachments: 
> THRIFT-3477-Parser-fails-on-enum-item-that-starts-wi.patch
>
>
> Consider simple enum:
> {code}
> enum Test
> {
>     E10
> }
> {code}
> It will fail with message 
> {code}
> [ERROR:C:/Test.thrift:3] (last token was 'E10') syntax error
> [FAILURE:C:/Test.thrift:3] Parser error during include pass.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to