[ 
https://issues.apache.org/jira/browse/THRIFT-600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Will Pierce updated THRIFT-600:
-------------------------------

    Attachment: THRIFT-600-FIX-DOUBLE-REGEX-V1.patch

The attached patch changes the lexer's regex for double constants so that a 
leading digit is required before the exponent part.

also, the test/DebugProtoTest.thrift file includes two new fields in the 
"Doubles" struct, one field named "e1" which works now with this patch, and a 
list of doubles set to a series of variously formatted doubles which exercises 
the updated regex fairly thoroughly.

the python unit tests run clean, but i wasn't able to run the main c++ unit 
tests (with or without this patch) due to an unrelated issue w/ on dev setup.
                
> Parser error on fields named "e0", "e1", ...
> --------------------------------------------
>
>                 Key: THRIFT-600
>                 URL: https://issues.apache.org/jira/browse/THRIFT-600
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (General)
>    Affects Versions: 0.1, 0.2
>         Environment: Ubuntu 8.10 "Intrepid"
>            Reporter: Kevin Barrett
>            Priority: Minor
>         Attachments: THRIFT-600-FIX-DOUBLE-REGEX-V1.patch
>
>
> Running the compiler on the following Thrift code:
> {code}
> struct test
> {
>      1: i32 e1
> }
> {code}
> produces the error "Parser error during include pass", with no additional 
> information.  Tested with field names e0, e1, ..., e9, and E0, E1, ..., E9.  
> Letters other than E, or characters after the E other than numbers, do not 
> produce the error.  The same issue applies to function arguments.  Tested 
> with --gen java, --gen cpp, and --gen python, all cause the error.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to