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

Dave Watson updated THRIFT-1274:
--------------------------------

    Attachment: 
0006-thrift-fail-compilation-if-an-unexpected-token-is-en.patch.diff

>  thrift: fail compilation if an unexpected token is

> ----------------------------------------------------
>
>                 Key: THRIFT-1274
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1274
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>            Reporter: Dave Watson
>            Priority: Minor
>         Attachments: 
> 0006-thrift-fail-compilation-if-an-unexpected-token-is-en.patch.diff
>
>
> From e52b015b1c3d3b25ca1c905ea28cab80783a14bc Mon Sep 17 00:00:00 2001
> From: Adam Simpkins <simpk...@fb.com>
> Date: Fri, 26 Feb 2010 04:48:55 +0000
> Subject: [PATCH 06/33] thrift: fail compilation if an unexpected token is
>  encountered
> Summary:
> Currently, if the thrift lexer encounters a token it does not expect, it
> prints the token it to stdout and continues.  (This is the default
> behavior of flex when a token is unmatched.)  This updates thriftl.ll to
> fail with an error message when it sees an unexpected character.
> Test Plan:
> [internal fb thing].thrift contains a stray single-quote.
> Previously it was getting printed to stdout whenever you compile this
> file, or anything that includes it.  (Furthermore, it is printed out
> multiple times, since we scan the file twice each time it is included.
> Compiling [internal fb thing].thrift scans this file 8 times!)
> Now compiling this file fails with an error, as desired.  I'll submit a
> separate diff to fix [internal fb thing].thrift.
> ---
>  compiler/cpp/src/thriftl.ll |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to