Author: jbellis
Date: Fri Apr 24 03:02:18 2009
New Revision: 768137
URL: http://svn.apache.org/viewvc?rev=768137&view=rev
Log:
fix hostname parsing in cli. patch by Eric Evans; reviewed by jbellis for #100
Modified:
incubator/cassandra/trunk/src/org/apache/cassandra/cli/Cli.g
Modified: incubator/cassandra/trunk/src/org/apache/cassandra/cli/Cli.g
URL:
http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/cli/Cli.g?rev=768137&r1=768136&r2=768137&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/cli/Cli.g (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/cli/Cli.g Fri Apr 24
03:02:18 2009
@@ -150,7 +150,7 @@
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 @@
: Letter ( Letter | Digit | '_')*
;
-
// literals
StringLiteral
:
@@ -211,6 +210,10 @@
: Digit+;
+HostIdentifier
+ : ( Letter | Digit ) ( Letter | Digit | DOT | '-' )* ( Letter | Digit )
+ ;
+
//
// syntactic elements
//