geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r571542 - in /geronimo/sandbox/gshell/trunk/gshell-parser/src: main/antlr/CommandLine.g test/java/org/apache/geronimo/gshell/parser/CommandLineParserTest.java
Date Fri, 31 Aug 2007 19:06:19 GMT
Author: jdillon
Date: Fri Aug 31 12:06:19 2007
New Revision: 571542

URL: http://svn.apache.org/viewvc?rev=571542&view=rev
Log:
Hacking blindling at this.. probably going to just go back to javacc

Modified:
    geronimo/sandbox/gshell/trunk/gshell-parser/src/main/antlr/CommandLine.g
    geronimo/sandbox/gshell/trunk/gshell-parser/src/test/java/org/apache/geronimo/gshell/parser/CommandLineParserTest.java

Modified: geronimo/sandbox/gshell/trunk/gshell-parser/src/main/antlr/CommandLine.g
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-parser/src/main/antlr/CommandLine.g?rev=571542&r1=571541&r2=571542&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-parser/src/main/antlr/CommandLine.g (original)
+++ geronimo/sandbox/gshell/trunk/gshell-parser/src/main/antlr/CommandLine.g Fri Aug 31 12:06:19
2007
@@ -26,6 +26,7 @@
 options {
     language=Java;
     output=AST;
+    ASTLabelType=CommonTree;
     // k=2;
     // backtrack=true;
     // memoize=true;
@@ -44,11 +45,11 @@
 //
 
 compilationUnit
-    : ( expression ( ';' | NewLine | EOF ) )*
+    :  ( expression ( ';' | NewLine | EOF ) )*
     ;
 
 expression
-    : ( WhiteSpace )* ( argument ( WhiteSpace )* )+
+    : ( WhiteSpace* argument WhiteSpace* )+
     ;
 
 argument

Modified: geronimo/sandbox/gshell/trunk/gshell-parser/src/test/java/org/apache/geronimo/gshell/parser/CommandLineParserTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-parser/src/test/java/org/apache/geronimo/gshell/parser/CommandLineParserTest.java?rev=571542&r1=571541&r2=571542&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-parser/src/test/java/org/apache/geronimo/gshell/parser/CommandLineParserTest.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-parser/src/test/java/org/apache/geronimo/gshell/parser/CommandLineParserTest.java
Fri Aug 31 12:06:19 2007
@@ -52,10 +52,11 @@
         CommandLineParser.compilationUnit_return r = parser.compilationUnit();
         System.out.println("tree="+((Tree)r.tree).toStringTree());
 
-
+        /*
         CommonTreeNodeStream nodes = new CommonTreeNodeStream((Tree)r.tree);
 		nodes.setTokenStream(ts);
 		CommandLineWalker walker = new CommandLineWalker(nodes);
 		walker.commandLine();
+		*/
     }
 }



Mime
View raw message