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

Brad Schoening commented on CASSANDRA-19956:
--------------------------------------------

The production rule for this in *cql3handling.py* is:
{quote}<Start> ::= <CQL_Statement>*
          ;

<CQL_Statement> ::= [statements]=<statementBody> ";"
                  ;

<endtoken> ::=      ";" ;
{quote}
_*statements*_ is unused and using plus(+) with the RE didn't work, but this 
could be:
{quote}<CQL_Statement> ::= <statementBody> <endtoken> <endtoken>*
{quote}
but this fails the same way, likely due to some special processing of 
_*endtoken*_ in {*}cqlhandling.py{*}.

> Do not fail cqlsh when empty statement is parsed
> ------------------------------------------------
>
>                 Key: CASSANDRA-19956
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19956
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: CQL/Interpreter
>            Reporter: Stefan Miklosovic
>            Priority: Low
>             Fix For: 5.x
>
>
> This really irritates me. 
> {code:java}
> cqlsh> select * from ks.tb;;
> ... the result ...
> SyntaxException: line 1:0 no viable alternative at input ';' ([;]){code}
> The second ";" should not matter. It is same way e.g. in Java. When I do
> {code:java}
> int a = 5;;;;;;;; {code}
> This is just perfectly legal. Indeed, more than one ";" is redundant, but it 
> still compiles.
> We should do same for CQL.
> {code:java}
> cqlsh> select * from ks.tb;;;;;;;;; {code}
> This should not fail.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to