From ada8209a3a889f59964cbb00b30d3770ff4f354b Mon Sep 17 00:00:00 2001 From: Jonathan Ellis Date: Fri, 24 Apr 2009 03:02:18 +0000 Subject: [PATCH] fix hostname parsing in cli. patch by Eric Evans; reviewed by jbellis for #100 git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768137 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 a776b8db6e..5aeb26ab85 100644 --- a/src/org/apache/cassandra/cli/Cli.g +++ b/src/org/apache/cassandra/cli/Cli.g @@ -150,7 +150,7 @@ value: StringLiteral; columnOrSuperColumn: StringLiteral; -host: id+=Identifier (id+=DOT id+=Identifier)* -> ^(NODE_ID_LIST $id+); +host: id+=HostIdentifier -> ^(NODE_ID_LIST $id+); ip: id+=IntegerLiteral id+=DOT id+=IntegerLiteral id+=DOT id+=IntegerLiteral id+=DOT id+=IntegerLiteral -> ^(NODE_ID_LIST $id+); @@ -200,7 +200,6 @@ Identifier : Letter ( Letter | Digit | '_')* ; - // literals StringLiteral : @@ -211,6 +210,10 @@ IntegerLiteral : Digit+; +HostIdentifier + : ( Letter | Digit ) ( Letter | Digit | DOT | '-' )* ( Letter | Digit ) + ; + // // syntactic elements //