From 7a4b0f7423880caec732aec78dc3f7043cf35276 Mon Sep 17 00:00:00 2001 From: Jonathan Ellis Date: Wed, 1 Apr 2009 21:02:59 +0000 Subject: [PATCH] Adds possibility to use IP-address when invoking "connect" from the command line client. patch by Per Mellqvist for #41 git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761059 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/cassandra/cli/Cli.g | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/org/apache/cassandra/cli/Cli.g b/src/org/apache/cassandra/cli/Cli.g index dfd17542be..a776b8db6e 100644 --- a/src/org/apache/cassandra/cli/Cli.g +++ b/src/org/apache/cassandra/cli/Cli.g @@ -58,11 +58,11 @@ tokens { } @parser::header { -package com.facebook.infrastructure.cli; +package org.apache.cassandra.cli; } @lexer::header { -package com.facebook.infrastructure.cli; +package org.apache.cassandra.cli; } // @@ -85,6 +85,7 @@ stmt connectStmt : K_CONNECT host SLASH port -> ^(NODE_CONNECT host port) + | K_CONNECT ip SLASH port -> ^(NODE_CONNECT ip port) ; helpStmt @@ -151,6 +152,8 @@ columnOrSuperColumn: StringLiteral; host: id+=Identifier (id+=DOT id+=Identifier)* -> ^(NODE_ID_LIST $id+); +ip: id+=IntegerLiteral id+=DOT id+=IntegerLiteral id+=DOT id+=IntegerLiteral id+=DOT id+=IntegerLiteral -> ^(NODE_ID_LIST $id+); + port: IntegerLiteral; //