cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rday (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (CASSANDRA-2623) CLI escaped single quote parsing gives errors
Date Mon, 09 May 2011 05:22:03 GMT

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

rday edited comment on CASSANDRA-2623 at 5/9/11 5:20 AM:
---------------------------------------------------------

In the Cli.g file the string literal does not allow for escaped apostraphe.

http://svn.apache.org/repos/asf/cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g


StringLiteral
    :
    '\'' (~'\'')* '\'' ( '\'' (~'\'')* '\'' )*
    ;


I'm not sure yet what is the purpose of the repeating last half of the expression.
First Attempt to allow escaped characters seemed to cause other problems, still investigating
that.




      was (Author: rday):
    In the Cli.g file the string literal does not allow for escaped characters.

http://svn.apache.org/repos/asf/cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g


StringLiteral
    :
    '\'' (~'\'')* '\'' ( '\'' (~'\'')* '\'' )*
    ;


I'm not sure yet what is the purpose of the repeating last half of the expression.
Attempts to allow escaped characters seemed to cause other problems, still investigating that.



  
> CLI escaped single quote parsing gives errors
> ---------------------------------------------
>
>                 Key: CASSANDRA-2623
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2623
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 0.7.2, 0.7.5
>         Environment: windows vista, linux
>            Reporter: rday
>            Assignee: Pavel Yaskevich
>              Labels: cli
>
> Escaping quotes in cli commands causes parsing errors.
> some examples::::
> No need to create columns etc, it doesn't get through parsing the expression::
> cassandra-cli
> 1. 
> set column['KEY+vals'][VALUE] = 'VAL\'' ;
> Syntax error at position 41: mismatched character '<EOF>' expecting '''
> 2.
> set column['KEY+val\'s'][VALUE] = 'VAL' ;
> Syntax error at position 41: mismatched character '<EOF>' expecting '''
> 3.
> set column['KEY+vals\''][VALUE] = 'VAL\'' ;
> Syntax error at position 38: unexpected "\" for `set column['KEY+vals\''][VALUE] = 'VAL\''
;`.

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

Mime
View raw message